3

I render a local web page in Android and include locally referenced webfonts in woff, ttf and svg format (not fetched via HTTP). However, these are not rendered at all on two different devices (API 2.2 and 2.3) and the console log keeps empty. Of course the fonts work just as they should on any webfonts-capable browser and even old WebKit versions that are older (529.x) than the WebKit version used on Android (533.1). Any clues what piece I am missing in the puzzle?

Thomas Keller
  • 5,933
  • 6
  • 48
  • 80
  • possible duplicate of http://stackoverflow.com/questions/5693856/getting-web-fonts-to-work-with-phonegap-and-android-how The answer from the other SO question works fine for me. How are you referencing the local fonts? Please provide an example of what you've already tried. – zackdever Feb 02 '12 at 07:23
  • Sorry, had the view opened for too long and didn't saw your comment. Yes, it is the problem that Android does not fall back gracefully on a missing `local()` reference (see below). – Thomas Keller Feb 02 '12 at 07:52
  • No worries, the other link you posted is more detailed. I just started using PhoneGap tonight and ran into the font problem myself. – zackdever Feb 02 '12 at 07:55

1 Answers1

3

Ok, seems as if this is a long-standing Android bug, where the Webview pokes on a local() source reference and discards the other sources. This gives you a more detailed response how to define your fonts cross-platform, so that they even work on IE.

Community
  • 1
  • 1
Thomas Keller
  • 5,933
  • 6
  • 48
  • 80