32 #ifndef Font_INCLUDE_ONCE 33 #define Font_INCLUDE_ONCE 62 VL_DEBUG_SET_OBJECT_NAME()
64 void operator=(
const Glyph&){}
67 Glyph():
mFont(
NULL),
mS0(0),
mT0(0),
mS1(0),
mT1(0),
mGlyphIndex(0),
mTextureHandle(0),
mWidth(0),
mHeight(0),
mLeft(0),
mTop(0) {}
86 float s0()
const {
return mS0; }
89 float t0()
const {
return mT0; }
92 float s1()
const {
return mS1; }
95 float t1()
const {
return mT1; }
155 return filePath() < other.
filePath();
157 return size() < other.
size();
164 void loadFont(
const String& path);
167 int size()
const {
return mSize; }
170 void setSize(
int size);
173 Glyph* glyph(
int character);
176 void setSmooth(
bool smooth);
182 void releaseFreeTypeData();
void setFreeTypLoadForceAutoHint(bool enable)
Whether FT_Load_Char() should be called with FT_LOAD_FORCE_AUTOHINT (default) or FT_LOAD_DEFAULT.
The FontManager class keeps a map associating a font path, size and smoothing flag to a Font object...
void setGlyphIndex(unsigned int glyph_index)
void setFontManager(FontManager *fm)
The FontManager associated to this Font used to acquire/release FreeType resources.
std::map< int, ref< Glyph > > mGlyphMap
A Renderable that renders text with a given Font.
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
A font to be used with a Text renderable.
The Glyph associated to a character of a given Font.
unsigned int textureHandle() const
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
bool mFreeTypeLoadForceAutoHint
Visualization Library main namespace.
int size() const
The size of the font.
FontManager * mFontManager
const fvec2 & advance() const
void setTextureHandle(unsigned int handle)
The base class for all the reference counted objects.
void setHeight(int height)
bool freeTypeLoadForceAutoHint() const
Whether FT_Load_Char() should be called with FT_LOAD_FORCE_AUTOHINT (default) or FT_LOAD_DEFAULT.
const String & filePath() const
The font's file path.
bool operator<(const Font &other) const
Less-than operator.
unsigned int glyphIndex() const
const FontManager * fontManager() const
The FontManager associated to this Font used to acquire/release FreeType resources.
#define VLGRAPHICS_EXPORT
unsigned int mTextureHandle
bool smooth() const
Whether the font rendering should use linear filtering or not.
void setAdvance(const fvec2 &advance)
struct FT_FaceRec_ * FT_Face
const Font * font() const
FontManager * fontManager()
The FontManager associated to this Font used to acquire/release FreeType resources.
std::vector< char > mMemoryFile