From 033bf62c00bc21af6a5864c049f6280486148658 Mon Sep 17 00:00:00 2001 From: Kartik Mistry Date: Mon, 27 Mar 2017 12:29:55 +0530 Subject: [PATCH] Update jquery.webfonts to 14b7700 from upstream Changes: * Fix @font-face local() syntax Change-Id: Ib19feb896249020f4552fd18ba4fc2fbd75a4559 --- lib/jquery.webfonts/src/jquery.webfonts.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/jquery.webfonts/src/jquery.webfonts.js b/lib/jquery.webfonts/src/jquery.webfonts.js index 466c0f3d..b85631ee 100644 --- a/lib/jquery.webfonts/src/jquery.webfonts.js +++ b/lib/jquery.webfonts/src/jquery.webfonts.js @@ -388,13 +388,15 @@ */ getCSS: function( fontFamily, variant ) { var webfonts, base, - fontFaceRule, userAgent, fontStyle, fontFormats, + fontFaceRule, userAgent, fontStyle, fontFormats, fullFontName, fontconfig = this.repository.get( fontFamily ); variant = variant || 'normal'; + fullFontName = fontFamily; if ( variant !== 'normal' ) { if ( fontconfig.variants !== undefined && fontconfig.variants[variant] ) { + fullFontName = fontconfig.variants[variant]; fontconfig = this.repository.get( fontconfig.variants[variant] ); } } @@ -418,7 +420,7 @@ if ( userAgent.match( /Android 2\.3/ ) === null ) { // Android 2.3.x does not respect local() syntax. // http://code.google.com/p/android/issues/detail?id=10609 - fontFaceRule += 'local(\'' + fontFamily + '\'),'; + fontFaceRule += 'local(\'' + fullFontName + '\'),'; } if ( fontconfig.woff2 ) {