diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp index 247668b3d..6a07c2a52 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -63,7 +63,7 @@ osgText::Font* osgText::readFontFile(const std::string& filename) std::string foundFile = findFontFile(filename); if (foundFile.empty()) return 0; - osg::Object* object = osgDB::readObjectFile(filename); + osg::Object* object = osgDB::readObjectFile(foundFile); // if the object is a font then return it. osgText::Font* font = dynamic_cast(object);