mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Added font/pre for external texts
This commit is contained in:
parent
2d3ccc22a2
commit
fb4a0af89b
1 changed files with 6 additions and 1 deletions
|
@ -2099,7 +2099,9 @@ public class HtmlHelper {
|
|||
ssb.setSpan(new StyleSpan(Typeface.ITALIC), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
break;
|
||||
case "font":
|
||||
// Do nothing
|
||||
String face = element.attr("face");
|
||||
if (!TextUtils.isEmpty(face))
|
||||
ssb.setSpan(new TypefaceSpan(face), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
break;
|
||||
case "h1":
|
||||
case "h2":
|
||||
|
@ -2193,6 +2195,9 @@ public class HtmlHelper {
|
|||
if (llevel > 0)
|
||||
ssb.setSpan(new LeadingMarginSpan.Standard(llevel * dp24), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
break;
|
||||
case "pre":
|
||||
ssb.setSpan(new TypefaceSpan("monospace"), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
break;
|
||||
case "small":
|
||||
ssb.setSpan(new RelativeSizeSpan(FONT_SMALL), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue