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

Optimization

This commit is contained in:
M66B 2022-07-18 07:11:40 +02:00
parent d94a0da751
commit c6758f9d34

View file

@ -3183,6 +3183,7 @@ public class HtmlHelper {
NodeTraversor.traverse(new NodeVisitor() {
private Element element;
private TextNode tnode;
private Typeface wingdings = null;
@Override
public void head(Node node, int depth) {
@ -3257,7 +3258,9 @@ public class HtmlHelper {
break;
case "font-family":
if ("wingdings".equalsIgnoreCase(value)) {
Typeface wingdings = ResourcesCompat.getFont(context.getApplicationContext(), R.font.wingdings);
if (wingdings == null)
wingdings = ResourcesCompat.getFont(context.getApplicationContext(), R.font.wingdings);
int from = start;
for (int i = start; i < ssb.length(); i++) {
int kar = ssb.charAt(i);
@ -3273,6 +3276,7 @@ public class HtmlHelper {
from = i + 1;
}
}
if (from < ssb.length()) {
TypefaceSpan span = new CustomTypefaceSpan("wingdings", wingdings);
setSpan(ssb, span, from, ssb.length());