From 149c04b0df37e605a94495363801eb518b58a059 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 31 Jul 2019 14:11:59 +0100 Subject: [PATCH] Added a _fontFallback to TextBase to cache any fallback font (usually DefaultFont) that is used when the Textbase::_font is null. --- CMakeLists.txt | 2 +- include/osgText/Text | 1 - include/osgText/TextBase | 1 + src/osgText/Text.cpp | 9 ++++----- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed72cb297..e0dddf8fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ SET(OPENSCENEGRAPH_MAJOR_VERSION 3) SET(OPENSCENEGRAPH_MINOR_VERSION 6) SET(OPENSCENEGRAPH_PATCH_VERSION 5) -SET(OPENSCENEGRAPH_SOVERSION 160) +SET(OPENSCENEGRAPH_SOVERSION 161) # set to 0 when not a release candidate, non zero means that any generated diff --git a/include/osgText/Text b/include/osgText/Text index e817f8d4d..5be160086 100644 --- a/include/osgText/Text +++ b/include/osgText/Text @@ -265,7 +265,6 @@ protected: virtual osg::StateSet* createStateSet(); Font* getActiveFont(); - const Font* getActiveFont() const; String::iterator computeLastCharacterOnLine(osg::Vec2& cursor, String::iterator first,String::iterator last); diff --git a/include/osgText/TextBase b/include/osgText/TextBase index aa7d8d64b..1611a785c 100644 --- a/include/osgText/TextBase +++ b/include/osgText/TextBase @@ -312,6 +312,7 @@ protected: // members which have public access. osg::Vec4 _color; osg::ref_ptr _font; + osg::ref_ptr _fontFallback; osg::ref_ptr