From 1d7222f59f3bc0942c235d8df89043ffa1d1bd55 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 22 Nov 2010 10:41:04 +0000 Subject: [PATCH] From Hartwig Wiesmann, fix to font search path under OSX. --- src/osgText/Font.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp index 0b289aade..66894c7d6 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -75,10 +75,14 @@ std::string osgText::findFontFile(const std::string& str) winFontPath += "\\fonts"; s_FontFilePath.push_back(winFontPath); } + #elif defined(__APPLE__) + osgDB::convertStringPathIntoFilePathList( + ".:/usr/share/fonts/ttf:/usr/share/fonts/ttf/western:/usr/share/fonts/ttf/decoratives:/Library/Fonts:/System/Library/Fonts", + s_FontFilePath); #else - osgDB::convertStringPathIntoFilePathList( - ".:/usr/share/fonts/ttf:/usr/share/fonts/ttf/western:/usr/share/fonts/ttf/decoratives", - s_FontFilePath); + osgDB::convertStringPathIntoFilePathList( + ".:/usr/share/fonts/ttf:/usr/share/fonts/ttf/western:/usr/share/fonts/ttf/decoratives", + s_FontFilePath); #endif }