1

I'm using phonegap 3.0 for create a application on android, iOS, and Windows phone. I use a custom font-face for my text and for icons. But when viewed in Windows Phone 8, the font and the icons won't appear on the application.

I have tried loading the fonts after the device ready event; using a .woff font; loading from an external source - nothing works. How could I solve this?

4444
  • 3,541
  • 10
  • 32
  • 43

2 Answers2

1

I heard about this problem before, apparently there is an issue present in Windows Phone 8 that prevents custom font-faces from working when html/css are hosted locally. Could you try and host the html/css files externally? Just to see if it makes a difference. I think this is a bug in the current WebBrowser control that's used on WP8

EDIT: See this StackOverflow questions and answers about a similar problem

Community
  • 1
  • 1
Tom Verhoeff
  • 1,270
  • 6
  • 12
  • Been struggling with this.TTF Fonts stored in isolated data do work with WebBrowser Navigate method. Also got them working by converting them to there base64 equivalent with WebBrowser NavigateToString method. But there seems to be no way to load them via css through relative or absolute path with WebBrowser NavigateToString API. Another interesting observation. All worked perfectly on windows phone 8.1. – ashok Sep 26 '14 at 20:22
-1

you can transform the file to base64, using one of the services around (e.g. this one, and add url like this:

src: url(data:application/x-font-woff;charset=utf-8;base64, AAEAAAALAIAAAwAwT1MvMg6SAy8AAAC8AAAAYGNtYXAa.....)
Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160
tomhe
  • 1
  • 1