I have a problem. I have to change the font in my webview. I mean I have a html page in assets and font of the html page is default font. I want to change font of the html page but it must be done in code in android application. This is possible?
Asked
Active
Viewed 798 times
1
-
http://stackoverflow.com/questions/3796176/android-webview-font-size-change and this http://stackoverflow.com/questions/3900658/how-to-change-font-face-of-webview-in-android – Raghunandan Jun 10 '13 at 07:12
-
do u have custom fonts with u – Venkatesh S Jun 10 '13 at 07:16
-
@Raghunandan nice link.but he want in java code! – Zala Janaksinh Jun 10 '13 at 07:16
-
@Zala first link is in java code.. – Sagar Maiyad Jun 10 '13 at 07:17
-
@Segi i see this but it's for size not for type. see the question require – Zala Janaksinh Jun 10 '13 at 07:19
-
1I agree with Zala. I need do that in code of my application. – edi233 Jun 10 '13 at 07:21
-
webSettings.getSansSerifFontFamily(); try this. – Sagar Maiyad Jun 10 '13 at 07:26
-
no effect. And I want to change font on Helvetica. – edi233 Jun 10 '13 at 07:34
-
@edi233 check this http://developer.android.com/reference/android/webkit/WebSettings.html#setFixedFontFamily(java.lang.String) and this http://stackoverflow.com/questions/8071174/android-webview-safe-font-family. i don't think its possible – Raghunandan Jun 10 '13 at 07:45
-
@edi233 check this link for more clarity http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/webkit/WebSettings.java line 156 to 161. so helvetica is not supported. you can try the links in my first comment as an alternative – Raghunandan Jun 10 '13 at 07:58