Added multi-byte wingdings

pull/209/head
M66B 2 years ago
parent 097bf29908
commit 86267a654f

@ -3225,12 +3225,11 @@ public class HtmlHelper {
break; break;
case "font-family": case "font-family":
if ("wingdings".equalsIgnoreCase(value)) { if ("wingdings".equalsIgnoreCase(value)) {
for (int i = start; i < ssb.length(); i++) { for (int i = ssb.length() - 1; i >= start; i--) {
int kar = ssb.charAt(i); int kar = ssb.charAt(i);
if (kar >= 0x20 && kar < 0x20 + WINGDING_TO_UNICODE.length) { if (kar >= 0x20 && kar < 0x20 + WINGDING_TO_UNICODE.length) {
int codepoint = WINGDING_TO_UNICODE[kar - 0x20]; int codepoint = WINGDING_TO_UNICODE[kar - 0x20];
String replacement = new String(Character.toChars(codepoint)); String replacement = new String(Character.toChars(codepoint));
if (replacement.length() == 1)
ssb.replace(i, i + 1, replacement); ssb.replace(i, i + 1, replacement);
} }
} }

Loading…
Cancel
Save