提交 84865af1 编写于 作者: P prr

8238843: Enhanced font handing

Reviewed-by: serb, psadhukhan, mschoene, rhalade
上级 5e5d3be3
...@@ -570,8 +570,8 @@ public class TrueTypeFont extends FileFont { ...@@ -570,8 +570,8 @@ public class TrueTypeFont extends FileFont {
tableDirectory[i] = table = new DirectoryEntry(); tableDirectory[i] = table = new DirectoryEntry();
table.tag = ibuffer.get(); table.tag = ibuffer.get();
/* checksum */ ibuffer.get(); /* checksum */ ibuffer.get();
table.offset = ibuffer.get(); table.offset = ibuffer.get() & 0x7FFFFFFF;
table.length = ibuffer.get(); table.length = ibuffer.get() & 0x7FFFFFFF;
if (table.offset + table.length > fileSize) { if (table.offset + table.length > fileSize) {
throw new FontFormatException("bad table, tag="+table.tag); throw new FontFormatException("bad table, tag="+table.tag);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册