Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
A font to be used with a Text renderable. More...
#include <Font.hpp>
Public Member Functions | |
~Font () | |
Destructor. More... | |
bool | operator< (const Font &other) const |
Less-than operator. More... | |
const String & | filePath () const |
The font's file path. More... | |
void | loadFont (const String &path) |
Loads a font using fileSystem()locateFile(). More... | |
int | size () const |
The size of the font. More... | |
void | setSize (int size) |
The size of the font. More... | |
Glyph * | glyph (int character) |
Returns (and eventually creates) the Glyph* associated to the given character. More... | |
void | setSmooth (bool smooth) |
Whether the font rendering should use linear filtering or not. More... | |
bool | smooth () const |
Whether the font rendering should use linear filtering or not. More... | |
void | releaseFreeTypeData () |
Releases the FreeType's FT_Face used by a Font. More... | |
void | setFontManager (FontManager *fm) |
The FontManager associated to this Font used to acquire/release FreeType resources. More... | |
const FontManager * | fontManager () const |
The FontManager associated to this Font used to acquire/release FreeType resources. More... | |
FontManager * | fontManager () |
The FontManager associated to this Font used to acquire/release FreeType resources. More... | |
bool | freeTypeLoadForceAutoHint () const |
Whether FT_Load_Char() should be called with FT_LOAD_FORCE_AUTOHINT (default) or FT_LOAD_DEFAULT. More... | |
void | setFreeTypLoadForceAutoHint (bool enable) |
Whether FT_Load_Char() should be called with FT_LOAD_FORCE_AUTOHINT (default) or FT_LOAD_DEFAULT. More... | |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Protected Attributes | |
FontManager * | mFontManager |
String | mFilePath |
std::map< int, ref< Glyph > > | mGlyphMap |
FT_Face | mFT_Face |
std::vector< char > | mMemoryFile |
int | mSize |
float | mHeight |
bool | mSmooth |
bool | mFreeTypeLoadForceAutoHint |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Friends | |
class | CoreText |
class | Text |
class | FontManager |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
vl::Font::~Font | ( | ) |
Destructor.
|
inline |
The font's file path.
Definition at line 161 of file Font.hpp.
Referenced by operator<(), and vl::VectorGraphics::setFont().
|
inline |
The FontManager associated to this Font used to acquire/release FreeType resources.
|
inline |
The FontManager associated to this Font used to acquire/release FreeType resources.
|
inline |
Glyph* vl::Font::glyph | ( | int | character | ) |
Returns (and eventually creates) the Glyph* associated to the given character.
void vl::Font::loadFont | ( | const String & | path | ) |
Loads a font using fileSystem()locateFile().
Referenced by vl::FontManager::acquireFont().
|
inline |
void vl::Font::releaseFreeTypeData | ( | ) |
Releases the FreeType's FT_Face used by a Font.
|
inline |
The FontManager associated to this Font used to acquire/release FreeType resources.
|
inline |
void vl::Font::setSize | ( | int | size | ) |
The size of the font.
Referenced by vl::FontManager::acquireFont().
void vl::Font::setSmooth | ( | bool | smooth | ) |
Whether the font rendering should use linear filtering or not.
Referenced by vl::FontManager::acquireFont().
|
inline |
The size of the font.
Definition at line 167 of file Font.hpp.
Referenced by operator<(), and vl::VectorGraphics::setFont().
|
inline |
Whether the font rendering should use linear filtering or not.
Definition at line 179 of file Font.hpp.
Referenced by vl::VectorGraphics::setFont().
|
friend |
|
protected |
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:08.
© Copyright Michele Bosi. All rights reserved.