Fix display of empty fonts

This commit is contained in:
Jindra Petřík
2015-07-06 11:54:27 +02:00
parent cc475e9781
commit 94d3544fde

View File

@@ -792,6 +792,10 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
int fontId = ft.getFontId();
int cols = (int) Math.ceil(Math.sqrt(countGlyphs));
int rows = (int) Math.ceil(((float) countGlyphs) / ((float) cols));
if (rows == 0) {
rows = 1;
cols = 1;
}
int x = 0;
int y = 0;
int firstGlyphIndex = fontPageNum * SHAPERECORD.MAX_CHARACTERS_IN_FONT_PREVIEW;