KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to establish a new custom font (otf file) for my web view. I put anbaaarabic_bold.otf in assets file. There is how i do: String head = "<head><style>@font-face {font-family: 'verdana';src: url('file://"+ getActivity().getFilesDir().getAbsolutePath()+ "/anbaaarabic_bold.otf');}body {font-family: 'verdana';}</style></head>"; String htmlData= "<html>"+head+"<body style=\"font-family: verdana\">"+body+"</body></html>" ; mBodyArticle.loadDataWithBaseURL("http://nada", htmlData, "text/html", "utf-8", ""); body : contain my html code. I don't know why the font is not working for my webview. body html font doesn't change.
Tags (comma-separated)
Save Edits
Cancel