diff --git a/extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreeTypeFontGenerator.java b/extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreeTypeFontGenerator.java index 4472ff7c8f3..dee52891062 100644 --- a/extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreeTypeFontGenerator.java +++ b/extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreeTypeFontGenerator.java @@ -598,8 +598,9 @@ public FreeTypeBitmapFontData generateData (FreeTypeFontParameter parameter, Fre } } - Rectangle rect = packer.pack(mainPixmap); - glyph.page = packer.getPages().size - 1; // Glyph is always packed into the last page for now. + String pixmapName = glyph.hashCode() + "_" + glyph.id; + Rectangle rect = packer.pack(pixmapName, mainPixmap); + glyph.page = packer.getPageIndex(pixmapName); glyph.srcX = (int)rect.x; glyph.srcY = (int)rect.y;