From 7d2b164f533e671fdb1a6f014f08cc2bfd5dea51 Mon Sep 17 00:00:00 2001 From: gered Date: Mon, 10 Mar 2014 18:00:24 -0400 Subject: [PATCH] fix font rendering (for cases when e.g. rendering a font from a Skin) in those cases, the glyph src coordinates will be relative to the font's subtexture region in the Skin, whereas the glyph uv coords will be correct if rendering from a texture region or a standalone texture --- src/main/java/ca/blarg/gdx/graphics/ExtendedSpriteBatch.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/ca/blarg/gdx/graphics/ExtendedSpriteBatch.java b/src/main/java/ca/blarg/gdx/graphics/ExtendedSpriteBatch.java index 3e56e2a..2cd5e10 100644 --- a/src/main/java/ca/blarg/gdx/graphics/ExtendedSpriteBatch.java +++ b/src/main/java/ca/blarg/gdx/graphics/ExtendedSpriteBatch.java @@ -148,8 +148,7 @@ public class ExtendedSpriteBatch extends SpriteBatch { fontTexture, currentX + glyphXoffset, currentY + glyphYoffset, glyphWidth, glyphHeight, - glyph.srcX, glyph.srcY, glyph.width, glyph.height, - false, false + glyph.u, glyph.v, glyph.u2, glyph.v2 ); currentX += ((float)glyph.xadvance * scale);