Issue
I have some ttf files in assets directory of my application, for example AdobeArabic-Regular.ttf. Now I want to run this javascript code in WebView:
object.style.fontFamily = "AdobeArabic-Regular";
But I do not know how I can load that font dynamically? As font family will be changed dinamically, using this described way does not solve my problem.
Solution
You need to inject CSS into webview this link is helpful
And set the font in CSS
body {
font-family: "Times New Roman", Times, serif;
}
Answered By - Alireza Tizfahm Fard
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.