U3D
Open-source, cross-platform 2D and 3D game engine built in C++
|
Font face description. More...
#include </var/dev/u3d/stable/Source/Urho3D/UI/FontFace.h>
Public Member Functions | |
FontFace (Font *font) | |
Construct. | |
~FontFace () override | |
Destruct. | |
virtual bool | Load (const unsigned char *fontData, unsigned fontDataSize, float pointSize)=0 |
Load font face. More... | |
virtual const FontGlyph * | GetGlyph (unsigned c) |
Return pointer to the glyph structure corresponding to a character. Return null if glyph not found. More... | |
virtual bool | HasMutableGlyphs () const |
Return if font face uses mutable glyphs. More... | |
float | GetKerning (unsigned c, unsigned d) const |
Return the kerning for a character and the next character. | |
bool | IsDataLost () const |
Return true when one of the texture has a data loss. | |
float | GetPointSize () const |
Return point size. | |
float | GetRowHeight () const |
Return row height. | |
const Vector< SharedPtr< Texture2D > > & | GetTextures () const |
Return textures. | |
Public Member Functions inherited from Urho3D::RefCounted | |
RefCounted () | |
Construct. Allocate the reference count structure and set an initial self weak reference. | |
virtual | ~RefCounted () |
Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist. | |
RefCounted (const RefCounted &rhs)=delete | |
Prevent copy construction. | |
RefCounted & | operator= (const RefCounted &rhs)=delete |
Prevent assignment. | |
void | AddRef () |
void | ReleaseRef () |
int | Refs () const |
int | WeakRefs () const |
RefCount * | RefCountPtr () |
Return pointer to the reference count structure. | |
Protected Member Functions | |
SharedPtr< Texture2D > | CreateFaceTexture () |
Create a texture for font rendering. | |
SharedPtr< Texture2D > | LoadFaceTexture (const SharedPtr< Image > &image) |
Load font face texture from image resource. | |
Protected Attributes | |
Font * | font_ {} |
Parent font. | |
HashMap< unsigned, FontGlyph > | glyphMapping_ |
Glyph mapping. | |
HashMap< unsigned, float > | kerningMapping_ |
Kerning mapping. | |
Vector< SharedPtr< Texture2D > > | textures_ |
Glyph texture pages. | |
float | pointSize_ {} |
Point size. | |
float | rowHeight_ {} |
Row height. | |
Friends | |
class | Font |
class | FontFaceBitmap |
Font face description.
|
virtual |
Return pointer to the glyph structure corresponding to a character. Return null if glyph not found.
Reimplemented in Urho3D::FontFaceFreeType.
|
inlinevirtual |
Return if font face uses mutable glyphs.
Reimplemented in Urho3D::FontFaceFreeType.
|
pure virtual |
Load font face.
Implemented in Urho3D::FontFaceBitmap, and Urho3D::FontFaceFreeType.