解析字体时排除轮廓索引为0的Unicode编码

This commit is contained in:
Antecer 2024-06-20 16:57:23 +08:00
parent c907ed51b7
commit d7ae1d4f0a

View File

@ -975,6 +975,7 @@ public class QueryTTF {
int key = item.getKey();
int val = item.getValue();
if (val >= glyfArrayLength) continue;
if (val == 0) continue; // 排除轮廓索引为0的Unicode
String glyfString = getGlyfById(val);
unicodeToGlyph.put(key, glyfString);
if (glyfString == null) continue; // null 不能用作hashmap的key