Font interface.
Infos | |
| virtual iHString * | GetName () const =0 |
| Get the name of the font. {Property}. More... | |
| virtual iHString * | GetFamilyName () const =0 |
| Get the family name of the font. {Property}. More... | |
| virtual iHString * | GetStyleName () const =0 |
| Get the style name of the font. {Property}. More... | |
| virtual iHString * | GetFilePath () const =0 |
| Get the file path of the font. {Property}. More... | |
| virtual tBool | GetIsFixedResolution () const =0 |
| Return eTrue if the pixel size if fixed. More... | |
| virtual tBool | GetHasKerning () const =0 |
| Return eTrue if the font has kerning informations. {Property}. More... | |
| virtual tU32 | GetMaxResolution () const =0 |
| Return the maximum pixel size. {Property}. More... | |
| virtual tBool | GetIsInstance () const =0 |
| Return eTrue if this font is an instance. {Property}. More... | |
Instance | |
| virtual iFont * | CreateFontInstance (iMaterial *apMaterial)=0 |
| Create an instance of this font. More... | |
Rendering parameters | |
| virtual void | SetTabSize (tU32 ulNumChar)=0 |
| Set the tabulation size. {Property}. More... | |
| virtual tU32 | GetTabSize () const =0 |
| Get the tabulation size. {Property}. More... | |
| virtual void | SetFiltering (tBool abLinear)=0 |
| Set the filtering mode. {Property}. More... | |
| virtual tBool | GetFiltering () const =0 |
| Get the filtering mode. {Property}. More... | |
| virtual void | SetColor (tU32 anColor)=0 |
| Set the default font color. {Property}. More... | |
| virtual tU32 | GetColor () const =0 |
| Get the default font color. {Property}. More... | |
| virtual void | SetBlendMode (eBlendMode aMode)=0 |
| Set the blending mode. {Property}. More... | |
| virtual eBlendMode | GetBlendMode () const =0 |
| Get the blending mode. {Property}. More... | |
| virtual void | SetSizeAndResolution (const sVec2f &avSize, const tU32 anResolution)=0 |
| Set the character rendering size and resolution. More... | |
| virtual tU32 | GetResolution () const =0 |
| Get the character's resolution. {Property}. More... | |
| virtual sVec2f | GetSize () const =0 |
| Get the character rendering size. {Property}. More... | |
| virtual void | SetDistanceField (tBool abDistanceField)=0 |
| Set whether the glyphs are using a distance field. {Property}. More... | |
| virtual tBool | GetDistanceField () const =0 |
| Get whether the glyphs are using a distance field. {Property}. More... | |
Metrics | |
| virtual tF32 | GetCharWidth (tU32 c) const =0 |
| Return the width of a character. More... | |
| virtual tF32 | GetCharHeight (tU32 c) const =0 |
| Return the height of a character. More... | |
| virtual tF32 | GetMaxCharWidth () const =0 |
| Return the maximum char width. {Property}. More... | |
| virtual tF32 | GetMaxCharHeight () const =0 |
| Return the maximum char height. {Property}. More... | |
| virtual tF32 | GetAverageCharWidth () const =0 |
| Return the average char width. More... | |
| virtual tF32 | GetAverageCharHeight () const =0 |
| Return the average char height. More... | |
| virtual tF32 | GetAscent () const =0 |
| Get the ascent (units above the base line) of characters. {Property}. More... | |
| virtual tF32 | GetDescent () const =0 |
| Get the descent (units below the base line) of characters. {Property}. More... | |
| virtual tF32 | GetInternalLeading () const =0 |
| Specifies the amount of leading (space) inside the bounds set by the height of the font. Accent marks and other diacritical characters may occur in this area. Might be zero. {Property}. More... | |
| virtual tF32 | GetLineGap () const =0 |
| The distance that must be placed between two lines of text. (also called External Leading) Might be zero. {Property}. More... | |
| virtual tF32 | GetHeight () const =0 |
| Get the height of a line (ascent + descent + linegap). {Property}. More... | |
| virtual tU32 | GetFirstChar () const =0 |
| Get the value of the first character defined in the font. {Property}. More... | |
| virtual tU32 | GetLastChar () const =0 |
| Get the value of the last character defined in the font. {Property}. More... | |
| virtual tF32 | GetAdvance (tU32 anChar) const =0 |
| Get the advance for the specified character. More... | |
| virtual tF32 | GetKerning (tU32 anPrevChar, tU32 anChar) const =0 |
| Get the kerning for the specified character. More... | |
Material and glyph cache | |
| virtual tBool | UpdateMaterial (tBool abUpdateMaterialStates)=0 |
| Update the font's material. More... | |
| virtual tBool | CacheText (const achar *aaszText)=0 |
| Cache the caracters contained in the passed string. More... | |
| virtual tBool | CacheRange (tU32 anFirst, tU32 anLast)=0 |
| Cache a range of character. More... | |
| virtual tBool | ClearCache ()=0 |
| Clear the glyph and texture caches. More... | |
| virtual tIntPtr | GetCacheID () const =0 |
| Get the ID of the current cache. {Property}. More... | |
| virtual iMaterial * | GetMaterial () const =0 |
| Get the material used for the font's rendering. {Property}. More... | |
| virtual sRectf | GetCharTexCoo (tU32 c)=0 |
| Get the texture coordinate of a character. {Property}. More... | |
| virtual iTexture * | GetCharTexture (tU32 anChar) const =0 |
| Get the texture in which the specified glyph is cached. {Property}. More... | |
| virtual iBitmap2D * | GetCharBitmap (tU32 anChar) const =0 |
| Get the bitmaps in which the specified glyph is cached. {Property}. More... | |
Bitmap drawing | |
| virtual sVec2i | BlitChar (iBitmap2D *apBmp, tI32 anX, tI32 anY, tU32 anChar)=0 |
| Blit a character to the specified bitmap using the pixel size. More... | |
| virtual sVec2i | BlitCharStretch (iBitmap2D *apBmp, tI32 anX, tI32 anY, tU32 anChar)=0 |
| Blit a character to the specified bitmap to the current font size. More... | |
| virtual sVec2i | BlitCharEx (iBitmap2D *apBmp, tI32 anX, tI32 anY, tI32 anW, tI32 anH, tU32 anChar, eBlendMode aBlendMode)=0 |
| Blit a character to the specified bitmap with the specified size and blend mode. More... | |
Canvas drawing | |
| virtual sRectf | ComputeTextSize (const sRectf &aRect, const achar *aaszText, tFontFormatFlags aFormat)=0 |
| Compute text size in pixels. More... | |
| virtual sRectf | DrawText (ni::iCanvas *apCanvas, const sRectf &aposRect, tF32 afZ, const achar *aaszText, tFontFormatFlags aFormat)=0 |
| Draw text layed out in the specified rectangle. More... | |
Additional Inherited Members | |
Public Member Functions inherited from iUnknown | |
| virtual tBool | IsOK () const =0 |
| Check if the object is valid. More... | |
| virtual tI32 | AddRef ()=0 |
| Signal that one more reference of the object has been created. More... | |
| virtual tI32 | Release ()=0 |
| Release a reference of the object. More... | |
| virtual void | DeleteThis ()=0 |
| Bypass any reference counting and delete this object. More... | |
| virtual void | Invalidate ()=0 |
| Invalidate the object. More... | |
| virtual iUnknown * | QueryInterface (const tUUID &aIID)=0 |
| Query an interface. More... | |
| virtual void | ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0 |
| Fill a UUID list containing the UUIDs of the implemented interfaces. More... | |
| virtual tI32 | SetNumRefs (tI32 anNumRefs)=0 |
| Set the reference counter directly. More... | |
| virtual tI32 | GetNumRefs () const =0 |
| Get the number of references to this object. More... | |
|
pure virtual |
Get the name of the font. {Property}.
|
pure virtual |
Get the family name of the font. {Property}.
|
pure virtual |
Get the style name of the font. {Property}.
|
pure virtual |
Get the file path of the font. {Property}.
|
pure virtual |
Return eTrue if the pixel size if fixed.
|
pure virtual |
Return eTrue if the font has kerning informations. {Property}.
|
pure virtual |
Return the maximum pixel size. {Property}.
|
pure virtual |
Return eTrue if this font is an instance. {Property}.
Create an instance of this font.
| apMaterial | is the material that the font will use instead of creating its own. |
|
pure virtual |
Get the tabulation size. {Property}.
|
pure virtual |
Get the filtering mode. {Property}.
|
pure virtual |
Get the default font color. {Property}.
|
pure virtual |
Set the blending mode. {Property}.
|
pure virtual |
Get the blending mode. {Property}.
Set the character rendering size and resolution.
|
pure virtual |
Get the character's resolution. {Property}.
|
pure virtual |
Get the character rendering size. {Property}.
Set whether the glyphs are using a distance field. {Property}.
|
pure virtual |
Get whether the glyphs are using a distance field. {Property}.
Return the width of a character.
Return the height of a character.
|
pure virtual |
Return the maximum char width. {Property}.
|
pure virtual |
Return the maximum char height. {Property}.
|
pure virtual |
Return the average char width.
|
pure virtual |
Return the average char height.
|
pure virtual |
Get the ascent (units above the base line) of characters. {Property}.
|
pure virtual |
Get the descent (units below the base line) of characters. {Property}.
|
pure virtual |
Specifies the amount of leading (space) inside the bounds set by the height of the font. Accent marks and other diacritical characters may occur in this area. Might be zero. {Property}.
|
pure virtual |
The distance that must be placed between two lines of text. (also called External Leading) Might be zero. {Property}.
|
pure virtual |
Get the height of a line (ascent + descent + linegap). {Property}.
|
pure virtual |
Get the value of the first character defined in the font. {Property}.
|
pure virtual |
Get the value of the last character defined in the font. {Property}.
Get the advance for the specified character.
Get the kerning for the specified character.
Update the font's material.
| abUpdateMaterialStates | if true the states will set otherwise only the material's base channel texture is set to the current glyph cache's texture. |
Cache the caracters contained in the passed string.
Cache a range of character.
|
pure virtual |
Clear the glyph and texture caches.
|
pure virtual |
Get the ID of the current cache. {Property}.
|
pure virtual |
Get the material used for the font's rendering. {Property}.
Get the texture coordinate of a character. {Property}.
Get the texture in which the specified glyph is cached. {Property}.
Get the bitmaps in which the specified glyph is cached. {Property}.
Blit a character to the specified bitmap using the pixel size.
Blit a character to the specified bitmap to the current font size.
|
pure virtual |
Blit a character to the specified bitmap with the specified size and blend mode.
|
pure virtual |
Compute text size in pixels.
| aRect | If not Null the rectangle will be used as 'target' box where the text should be drawn, the compted text will take into account word wrapping, etc. in that box. |
| aaszText | is the text to compute the size of. |
| aFormat | if 0 the format flags set is used, else the specified format is used. |
|
pure virtual |
Draw text layed out in the specified rectangle.
1.8.7