Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
More upstream updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Oct 30, 2014
1 parent 320afe8 commit ae912fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
11 changes: 6 additions & 5 deletions afontgarde.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2014 Filament Group c/o Zach Leatherman
* MIT License */

/*! fontfaceonload - v0.1.2 - 2014-10-29
/*! fontfaceonload - v0.1.3 - 2014-10-29
* https://github.com/zachleat/fontfaceonload
* Copyright (c) 2014 Zach Leatherman (@zachleat)
* MIT License */
Expand Down Expand Up @@ -45,8 +45,8 @@
};

FontFaceOnloadInstance.prototype.initialMeasurements = function ( fontFamily ) {
var sansSerif = this.sansSerif;
var serif = this.serif;
var sansSerif = this.sansSerif,
serif = this.serif;

this.dimensions = {
sansSerif: {
Expand Down Expand Up @@ -117,8 +117,8 @@
}; // end load()

FontFaceOnloadInstance.prototype.init = function( fontFamily, options ) {
var that = this;
var defaultOptions = {
var that = this,
defaultOptions = {
glyphs: '',
success: function() {},
error: function() {},
Expand All @@ -136,6 +136,7 @@
}
}

// For some reason this was failing on afontgarde + icon fonts.
if( !options.glyphs && "fonts" in doc ) {
doc.fonts.load( "1em " + fontFamily ).then(function() {
options.success();
Expand Down
13 changes: 7 additions & 6 deletions src/fontfaceonload.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! fontfaceonload - v0.1.2 - 2014-10-29
/*! fontfaceonload - v0.1.3 - 2014-10-29
* https://github.com/zachleat/fontfaceonload
* Copyright (c) 2014 Zach Leatherman (@zachleat)
* MIT License */
Expand Down Expand Up @@ -40,8 +40,8 @@
};

FontFaceOnloadInstance.prototype.initialMeasurements = function ( fontFamily ) {
var sansSerif = this.sansSerif;
var serif = this.serif;
var sansSerif = this.sansSerif,
serif = this.serif;

this.dimensions = {
sansSerif: {
Expand Down Expand Up @@ -112,8 +112,8 @@
}; // end load()

FontFaceOnloadInstance.prototype.init = function( fontFamily, options ) {
var that = this;
var defaultOptions = {
var that = this,
defaultOptions = {
glyphs: '',
success: function() {},
error: function() {},
Expand All @@ -131,7 +131,8 @@
}
}

if( "fonts" in doc ) {
// For some reason this was failing on afontgarde + icon fonts.
if( !options.glyphs && "fonts" in doc ) {
doc.fonts.load( "1em " + fontFamily ).then(function() {
options.success();

Expand Down

0 comments on commit ae912fd

Please sign in to comment.