From 3b831fdcef052343c7c732f92f83facbcb43d9ec Mon Sep 17 00:00:00 2001 From: Kenneth Ormandy Date: Wed, 19 Aug 2015 21:08:12 -0600 Subject: [PATCH 1/2] Adds a small amount of caption letter-spacing for @rileycran --- src/css/module/_figure.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/css/module/_figure.scss b/src/css/module/_figure.scss index a9702cc..fd2455f 100644 --- a/src/css/module/_figure.scss +++ b/src/css/module/_figure.scss @@ -212,6 +212,7 @@ figcaption { width: 100%; flex: 1 1 100%; font-family: $font-family-caption; + letter-spacing: 0.01em; // font-style: italic; align-self: flex-end; line-height: $base-line-height; From cc333cc13cafb4e100fcd99546c42ce6ef77e252 Mon Sep 17 00:00:00 2001 From: Kenneth Ormandy Date: Sat, 22 Aug 2015 22:30:50 -0600 Subject: [PATCH 2/2] Adds Font Face Observer --- _includes/header.hbs | 9 +++++++-- package.json | 1 + src/js/index.js | 10 +++++----- src/js/init.js | 23 +++++++++++++---------- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/_includes/header.hbs b/_includes/header.hbs index f73897a..b458ec7 100644 --- a/_includes/header.hbs +++ b/_includes/header.hbs @@ -1,4 +1,4 @@ - + @@ -7,12 +7,17 @@ + + {{!-- + + --}} {{> opengraph }} diff --git a/package.json b/package.json index 9d17307..004adc6 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "keywords": [], "dependencies": { "dropcap.js": "1.0.0", + "fontfaceobserver": "1.5.1", "smoothscroll": "0.1.0", "vague-time": "1.2.0", "zoom.js": "fat/zoom.js" diff --git a/src/js/index.js b/src/js/index.js index b028b3e..64108f9 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -22,10 +22,10 @@ if (mustard || 'querySelector' in window.document) { // TODO Re-run after resize complete // Social icons - WebFont.load({ - custom: { - families: ['SSSocialRegular'] - } - }) + // WebFont.load({ + // custom: { + // families: ['SSSocialRegular'] + // } + // }) loadCSS('http://fonts.kennethormandy.com/css/symbolset.css') } diff --git a/src/js/init.js b/src/js/init.js index 1ea43f0..0b57cee 100644 --- a/src/js/init.js +++ b/src/js/init.js @@ -1,15 +1,18 @@ // Cut the mustard, choose your own method here—querySelector is an easy one. if ('querySelector' in window.document) { var mustard = true - var WebFontConfig = { - timeout: 1500, - typekit: { - id: 'lma3xaj' // @losttype cpc2pit - }, - custom: { - families: ['Moriston:n8,n4'] - } - } - loadJS('https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.6/webfontloader.js') + loadCSS('http://fonts.kennethormandy.com/css/moriston.css') + + var observeMoriston = new FontFaceObserver('Moriston') + .check() + .then(function() { + console.log('Loaded Moriston!') + }) + + var observeMeta = new FontFaceObserver('ff-meta-serif-web-pro') + .check() + .then(function() { + console.log('Loaded Meta Serif!') + }) }