From e00b8f28684673cb54264e83e4a1211d0d263fb8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 25 Mar 2003 15:48:17 +0000 Subject: [PATCH] Tweak the tex coords of fonts slightly to avoid cut off of text. --- 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 908f3e07a..ccb027c0a 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -352,7 +352,7 @@ void Font::GlyphTexture::addGlyph(Glyph* glyph, int posX, int posY) // set up the details of where to place glyph's image in the texture. glyph->setTexture(this); glyph->setTexturePosition(posX,posY); - glyph->setMinTexCoord(osg::Vec2((float)(posX+_margin)/(float)(getTextureWidth()-1),(float)(posY+_margin)/(float)(getTextureHeight()-1))); + glyph->setMinTexCoord(osg::Vec2((float)(posX+_margin-1)/(float)(getTextureWidth()-1),(float)(posY+_margin-1)/(float)(getTextureHeight()-1))); glyph->setMaxTexCoord(osg::Vec2((float)(posX+glyph->s()-_margin)/(float)(getTextureWidth()-1),(float)(posY+glyph->t()-_margin)/(float)(getTextureHeight()-1))); }