The IFont resource object interface.
More...
#include "murl_resource_i_font.h"
The IFont resource object interface.
A font resource can either store a number of individual glyph rectangles referencing sub-regions of a Resource::IImage in order to render bitmap fonts, or a number of glyph outlines for rendering vector fonts on the fly (without the need of a Resource::IImage). Note, that bitmap font rendering works similar to using a Resource::IAtlas, in that the font resource does not store the actual glyph bitmaps. A corresponding Resource::IImage must be active during rendering e.g. a Graph::ITextGeometry object to produce the correct output.
◆ GetObjectInterface() [1/2]
virtual IObject* Murl::Resource::IFont::GetObjectInterface |
( |
| ) |
|
|
pure virtual |
◆ GetObjectInterface() [2/2]
virtual const IObject* Murl::Resource::IFont::GetObjectInterface |
( |
| ) |
const |
|
pure virtual |
◆ GetScaleFactor()
virtual Real Murl::Resource::IFont::GetScaleFactor |
( |
| ) |
const |
|
pure virtual |
Get the font's scale factor.
- Returns
- The scale factor.
◆ GetSizeY()
virtual Real Murl::Resource::IFont::GetSizeY |
( |
| ) |
const |
|
pure virtual |
Get the font's vertical line size.
- Returns
- The vertical line size.
◆ GetBaseLine()
virtual Real Murl::Resource::IFont::GetBaseLine |
( |
| ) |
const |
|
pure virtual |
Get the font's base line offset.
- Returns
- The base line offset.
◆ GetAscent()
virtual Real Murl::Resource::IFont::GetAscent |
( |
| ) |
const |
|
pure virtual |
Get the font's ascent.
- Returns
- The ascent.
◆ GetDescent()
virtual Real Murl::Resource::IFont::GetDescent |
( |
| ) |
const |
|
pure virtual |
Get the font's descent.
- Returns
- The descent.
◆ GetSpacing()
virtual Real Murl::Resource::IFont::GetSpacing |
( |
| ) |
const |
|
pure virtual |
Get the font spacing, i.e.
the horizontal distance between glyphs.
- Returns
- The spacing value.
◆ GetLeading()
virtual Real Murl::Resource::IFont::GetLeading |
( |
| ) |
const |
|
pure virtual |
Get the font leading, i.e.
the vertical distance between lines.
- Returns
- The leading value.
◆ GetSpaceWidth()
virtual Real Murl::Resource::IFont::GetSpaceWidth |
( |
| ) |
const |
|
pure virtual |
Get the horizontal size of the whitespace character.
- Returns
- The whitespace width.
◆ GetDigitWidth()
virtual Real Murl::Resource::IFont::GetDigitWidth |
( |
| ) |
const |
|
pure virtual |
Get the common horizontal size of all digits.
- Returns
- The digit width.
◆ GetOffsetX()
virtual Real Murl::Resource::IFont::GetOffsetX |
( |
| ) |
const |
|
pure virtual |
Get the horizontal screen offset for rendering.
- Returns
- The horizontal offset.
◆ GetOffsetY()
virtual Real Murl::Resource::IFont::GetOffsetY |
( |
| ) |
const |
|
pure virtual |
Get the vertical screen offset for rendering.
- Returns
- The vertical offset.
◆ HasRectangles()
virtual Bool Murl::Resource::IFont::HasRectangles |
( |
| ) |
const |
|
pure virtual |
Check if the font resource contains bitmap glyph rectangles.
- Returns
- true if present.
◆ GetNumberOfRectangles()
virtual UInt32 Murl::Resource::IFont::GetNumberOfRectangles |
( |
| ) |
const |
|
pure virtual |
Get the actual number of bitmap glyph rectangles contained in the font.
- Returns
- The number of rectangles.
◆ GetRectangleByIndex()
virtual const IRectangle* Murl::Resource::IFont::GetRectangleByIndex |
( |
UInt32 |
index | ) |
const |
|
pure virtual |
Get a bitmap glyph rectangle by its index.
- Parameters
-
- Returns
- A pointer to the glyph's rectangle, or null if index is out of range.
◆ GetRectangleByCode()
virtual const IRectangle* Murl::Resource::IFont::GetRectangleByCode |
( |
UInt32 |
charCode | ) |
const |
|
pure virtual |
Get a bitmap glyph rectangle for a given Unicode value.
- Parameters
-
charCode | The Unicode value to query. |
- Returns
- A pointer to the glyph's rectangle, or null if not found.
◆ HasOutlines()
virtual Bool Murl::Resource::IFont::HasOutlines |
( |
| ) |
const |
|
pure virtual |
Check if the font resource contains glyph outlines.
- Returns
- true if present.
◆ GetNumberOfOutlines()
virtual UInt32 Murl::Resource::IFont::GetNumberOfOutlines |
( |
| ) |
const |
|
pure virtual |
Get the actual number of glyph outlines contained in the font.
- Returns
- The number of outlines.
◆ GetOutlineByIndex()
virtual const IOutline* Murl::Resource::IFont::GetOutlineByIndex |
( |
UInt32 |
index | ) |
const |
|
pure virtual |
Get a glyph outline by its index.
- Parameters
-
- Returns
- A pointer to the glyph's outline, or null if index is out of range.
◆ GetOutlineByCode()
virtual const IOutline* Murl::Resource::IFont::GetOutlineByCode |
( |
UInt32 |
charCode | ) |
const |
|
pure virtual |
Get a glyph outline for a given Unicode value.
- Parameters
-
charCode | The Unicode value to query. |
- Returns
- A pointer to the glyph's outline, or null if not found.
◆ HasKerning()
virtual Bool Murl::Resource::IFont::HasKerning |
( |
| ) |
const |
|
pure virtual |
Check if the font resource contains kerning information.
- Returns
- true if present.
◆ GetKerningByCode()
virtual Real Murl::Resource::IFont::GetKerningByCode |
( |
UInt32 |
charCodeLeft, |
|
|
UInt32 |
charCodeRight |
|
) |
| const |
|
pure virtual |
Get the kerning offset for a pair of Unicode characters.
- Parameters
-
charCodeLeft | The Unicode value of the left character. |
charCodeRight | The Unicode value of the right character. |
- Returns
- The horizontal offset.
The documentation for this interface was generated from the following file: