diff --git a/src/osgText/Glyph.cpp b/src/osgText/Glyph.cpp index efdf1cfb0..d418c5829 100644 --- a/src/osgText/Glyph.cpp +++ b/src/osgText/Glyph.cpp @@ -226,6 +226,8 @@ void GlyphTexture::copyGlyphImage(Glyph* glyph) float local_distance = sqrtf(float(radius*radius)+float(span*span)); if (center_value==0) local_distance += (0.5f-local_value_f)*local_multiplier; else local_distance += (local_value_f - 0.5f)*local_multiplier; + + if (local_distancecenter_value) + { + outline -= center_value; + } +#endif *(dest_ptr++) = outline; + outline_distance *= 2.0f; +#if 0 // compute the alpha vlaue of outline two texel thick outline = center_value; if (center_value<255) @@ -342,6 +365,21 @@ void GlyphTexture::copyGlyphImage(Glyph* glyph) else if (min_distancecenter_value) + { + outline -= center_value; + } +#endif *(dest_ptr++) = outline; // original alpha value from glyph image diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index e930386c2..3f102ea86 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -684,7 +684,7 @@ void Text::computeGlyphRepresentation() osg::Vec2 maxtc = glyph->getMaxTexCoord(); osg::Vec2 vDiff = maxtc - mintc; - float texelMargin = 4.0f; + float texelMargin = 5.0f; float fHorizTCMargin = texelMargin / glyph->getTexture()->getTextureWidth(); float fVertTCMargin = texelMargin / glyph->getTexture()->getTextureHeight();