The IFont resource object interface. More...

#include "murl_resource_i_font.h"

Inheritance diagram for Murl::Resource::IFont:

Classes

struct  Iff
 IFF file specific structs. More...
 
struct  Raw
 Raw data structs. More...
 

Public Member Functions

virtual IObjectGetObjectInterface ()=0
 Get the mutable Resource::IObject interface. More...
 
virtual const IObjectGetObjectInterface () const =0
 Get the constant Resource::IObject interface. More...
 
virtual Real GetScaleFactor () const =0
 Get the font's scale factor. More...
 
virtual Real GetSizeY () const =0
 Get the font's vertical line size. More...
 
virtual Real GetBaseLine () const =0
 Get the font's base line offset. More...
 
virtual Real GetAscent () const =0
 Get the font's ascent. More...
 
virtual Real GetDescent () const =0
 Get the font's descent. More...
 
virtual Real GetSpacing () const =0
 Get the font spacing, i.e. More...
 
virtual Real GetLeading () const =0
 Get the font leading, i.e. More...
 
virtual Real GetSpaceWidth () const =0
 Get the horizontal size of the whitespace character. More...
 
virtual Real GetDigitWidth () const =0
 Get the common horizontal size of all digits. More...
 
virtual Real GetOffsetX () const =0
 Get the horizontal screen offset for rendering. More...
 
virtual Real GetOffsetY () const =0
 Get the vertical screen offset for rendering. More...
 
virtual Bool HasRectangles () const =0
 Check if the font resource contains bitmap glyph rectangles. More...
 
virtual UInt32 GetNumberOfRectangles () const =0
 Get the actual number of bitmap glyph rectangles contained in the font. More...
 
virtual const IRectangleGetRectangleByIndex (UInt32 index) const =0
 Get a bitmap glyph rectangle by its index. More...
 
virtual const IRectangleGetRectangleByCode (UInt32 charCode) const =0
 Get a bitmap glyph rectangle for a given Unicode value. More...
 
virtual Bool HasOutlines () const =0
 Check if the font resource contains glyph outlines. More...
 
virtual UInt32 GetNumberOfOutlines () const =0
 Get the actual number of glyph outlines contained in the font. More...
 
virtual const IOutlineGetOutlineByIndex (UInt32 index) const =0
 Get a glyph outline by its index. More...
 
virtual const IOutlineGetOutlineByCode (UInt32 charCode) const =0
 Get a glyph outline for a given Unicode value. More...
 
virtual Bool HasKerning () const =0
 Check if the font resource contains kerning information. More...
 
virtual Real GetKerningByCode (UInt32 charCodeLeft, UInt32 charCodeRight) const =0
 Get the kerning offset for a pair of Unicode characters. More...
 

Detailed Description

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.

Member Function Documentation

◆ GetObjectInterface() [1/2]

virtual IObject* Murl::Resource::IFont::GetObjectInterface ( )
pure virtual

Get the mutable Resource::IObject interface.

Returns
The IObject interface.

◆ GetObjectInterface() [2/2]

virtual const IObject* Murl::Resource::IFont::GetObjectInterface ( ) const
pure virtual

Get the constant Resource::IObject interface.

Returns
The IObject interface.

◆ 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
indexThe index in the range from 0 to GetNumberOfRectangles()-1.
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
charCodeThe 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
indexThe index in the range from 0 to GetNumberOfOutlines()-1.
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
charCodeThe 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
charCodeLeftThe Unicode value of the left character.
charCodeRightThe Unicode value of the right character.
Returns
The horizontal offset.

The documentation for this interface was generated from the following file:
  • murl_resource_i_font.h


Copyright © 2011-2018 Spraylight GmbH.