(probably) Issue #1247 Incorrectly handling remainingBytes for DefineCompactedFont fix

This commit is contained in:
Jindra Petřík
2016-06-06 22:29:03 +02:00
parent 7f2a9808ba
commit 5d00b7147f

View File

@@ -42,6 +42,8 @@ import java.awt.Font;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
@@ -114,6 +116,10 @@ public final class DefineCompactedFont extends FontTag {
fonts.add(new FontType(gis));
gis.endDumpLevel();
}
sis.skipBytes(mis.getPos());
if (fonts.size() > 1) {
Logger.getLogger(DefineCompactedFont.class.getName()).log(Level.WARNING, "Compacted font has more than one FontType inside. This may cause problems while editing.");
}
rebuildShapeCache();
}