Fix for finding windows fonts.

This commit is contained in:
Robert Osfield
2002-05-10 15:42:27 +00:00
parent 0304b926d7
commit dd3603c9db

View File

@@ -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<char*>(osPath.c_str());
}
#endif
// else fallback into the standard font file paths.
if (s_FontFilePath)
{