From 81f93e34b82ded6e0c51c57f61e4cf132ef86294 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 30 Aug 2017 16:22:25 +0100 Subject: [PATCH] Added --interval value commnad line option for setting the Font::setGlyphInterval() to experimentation of clamping of glyph images to user specified intervals in the glyph texture --- examples/osgfont/osgfont.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/osgfont/osgfont.cpp b/examples/osgfont/osgfont.cpp index 5da7e495c..43a8653d5 100644 --- a/examples/osgfont/osgfont.cpp +++ b/examples/osgfont/osgfont.cpp @@ -66,6 +66,7 @@ struct TextSettings fontFilename("fonts/arial.ttf"), glyphImageMargin(1), glyphImageMarginRatio(0.02), + glyphInterval(1), textColor(1.0f, 1.0f, 1.0f, 1.0f), backdropType(osgText::Text::NONE), backdropOffset(0.04f, 0.04f), @@ -95,6 +96,7 @@ struct TextSettings if (arguments.read("--margin", glyphImageMargin)) {} if (arguments.read("--margin-ratio", glyphImageMarginRatio)) {} + if (arguments.read("--interval", glyphInterval)) {} if (arguments.read("--outline")) backdropType = osgText::Text::OUTLINE; @@ -122,6 +124,7 @@ struct TextSettings std::string fontFilename; unsigned int glyphImageMargin; float glyphImageMarginRatio; + int glyphInterval; osg::Vec4 textColor; osgText::Text::BackdropType backdropType;