diff --git a/app/core/initialize.coffee b/app/core/initialize.coffee index 2fec30501..b085f281f 100644 --- a/app/core/initialize.coffee +++ b/app/core/initialize.coffee @@ -37,6 +37,7 @@ init = -> app.demoing = _.string.startsWith path, '/demo' setUpBackboneMediator() app.initialize() + loadOfflineFonts() unless app.isProduction() Backbone.history.start({ pushState: true }) handleNormalUrls() setUpMoment() # Set up i18n for moment @@ -125,6 +126,9 @@ setUpIOSLogging = -> catch e webkit?.messageHandlers?.consoleLogHandler?.postMessage level: level, arguments: ['could not post log: ' + e] +loadOfflineFonts = -> + $('head').prepend '' + # This is so hacky... hopefully it's restrictive enough to not be slow. # We could also keep a list of events we are actually subscribed for and only try to send those over. seen = null diff --git a/bower.json b/bower.json index 30991c9ea..c66802b7b 100644 --- a/bower.json +++ b/bower.json @@ -112,6 +112,7 @@ } }, "devDependencies": { - "modernizr-mixin": "~3.0.0" + "modernizr-mixin": "~3.0.0", + "openSansCondensed": "https://google-fonts.azurewebsites.net/googleFonts/openSansCondensed?family=Open+Sans+Condensed:700&subset=latin,latin-ext,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic" } } diff --git a/config.coffee b/config.coffee index f18bdc0cf..af3544594 100644 --- a/config.coffee +++ b/config.coffee @@ -203,6 +203,7 @@ exports.config = assetsmanager: copyTo: 'lib/ace': ['node_modules/ace-builds/src-min-noconflict/*'] + 'fonts': ['bower_components/openSansCondensed/*'] autoReload: delay: 1000