Issue
I am newbie in android. When I am getting the data from an URL then parse the HTML data and show the page contents using loadDataWithBaseURL()
.
But it's showing all data with the same formatting.
I used HTML tags in data.
The paragraph tag <p>
and other tags are working fine, but the bold tag is not showing the contents in bold. I used <b>
and </b>
for bold.
How to show bold content as bold?
Here is the java code.
final String ftext = "<html><body>"+ Html.fromHtml(storyText)+ " </body></html>";
webview.getSettings().setJavaScriptEnabled(true);
webview.loadDataWithBaseURL("", ftext, "text/html", "UTF-8", "");
webview.setVisibility(View.VISIBLE);
Solution
As per your comments, you're using the font Calibri
.
Calibri is not a monolithic, self contained font.
It's split into multiple ttf files, one per each variant.
So you have to include all of them or at least the ones you intend to use.
i.e.:
calibri.ttf
calibrib.ttf
Answered By - Phantômaxx
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.