I have html content (combined Persian an English text) with attached css, all css style applied correctly but font.
The css have fontface like this:
@font-face{
font-family: 'BYekan';
font-weight: normal;
font-style: normal;
src: url(../Fonts/BYekan.ttf);
}
the font only applied to english text and not the persian. the font is a standard ttf persian font (BYekan.ttf) so nothings wrong with it.
I googled a lot and almost every body said it's a bug in WebView
android > 3.0, the 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 only workaround that I found is using svg fonts instead, but this does not work for me either. Custom font for webview
So how can I solve this?
note1: this question probobly asked alot, like this:
Persian @font-face doesn't work in Chrome, Bug or not?
but it's an old question and the given advice not working anymore (at least for me).
note2: When I open the page in chrome desktop browser font applied correctly.