Search code examples
javascriptcsshtmlwindows-phone-8windows-phone

Webfont in Windows Phone 8 HTML5 App


I can't get any web fonts to work in my Windows Phone 8 HTML5 Application.

I do the following:

  1. Create a new Windows Phone HTML5 App Project
  2. Copy my WOFF font (though I've also tried eot and ttf) to the project root, and add it to the project as an existing item
  3. Add in this CSS to the index.html file

If anyone could create a template Windows Phone 8 project with simple working local web fonts, I'd be super appreciative. This has got me really stuck.


Solution

  • Windows phone supports web fonts. However, if they are embedded on the XAP they will not work.

    Engineering response: This is a known issue, the only workaround we know is to host the fonts on a remote server (making sure to bypass the single origin policy issue) and perhaps use AppCache to keep the font files locally on the device.

    Thanks,