From Farshid Lashkari, "I need the ability to check for a font file without actually loading
the font object. I've modified font.h/cpp of osgText so that it exports the findFontFile function."
This commit is contained in:
parent
ddd609e37b
commit
b0d19b0b66
@ -57,7 +57,7 @@ enum KerningType
|
|||||||
* the file will be searched again in the OS specific directories.
|
* the file will be searched again in the OS specific directories.
|
||||||
*/
|
*/
|
||||||
extern OSGTEXT_EXPORT Font* readFontFile(const std::string& filename);
|
extern OSGTEXT_EXPORT Font* readFontFile(const std::string& filename);
|
||||||
|
extern OSGTEXT_EXPORT std::string findFontFile(const std::string& str);
|
||||||
|
|
||||||
/** Pure virtual base class for fonts.
|
/** Pure virtual base class for fonts.
|
||||||
* Concrete implementation are the DefaultFont found in src/osgText/DefaultFont.cpp
|
* Concrete implementation are the DefaultFont found in src/osgText/DefaultFont.cpp
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
using namespace osgText;
|
using namespace osgText;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
std::string findFontFile(const std::string& str)
|
std::string osgText::findFontFile(const std::string& str)
|
||||||
{
|
{
|
||||||
// try looking in OSGFILEPATH etc first for fonts.
|
// try looking in OSGFILEPATH etc first for fonts.
|
||||||
std::string filename = osgDB::findDataFile(str);
|
std::string filename = osgDB::findDataFile(str);
|
||||||
|
Loading…
Reference in New Issue
Block a user