Page MenuHomePhabricator

Webfonts don't render on Android 2.3.x
Closed, ResolvedPublic

Description

When I visit http://thottingal.in/wiki/index.php?title=Main_Page on Android 2.3.x I am not able to see any of the Web fonts. Visting the same link with Android 3.x works just fine.

Both work great if i visit http://www.google.com/webfonts


Version: unspecified
Severity: normal

Details

Reference
bz31337

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:54 PM
bzimport set Reference to bz31337.

I can confirm with Android default browser on 2.3.6 (Nexus One).

Firefox 8 on same phone renders them nicely though!

Most I can see on error console from Android stock browser is this fairly generic looking line (using debug=true so the source is findable):

I/browser (21734): Console: Requested unknown font http://thottingal.in/wiki/extensions/WebFonts/js/webfonts.js:24

this seems to happen only when clicking 'reset', and is a message that comes straight from the extension.

preilly wrote:

The android browser breaks on a local() reference inside of a @font-face declaration and discards the rest of the declaration.

Is it possible that this is the issue: http://code.google.com/p/android/issues/detail?id=10609

preilly wrote:

and it looks like that is what you are doing with the following:

<code>
@font-face {
font-family: 'RufScript';
src: url('/wiki/extensions/WebFonts/fonts/en/Rufscript.eot');
src: local('RufScript'), url('/wiki/extensions/WebFonts/fonts/en/Rufscript.woff') format('woff'), url('/wiki/extensions/WebFonts/fonts/en/Rufscript.ttf') format('truetype');
font-weight: normal;
}
</code>

r99464 fixed it. Tested using Android 2.3 emulator and an android 2.3.5 phone. 'local' syntax does not have much significance for for mobiles , since unlike desktops, chances are rare for phones having these fonts locally.