Update jquery.webfonts to 14b7700 from upstream

Changes:
* Fix @font-face local() syntax

Change-Id: Ib19feb896249020f4552fd18ba4fc2fbd75a4559
This commit is contained in:
Kartik Mistry
2017-03-27 12:29:55 +05:30
parent d5cc7975cb
commit 033bf62c00

View File

@@ -388,13 +388,15 @@
*/ */
getCSS: function( fontFamily, variant ) { getCSS: function( fontFamily, variant ) {
var webfonts, base, var webfonts, base,
fontFaceRule, userAgent, fontStyle, fontFormats, fontFaceRule, userAgent, fontStyle, fontFormats, fullFontName,
fontconfig = this.repository.get( fontFamily ); fontconfig = this.repository.get( fontFamily );
variant = variant || 'normal'; variant = variant || 'normal';
fullFontName = fontFamily;
if ( variant !== 'normal' ) { if ( variant !== 'normal' ) {
if ( fontconfig.variants !== undefined && fontconfig.variants[variant] ) { if ( fontconfig.variants !== undefined && fontconfig.variants[variant] ) {
fullFontName = fontconfig.variants[variant];
fontconfig = this.repository.get( fontconfig.variants[variant] ); fontconfig = this.repository.get( fontconfig.variants[variant] );
} }
} }
@@ -418,7 +420,7 @@
if ( userAgent.match( /Android 2\.3/ ) === null ) { if ( userAgent.match( /Android 2\.3/ ) === null ) {
// Android 2.3.x does not respect local() syntax. // Android 2.3.x does not respect local() syntax.
// http://code.google.com/p/android/issues/detail?id=10609 // http://code.google.com/p/android/issues/detail?id=10609
fontFaceRule += 'local(\'' + fontFamily + '\'),'; fontFaceRule += 'local(\'' + fullFontName + '\'),';
} }
if ( fontconfig.woff2 ) { if ( fontconfig.woff2 ) {