diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp index b78a1d4f1..0d0ec5953 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -45,6 +45,16 @@ std::string findFontFile(const std::string& str) char* filename = osgDB::findFile(str.c_str()); if (filename) return std::string(filename); +#if defined(WIN32) + // try windir environment + char *ptr; + if ((ptr = getenv( "windir" ))) + { + static std::string osPath(ptr); + s_FontFilePath = const_cast(osPath.c_str()); + } +#endif + // else fallback into the standard font file paths. if (s_FontFilePath) {