I followed the Web Fonts tutorial in qooxdoo documentation to add a web font to Font.js , but I notice there is a warning in Chrome's Developer Console:
My code is as follow:
/* ************************************************************************
#asset(myApp/fonts/*)
************************************************************************ */
qx.Theme.define("myApp.theme.Font",
{
extend : qx.theme.simple.Font,
fonts :
{
"silkscreen" :
{
size: 8,
lineHeight: 1,
family: [ "silkscreen", "Tahoma" ],
sources:
[
{
family: "Silkscreen",
source:
[
"myApp/fonts/slkscr-webfont.eot",
"myApp/fonts/slkscr-webfont.ttf",
"myApp/fonts/slkscr-webfont.woff",
"myApp/fonts/slkscr-webfont.svg#silkscreen"
]
}
]
}
}
});
How can I resolve the browser warning ?
According to the W3C spec, the correct MIME type is application/font-woff
, so you need to configure your web server to use that when serving .woff files.
If you are using an IIS webserver, give this a try:
<system.webServer>
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With