html - persian font not applied in android WebView -
i have html content (combined persian english text) attached css, css style applied correctly font.
the css have fontface this:
@font-face{ font-family: 'byekan'; font-weight: normal; font-style: normal; src: url(../fonts/byekan.ttf); }
the font applied english text , not persian. font standard ttf persian font (byekan.ttf) nothings wrong it.
i googled lot , every body said it's bug in webview
android > 3.0, problem still exist in android 4.
https://code.google.com/p/android/issues/detail?id=38536 https://groups.google.com/forum/#!topic/persian-computing/4fm7jfiokjk
the workaround found using svg fonts instead, does not work me either. custom font webview
so how can solve this?
note1: question probobly asked alot, this:
persian @font-face doesn't work in chrome, bug or not?
it's old question , given advice not working anymore (at least me).
note2: when open page in chrome desktop browser font applied correctly.
i have found workaround
try these font faces
@font-face { font-family: 'yekan’; src:url('fonts/yekan.eot?#’) format(‘eot’), url('fonts/yekan.woff') format('woff'), url(‘fonts/yekan.ttf’) format(‘truetype’); }
imo use svg font persian language
Comments
Post a Comment