Skip to content

Commit

Permalink
Removed Global variable for webfontconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
ramghaju committed Jun 29, 2016
1 parent e5336f4 commit cdc73f4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/monotype.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ webfont.modules.Monotype.HOOK = '__mti_fntLst';
*/
webfont.modules.Monotype.SCRIPTID = '__MonotypeAPIScript__';

/**
* __MonotypeConfiguration__ is function exposed to fonts.com. fonts.com will use this function to get webfontloader configuration
* @const
*/
webfont.modules.Monotype.CONFIGURATION = '__MonotypeConfiguration__';

goog.scope(function() {
var Monotype = webfont.modules.Monotype,
Font = webfont.Font;
Expand Down Expand Up @@ -91,6 +97,10 @@ goog.scope(function() {
if (err) {
onReady([]);
} else {
loadWindow[Monotype.CONFIGURATION+ projectId] = function() {
return self.configuration_;
};

checkAndLoadIfDownloaded();
}
});
Expand Down

0 comments on commit cdc73f4

Please sign in to comment.