diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js index 88c817ee..4cc01e02 100644 --- a/lib/jquery.webfonts.js +++ b/lib/jquery.webfonts.js @@ -253,15 +253,15 @@ base = this.repository.base; version = fontconfig.version; versionSuffix = '?version=' + version + '&20120101'; - styleString = '@font-face { font-family: \'' + fontFamily + '\';\\n'; + styleString = '@font-face { font-family: \'' + fontFamily + '\';\n'; userAgent = window.navigator.userAgent; fontStyle = fontconfig.fontstyle || 'normal'; fontFormats = []; if ( fontconfig.eot ) { - styleString += '\\tsrc: url(\'' + base + fontconfig.eot + versionSuffix + '\');\\n'; + styleString += '\tsrc: url(\'' + base + fontconfig.eot + versionSuffix + '\');\n'; } - styleString += '\\tsrc: '; + styleString += '\tsrc: '; // If the font is present locally, use it. if ( userAgent.match( /Android 2\.3/ ) === null ) { // Android 2.3.x does not respect local() syntax. @@ -269,30 +269,30 @@ styleString += 'local(\'' + fontFamily + '\'),'; } if ( fontconfig.woff ) { - fontFormats.push( '\\t\\turl(\'' + base + fontconfig.woff + versionSuffix + fontFormats.push( '\t\turl(\'' + base + fontconfig.woff + versionSuffix + '\') format(\'woff\')' ); } if ( fontconfig.svg ) { - fontFormats.push( '\\t\\turl(\'' + base + fontconfig.svg + versionSuffix + '#' + fontFormats.push( '\t\turl(\'' + base + fontconfig.svg + versionSuffix + '#' + fontFamily + '\') format(\'svg\')' ); } if ( fontconfig.ttf ) { - fontFormats.push( '\\t\\turl(\'' + base + fontconfig.ttf + versionSuffix + fontFormats.push( '\t\turl(\'' + base + fontconfig.ttf + versionSuffix + '\') format(\'truetype\')' ); } - styleString += fontFormats.join() + ';\\n'; + styleString += fontFormats.join() + ';\n'; if ( fontconfig.fontweight ) { - styleString += '\\tfont-weight:' + fontconfig.fontweight + ';'; + styleString += '\tfont-weight:' + fontconfig.fontweight + ';'; } - styleString += '\\tfont-style:' + fontStyle + ';'; + styleString += '\tfont-style:' + fontStyle + ';'; if ( fontconfig.fontweight !== undefined ) { - styleString += '\font-weight:' + fontconfig.fontweight + ';'; + styleString += '\tfont-weight:' + fontconfig.fontweight + ';'; } if ( fontconfig.fontstyle !== undefined ) { - styleString += '\\tfont-style:' + fontconfig.fontstyle + ';'; + styleString += '\tfont-style:' + fontconfig.fontstyle + ';'; } else { - styleString += '\\tfont-style: normal;'; + styleString += '\tfont-style: normal;'; } styleString += '}';