The font rendering class, see IFont. More...

#include "murl_util_font.h"

Inheritance diagram for Murl::Util::Font:

Public Member Functions

 Font (const Resource::IFont *resourceFont, Real size)
 Constructor taking a font resource and size. More...
 
virtual ~Font ()
 The destructor.
 
virtual Bool SetSize (Real size)
 Implementation of IFont::SetSize(). More...
 
virtual Real GetSize () const
 Implementation of IFont::GetSize(). More...
 
virtual Bool SetSpacing (Real spacing)
 Implementation of IFont::SetSpacing(). More...
 
virtual Real GetSpacing () const
 Implementation of IFont::GetSpacing(). More...
 
virtual Bool SetLeading (Real leading)
 Implementation of IFont::SetLeading(). More...
 
virtual Real GetLeading () const
 Implementation of IFont::GetLeading(). More...
 
virtual Bool SetEmbolding (Real strength)
 Implementation of IFont::SetEmbolding(). More...
 
virtual Real GetEmbolding () const
 Implementation of IFont::GetEmbolding(). More...
 
virtual Bool SetBlur (Real strength)
 Implementation of IFont::SetBlur(). More...
 
virtual Real GetBlur () const
 Implementation of IFont::GetBlur(). More...
 
virtual Bool SetSpaceWidthFactor (Real factor)
 Implementation of IFont::SetSpaceWidthFactor(). More...
 
virtual Real GetSpaceWidthFactor () const
 Implementation of IFont::GetSpaceWidthFactor(). More...
 
virtual Bool SetDigitWidthFactor (Real factor)
 Implementation of IFont::SetDigitWidthFactor(). More...
 
virtual Real GetDigitWidthFactor () const
 Implementation of IFont::GetDigitWidthFactor(). More...
 
virtual Bool SetSameDigitWidthEnabled (Bool enabled)
 Implementation of IFont::SetSameDigitWidthEnabled(). More...
 
virtual Bool IsSameDigitWidthEnabled () const
 Implementation of IFont::IsSameDigitWidthEnabled(). More...
 
virtual Bool RenderText (const String &text, const Color &textColor, const Color &backgroundColor, Bool clearSurface, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, IEnums::TextAlignmentX alignX, IEnums::TextAlignmentY alignY, IVideoSurface *surface) const
 Implementation of IFont::RenderText(). More...
 
virtual Bool QueryTextSize (const String &text, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, Real &textSizeX, Real &textSizeY) const
 Implementation of IFont::QueryTextSize(). More...
 
virtual void SetResourceFont (const Resource::IFont *resourceFont)
 Set the font resource. More...
 
virtual const Resource::IFontGetResourceFont () const
 Get the font resource. More...
 

Detailed Description

The font rendering class, see IFont.

Constructor & Destructor Documentation

◆ Font()

Murl::Util::Font::Font ( const Resource::IFont resourceFont,
Real  size 
)

Constructor taking a font resource and size.

Parameters
resourceFontThe font resource.
sizeThe size of the font.

Member Function Documentation

◆ SetSize()

virtual Bool Murl::Util::Font::SetSize ( Real  size)
virtual

Implementation of IFont::SetSize().

Parameters
sizeThe font size.
Returns
true if successful.

Implements Murl::IFont.

◆ GetSize()

virtual Real Murl::Util::Font::GetSize ( ) const
virtual

Implementation of IFont::GetSize().

Returns
The font size.

Implements Murl::IFont.

◆ SetSpacing()

virtual Bool Murl::Util::Font::SetSpacing ( Real  spacing)
virtual

Implementation of IFont::SetSpacing().

Parameters
spacingThe character spacing value.
Returns
true if successful.

Implements Murl::IFont.

◆ GetSpacing()

virtual Real Murl::Util::Font::GetSpacing ( ) const
virtual

Implementation of IFont::GetSpacing().

Returns
The character spacing value.

Implements Murl::IFont.

◆ SetLeading()

virtual Bool Murl::Util::Font::SetLeading ( Real  leading)
virtual

Implementation of IFont::SetLeading().

Parameters
leadingThe leading value.
Returns
true if successful.

Implements Murl::IFont.

◆ GetLeading()

virtual Real Murl::Util::Font::GetLeading ( ) const
virtual

Implementation of IFont::GetLeading().

Returns
The font leading value.

Implements Murl::IFont.

◆ SetEmbolding()

virtual Bool Murl::Util::Font::SetEmbolding ( Real  strength)
virtual

Implementation of IFont::SetEmbolding().

Parameters
strengthThe embolding strength value.
Returns
true if successful.

Implements Murl::IFont.

◆ GetEmbolding()

virtual Real Murl::Util::Font::GetEmbolding ( ) const
virtual

Implementation of IFont::GetEmbolding().

Returns
The embolding strength value.

Implements Murl::IFont.

◆ SetBlur()

virtual Bool Murl::Util::Font::SetBlur ( Real  strength)
virtual

Implementation of IFont::SetBlur().

Parameters
strengthThe positive blur strength value.
Returns
true if successful.

Implements Murl::IFont.

◆ GetBlur()

virtual Real Murl::Util::Font::GetBlur ( ) const
virtual

Implementation of IFont::GetBlur().

Returns
The blur strength value.

Implements Murl::IFont.

◆ SetSpaceWidthFactor()

virtual Bool Murl::Util::Font::SetSpaceWidthFactor ( Real  factor)
virtual

Implementation of IFont::SetSpaceWidthFactor().

Parameters
factorThe space width factor.
Returns
true if successful.

Implements Murl::IFont.

◆ GetSpaceWidthFactor()

virtual Real Murl::Util::Font::GetSpaceWidthFactor ( ) const
virtual

Implementation of IFont::GetSpaceWidthFactor().

Returns
The space width factor.

Implements Murl::IFont.

◆ SetDigitWidthFactor()

virtual Bool Murl::Util::Font::SetDigitWidthFactor ( Real  factor)
virtual

Implementation of IFont::SetDigitWidthFactor().

Parameters
factorThe digit width factor.
Returns
true if successful.

Implements Murl::IFont.

◆ GetDigitWidthFactor()

virtual Real Murl::Util::Font::GetDigitWidthFactor ( ) const
virtual

Implementation of IFont::GetDigitWidthFactor().

Returns
The digit width factor.

Implements Murl::IFont.

◆ SetSameDigitWidthEnabled()

virtual Bool Murl::Util::Font::SetSameDigitWidthEnabled ( Bool  enabled)
virtual

Implementation of IFont::SetSameDigitWidthEnabled().

Parameters
enabledIf true, all digits use the same horizontal advance value.
Returns
true if successful.

Implements Murl::IFont.

◆ IsSameDigitWidthEnabled()

virtual Bool Murl::Util::Font::IsSameDigitWidthEnabled ( ) const
virtual

Implementation of IFont::IsSameDigitWidthEnabled().

Returns
true if all digits use the same horizontal advance value.

Implements Murl::IFont.

◆ RenderText()

virtual Bool Murl::Util::Font::RenderText ( const String text,
const Color textColor,
const Color backgroundColor,
Bool  clearSurface,
Bool  enableWordWrap,
Real  containerPosX,
Real  containerPosY,
Real  containerSizeX,
Real  containerSizeY,
IEnums::TextAlignmentX  alignX,
IEnums::TextAlignmentY  alignY,
IVideoSurface surface 
) const
virtual

Implementation of IFont::RenderText().

Parameters
textThe text to render.
textColorThe text color to render.
backgroundColorThe text background color to render.
clearSurfaceIf true, the output surface is cleared before rendering.
enableWordWrapIf true, word wrapping is enabled.
containerPosXThe horizontal text position in the video stream.
containerPosYThe vertical text position in the video stream.
containerSizeXThe horizontal size of the text rectangle, or 0 if the video stream's X size should be used
containerSizeYThe vertical size of the text rectangle, or 0 if the video stream's Y size should be used
alignXThe horizontal text alignment.
alignYThe vertical text alignment.
surfaceThe destination video surface.
Returns
true if successful.

Implements Murl::IFont.

◆ QueryTextSize()

virtual Bool Murl::Util::Font::QueryTextSize ( const String text,
Bool  enableWordWrap,
Real  containerPosX,
Real  containerPosY,
Real  containerSizeX,
Real  containerSizeY,
Real textSizeX,
Real textSizeY 
) const
virtual

Implementation of IFont::QueryTextSize().

Parameters
textThe text to query.
enableWordWrapIf true, word wrapping is enabled.
containerPosXThe horizontal text position in the video stream.
containerPosYThe vertical text position in the video stream.
containerSizeXThe horizontal size of the text rectangle, or 0 if the video stream's X size should be used
containerSizeYThe vertical size of the text rectangle, or 0 if the video stream's Y size should be used
textSizeXThe text width return value.
textSizeYThe text height return value.
Returns
true if successful.

Implements Murl::IFont.

◆ SetResourceFont()

virtual void Murl::Util::Font::SetResourceFont ( const Resource::IFont resourceFont)
virtual

Set the font resource.

Parameters
resourceFontThe font resource.

◆ GetResourceFont()

virtual const Resource::IFont* Murl::Util::Font::GetResourceFont ( ) const
virtual

Get the font resource.

Returns
The font resource.

The documentation for this class was generated from the following file:
  • murl_util_font.h


Copyright © 2011-2018 Spraylight GmbH.