Skip to content

gabrielmaldi/windows-phone-8-local-font-face

Repository files navigation

Local @font-face Example Build status

A Visual Studio solution which shows how to use @font-face in Windows Phone 8 WebBrowser control with fonts embedded in the XAP.

Steps to make it work

You can check out the commits on this repo to quickly see the required changes applied on top of Visual Studio's default Windows Phone 8 HTML5 App project template.

  • WebBrowser only works with TrueType fonts (other formats can be included but will make no difference).
  • The font's file Build Action must be set to Content:
  • Don't use a query string in the @font-face declaration:
  • Make sure the font's file "embeddable flag" is set to 0.
  • Only works on Windows Phone 8 with Update 2 (GDR2) or superior.
    • You can download the emulators running the updates from here to try it out.
    • This sample was tested both on emulators and on actual devices running Windows Phone 8 without updates, with GDR1, with GDR2, and with GDR3, and Windows Phone 8.1 Preview.

Screenshots

  • Working (GDR2, GDR3, and 8.1 Preview):

  • Not working (Windows Phone 8 without updates or just GDR1):

License

Credit goes entirely to Thomas Forth, I just created this repo to make his solution easily available to everyone.

This sample uses Font Awesome.

About

A barebones example of using CSS3 @font-face with embedded fonts in Windows Phone 8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published