Urho3D
Public Member Functions | Private Member Functions | List of all members
Urho3D::FontFaceBitmap Class Reference

Bitmap font face description. More...

#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/UI/FontFaceBitmap.h>

Inheritance diagram for Urho3D::FontFaceBitmap:
Urho3D::FontFace Urho3D::RefCounted

Public Member Functions

 FontFaceBitmap (Font *font)
 Construct.
 
 ~FontFaceBitmap () override
 Destruct.
 
bool Load (const unsigned char *fontData, unsigned fontDataSize, float pointSize) override
 Load font face. More...
 
bool Load (FontFace *fontFace, bool usedGlyphs)
 Load from existed font face, pack used glyphs into smallest texture size and smallest number of texture.
 
bool Save (Serializer &dest, int pointSize, const String &indentation="\t")
 Save as a new bitmap font type in XML format. Return true if successful.
 
- Public Member Functions inherited from Urho3D::FontFace
 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 FontGlyphGetGlyph (c32 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 (c32 c, c32 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.
 
RefCountedoperator= (const RefCounted &rhs)=delete
 Prevent assignment.
 
void AddRef ()
 Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting.
 
void ReleaseRef ()
 Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting.
 
int Refs () const
 Return reference count.
 
int WeakRefs () const
 Return weak reference count.
 
RefCountRefCountPtr ()
 Return pointer to the reference count structure.
 

Private Member Functions

unsigned ConvertFormatToNumComponents (unsigned format)
 Convert graphics format to number of components.
 
SharedPtr< ImageSaveFaceTexture (Texture2D *texture)
 Save font face texture as image resource.
 
bool SaveFaceTexture (Texture2D *texture, const String &fileName)
 Save font face texture as image file.
 
void Blit (Image *dest, int x, int y, int width, int height, Image *source, int sourceX, int sourceY, int components)
 Blit.
 

Additional Inherited Members

- Protected Member Functions inherited from Urho3D::FontFace
SharedPtr< Texture2DCreateFaceTexture ()
 Create a texture for font rendering.
 
SharedPtr< Texture2DLoadFaceTexture (const SharedPtr< Image > &image)
 Load font face texture from image resource.
 
- Protected Attributes inherited from Urho3D::FontFace
Fontfont_ {}
 Parent font.
 
HashMap< c32, FontGlyphglyphMapping_
 Glyph mapping.
 
HashMap< u32, float > kerningMapping_
 Kerning mapping.
 
Vector< SharedPtr< Texture2D > > textures_
 Glyph texture pages.
 
float pointSize_ {}
 Point size.
 
float rowHeight_ {}
 Row height.
 

Detailed Description

Bitmap font face description.

Member Function Documentation

◆ Load()

bool Urho3D::FontFaceBitmap::Load ( const unsigned char *  fontData,
unsigned  fontDataSize,
float  pointSize 
)
overridevirtual

Load font face.

Implements Urho3D::FontFace.


The documentation for this class was generated from the following files: