替换轮廓数据时忽略索引0

This commit is contained in:
Antecer 2024-06-20 10:54:29 +08:00
parent da7093214f
commit d6c2b5eceb

View File

@ -802,8 +802,9 @@ interface JsExtensions : JsEncodeUtils {
if (errorQueryTTF.isBlankUnicode(oldCode)) {
return@forEachIndexed
}
val glyf = errorQueryTTF.getGlyfByUnicode(oldCode)
// 删除轮廓数据不存在的字符
var glyf = errorQueryTTF.getGlyfByUnicode(oldCode) // 轮廓数据不存在
if (errorQueryTTF.getGlyfIdByUnicode(oldCode) == 0) glyf = null; // 轮廓数据指向保留索引0
if (filter && (glyf == null)) {
contentArray[index] = ""
return@forEachIndexed