0

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.

hasanghaforian
  • 13,498
  • 9
  • 73
  • 157

1 Answers1

1

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;
}