css - External font doesn't load in Android 2.1 -


i'm using external truetype font in embedded html resource. font located in assets, @ same level html resource.

the font loaded css:

@font-face {      font-family: myexternalfont;      src: url('myexternalfont.ttf');  } body {     font-family:myexternalfont; } 

and html resource loaded follows:

webview w = (webview) findviewbyid(r.id.webview); w.loadurl("file:///android_asset/index.htm"); 

this works fine in android 1.5, android 1.6 , android 2.2. doesn't work in android 2.1.

however, when load font , use in textview, works on android versions. this:

final typeface t = typeface.createfromasset(getcontext().getassets(), "myexternalfont.ttf"); textview.settypeface(t); 

what might problem?

(unfortunately can't upload font because it's paid font)

that's known bug android 2.0 , 2.1. can't use external fonts in webview on platforms, sorry.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -