mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 20:20:46 +00:00
Do not set advance if it can't display char
This commit is contained in:
@@ -537,6 +537,9 @@ public class DefineFont2Tag extends FontTag {
|
||||
|
||||
for (Integer character : codeTable) {
|
||||
char ch = (char) (int) character;
|
||||
if (!font.canDisplay(ch)) {
|
||||
continue;
|
||||
}
|
||||
SHAPE shp = SHAPERECORD.fontCharacterToSHAPE(font, (int) Math.round(getDivider() * 1024), ch);
|
||||
fontBoundsTable.add(shp.getBounds());
|
||||
int fontStyle = getFontStyle();
|
||||
|
||||
@@ -542,6 +542,9 @@ public class DefineFont3Tag extends FontTag {
|
||||
|
||||
for (Integer character : codeTable) {
|
||||
char ch = (char) (int) character;
|
||||
if (!font.canDisplay(ch)) {
|
||||
continue;
|
||||
}
|
||||
SHAPE shp = SHAPERECORD.fontCharacterToSHAPE(font, (int) Math.round(getDivider() * 1024), ch);
|
||||
fontBoundsTable.add(shp.getBounds());
|
||||
int fontStyle = getFontStyle();
|
||||
|
||||
Reference in New Issue
Block a user