From 58c872c66283e941ed3934865464b239e5f47cdf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 9 Dec 2003 10:42:30 +0000 Subject: [PATCH] From Tree, tweaks to the coord generation to improve text alignment. --- src/osgText/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp index f5504004e..baee04865 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -355,7 +355,7 @@ void Font::GlyphTexture::addGlyph(Glyph* glyph, int posX, int posY) glyph->setTexture(this); glyph->setTexturePosition(posX,posY); unsigned int sizeAdjustment = 0; // was 1. - glyph->setMinTexCoord(osg::Vec2((float)(posX+_margin-1)/(float)(getTextureWidth()-sizeAdjustment),(float)(posY+_margin-1)/(float)(getTextureHeight()-sizeAdjustment))); + glyph->setMinTexCoord(osg::Vec2((float)(posX+_margin)/(float)(getTextureWidth()-sizeAdjustment),(float)(posY+_margin)/(float)(getTextureHeight()-sizeAdjustment))); glyph->setMaxTexCoord(osg::Vec2((float)(posX+glyph->s()-_margin)/(float)(getTextureWidth()-sizeAdjustment),(float)(posY+glyph->t()-_margin)/(float)(getTextureHeight()-sizeAdjustment))); }