I have a app which renders some local html text in a Webview. The html uses a styles.css file which has a custom font specified as follows:
@font-face {
font-family:myfontfamily;
src: url('file:///android_asset/fonts/MYFONT.TTF');
}
PROBLEM: The custom font does not show up in the html on 4.4 devices. This problem is only on 4.4 and it works just fine on versions before that. Weirdly, when I apply the same custom font to a TextView, it works. So the problem is only related to the WebView. Another strange thing is that the html also uses some other custom fonts (defined in the same exact way in the css), and they show up just fine in the WebView! (Ofcourse the TTF file exists in the "fonts" folder under assets)
I have checked the other similar Qs, but this problem is different. I have also glanced at the 4.4 Webview migration guide, but there is nothing useful that could help with this problem.
I am completely puzzle by this strange behavior.
Does anybody know what's going on?