Permalink
Browse files

Add google style font variations to custom module.

  • Loading branch information...
jessegrosjean committed May 2, 2012
1 parent 51cdd3f commit fa3f12979a8f0d68b46c9d2ef6c0e31ea6180342
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/custom/customcss.js
View
@@ -11,6 +11,7 @@
webfont.CustomCss = function(domHelper, configuration) {
this.domHelper_ = domHelper;
this.configuration_ = configuration;
+ this.fvd_ = new webfont.FontVariationDescription();
};
webfont.CustomCss.NAME = 'custom';
@@ -21,10 +22,12 @@ webfont.CustomCss.prototype.load = function(onReady) {
for (var i = 0, len = urls.length; i < len; i++) {
var url = urls[i];
-
this.domHelper_.insertInto('head', this.domHelper_.createCssLink(url));
}
- onReady(families);
+
+ var fontApiParser = new webfont.FontApiParser(families);
+ fontApiParser.parse();
+ onReady(fontApiParser.getFontFamilies(), fontApiParser.getVariations(), fontApiParser.getFontTestStrings());
};
webfont.CustomCss.prototype.supportUserAgent = function(userAgent, support) {

0 comments on commit fa3f129

Please sign in to comment.