Merge pull request #494 from gedoor/antecer

过滤用不上的部分编码
pull/497/head
Antecer 4 years ago committed by GitHub
commit b1952a2665
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/src/main/java/io/legado/app/model/analyzeRule/QueryTTF.java

@ -474,6 +474,7 @@ public class QueryTTF {
// 建立Unicode&Glyf映射表 // 建立Unicode&Glyf映射表
for (int i = 0; i < 130000; ++i) { for (int i = 0; i < 130000; ++i) {
if (i == 0xFF) i = 0x3400; // 屏蔽部分编码
int gid = GetGlyfIndex(i); int gid = GetGlyfIndex(i);
if (gid == 0) continue; if (gid == 0) continue;
int thisLength = Glyf.get(gid).flags.length; int thisLength = Glyf.get(gid).flags.length;
@ -587,7 +588,10 @@ public class QueryTTF {
break; break;
} }
} }
if (i == 0) unicodeVal = g.getKey(); if (i == 0) {
unicodeVal = g.getKey();
break;
}
} }
return unicodeVal; return unicodeVal;
} }

Loading…
Cancel
Save