Update jquery.webfonts to 17e61547
Change-Id: Ib73c2504e2c90c3bfcada30ec59aeec40116a504
This commit is contained in:
@@ -387,7 +387,7 @@
|
|||||||
* @return {String} CSS
|
* @return {String} CSS
|
||||||
*/
|
*/
|
||||||
getCSS: function( fontFamily, variant ) {
|
getCSS: function( fontFamily, variant ) {
|
||||||
var webfonts, base, version, versionSuffix,
|
var webfonts, base,
|
||||||
fontFaceRule, userAgent, fontStyle, fontFormats,
|
fontFaceRule, userAgent, fontStyle, fontFormats,
|
||||||
fontconfig = this.repository.get( fontFamily );
|
fontconfig = this.repository.get( fontFamily );
|
||||||
|
|
||||||
@@ -404,15 +404,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
base = this.repository.base;
|
base = this.repository.base;
|
||||||
version = fontconfig.version;
|
|
||||||
versionSuffix = '?version=' + version;
|
|
||||||
fontFaceRule = '@font-face { font-family: \'' + fontFamily + '\';\n';
|
fontFaceRule = '@font-face { font-family: \'' + fontFamily + '\';\n';
|
||||||
userAgent = window.navigator.userAgent;
|
userAgent = window.navigator.userAgent;
|
||||||
fontStyle = fontconfig.fontstyle || 'normal';
|
fontStyle = fontconfig.fontstyle || 'normal';
|
||||||
fontFormats = [];
|
fontFormats = [];
|
||||||
|
|
||||||
if ( fontconfig.eot ) {
|
if ( fontconfig.eot ) {
|
||||||
fontFaceRule += '\tsrc: url(\'' + base + fontconfig.eot + versionSuffix + '\');\n';
|
fontFaceRule += '\tsrc: url(\'' + base + fontconfig.eot + '\');\n';
|
||||||
}
|
}
|
||||||
fontFaceRule += '\tsrc: ';
|
fontFaceRule += '\tsrc: ';
|
||||||
|
|
||||||
@@ -424,22 +422,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( fontconfig.woff2 ) {
|
if ( fontconfig.woff2 ) {
|
||||||
fontFormats.push( '\t\turl(\'' + base + fontconfig.woff2 + versionSuffix
|
fontFormats.push( '\t\turl(\'' + base + fontconfig.woff2
|
||||||
+ '\') format(\'woff2\')' );
|
+ '\') format(\'woff2\')' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fontconfig.woff ) {
|
if ( fontconfig.woff ) {
|
||||||
fontFormats.push( '\t\turl(\'' + base + fontconfig.woff + versionSuffix
|
fontFormats.push( '\t\turl(\'' + base + fontconfig.woff
|
||||||
+ '\') format(\'woff\')' );
|
+ '\') format(\'woff\')' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fontconfig.svg ) {
|
if ( fontconfig.svg ) {
|
||||||
fontFormats.push( '\t\turl(\'' + base + fontconfig.svg + versionSuffix + '#'
|
fontFormats.push( '\t\turl(\'' + base + fontconfig.svg + '#'
|
||||||
+ fontFamily + '\') format(\'svg\')' );
|
+ fontFamily + '\') format(\'svg\')' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fontconfig.ttf ) {
|
if ( fontconfig.ttf ) {
|
||||||
fontFormats.push( '\t\turl(\'' + base + fontconfig.ttf + versionSuffix
|
fontFormats.push( '\t\turl(\'' + base + fontconfig.ttf
|
||||||
+ '\') format(\'truetype\')' );
|
+ '\') format(\'truetype\')' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user