|
OSGTEXT_EXPORT Font * | readFontFile (const std::string &filename, const osgDB::Options *userOptions=0) |
| Read a font from specified file. More...
|
|
OSGTEXT_EXPORT Font * | readFontStream (std::istream &stream, const osgDB::Options *userOptions=0) |
| read a font from specified stream. More...
|
|
OSGTEXT_EXPORT osg::ref_ptr< Font > | readRefFontFile (const std::string &filename, const osgDB::Options *userOptions=0) |
|
OSGTEXT_EXPORT osg::ref_ptr< Font > | readRefFontStream (std::istream &stream, const osgDB::Options *userOptions=0) |
|
OSGTEXT_EXPORT std::string | findFontFile (const std::string &str) |
|
Font * | readFont3DFile (const std::string &filename, const osgDB::ReaderWriter::Options *userOptions=0) |
| deprecated, use readFontFile() instead. More...
|
|
Font * | readFont3DStream (std::istream &stream, const osgDB::ReaderWriter::Options *userOptions=0) |
| deprecated, use readFontStream() instead. More...
|
|
osg::ref_ptr< Font > | readRefFont3DFile (const std::string &filename, const osgDB::ReaderWriter::Options *userOptions=0) |
| deprecated, use readRefFontFile() instead. More...
|
|
osg::ref_ptr< Font > | readRefFont3DStream (std::istream &stream, const osgDB::ReaderWriter::Options *userOptions=0) |
| deprecated, use readRefFontStream() instead. More...
|
|
std::string | findFont3DFile (const std::string &str) |
| deprecated, use findFontFile() instead. More...
|
|
The osgText library is a NodeKit that extends the core scene graph to support high quality text.
OSGTEXT_EXPORT Font* osgText::readFontFile |
( |
const std::string & |
filename, |
|
|
const osgDB::Options * |
userOptions = 0 |
|
) |
| |
Read a font from specified file.
The filename may contain a path. It will search for the font file in the following places in this order:
- In the current directory
- All paths defined in OSG_FILE_PATH or OSGFILEPATH environment variable
- Filename with path stripped: In the current directory
- Filename with path stripped: All paths defined in OSG_FILE_PATH or OSGFILEPATH
Then the file will be searched in OS specific directories in the following order:
- Again in the current directory
- Windows: In C:/winnt/fonts
- Windows: In C:/windows/fonts
- Windows: In the fonts directory of the windows install directory
- Other OS: In /usr/share/fonts/ttf
- Other OS: In /usr/share/fonts/ttf/western
- Other OS: In /usr/share/fonts/ttf/decoratives
If the given file could not be found, the path part will be stripped and the file will be searched again in the OS specific directories.