1

my html file loaded in webView but still without font
my font has Unicode characters
i work on android 2.2

        mWebView.loadUrl("file:///android_asset/P_007.html");       

my css:

<STYLE type="text/css">
 @font-face {
    font-family: AQF_P007_HA;
    src: url("AQF_P007_HA.TTF");    
}
body {
    font-family: AQF_P007_HA;    
    font-style:normal;
    font-weight: normal;
    color: black;    
    font-size: medium;
    mso-font-charset: 0
}
</STYLE>
Ahmed Al Khashab
  • 373
  • 1
  • 9
  • 19

1 Answers1

2

copy font to a directory in asset folder like "fonts" and use this instead:

<STYLE type="text/css">
 @font-face {
    font-family: AQF_P007_HA;
    src: url('file:///android_asset/fonts/AQF_P007_HA.TTF');  
}
body {
    font-family: AQF_P007_HA;    
    font-style:normal;
    font-weight: normal;
    color: black;    
    font-size: medium;
    mso-font-charset: 0
}
</STYLE>
Behnam
  • 2,212
  • 2
  • 22
  • 32