2012-03-25 10 views
1

meine HTML-Datei in webView geladen, aber noch ohne Schrift
meine Schrift hat Zeichen Unicode
i 2.2android: html geladen, ohne Schrift

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

mein 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> 

Antwort

2

Kopieren Sie die Schriftart in ein Verzeichnis im Asset-Ordner wie "Fonts" und verwenden Sie diese stattdessen:

<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> 
+0

funktionierte immer noch ohne Schriftart, keine Änderung –

+1

@Ahmed überprüfen Sie Fehler wie AQF_P007_HA.ttf – Behnam

+0

Was meinst du? –