mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Optimization
This commit is contained in:
parent
d94a0da751
commit
c6758f9d34
1 changed files with 5 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue