1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

Added support for CSS font-style

This commit is contained in:
M66B 2022-04-04 14:49:23 +02:00
parent 53262f88cd
commit 7b285e8fa8

View file

@ -844,6 +844,12 @@ public class HtmlHelper {
sb.append(key).append(":").append(value).append(";");
break;
case "font-style":
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
if (value.contains("italic") || value.contains("oblique"))
sb.append(key).append(":").append("italic").append(";");
break;
case "text-decoration":
case "text-decoration-line":
// https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration
@ -3151,6 +3157,10 @@ public class HtmlHelper {
} else
setSpan(ssb, StyleHelper.getTypefaceSpan(value, context), start, ssb.length());
break;
case "font-style":
if ("italic".equals(value))
setSpan(ssb, new StyleSpan(Typeface.ITALIC), start, ssb.length());
break;
case "text-decoration":
if ("line-through".equals(value))
setSpan(ssb, new StrikethroughSpan(), start, ssb.length());