OSDN Git Service

[fixed] Hiero clipping glyphs if a glyph is larger than the page size.
authornathan.sweet <nathan.sweet@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Sun, 7 Nov 2010 21:50:40 +0000 (21:50 +0000)
committernathan.sweet <nathan.sweet@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Sun, 7 Nov 2010 21:50:40 +0000 (21:50 +0000)
extensions/hiero/src/com/badlogic/gdx/hiero/unicodefont/GlyphPage.java

index c12703f..00b29fd 100644 (file)
@@ -156,6 +156,9 @@ public class GlyphPage {
                        glyph.setShape(null); // The shape will never be needed again.\r
                }\r
 \r
+               width = Math.min(width, texture.getWidth());\r
+               height = Math.min(height, texture.getHeight());\r
+\r
                WritableRaster raster = scratchImage.getRaster();\r
                int[] row = new int[width];\r
                for (int y = 0; y < height; y++) {\r