Murl::Graph::ITextStyleFont Interface Referenceabstract

The ITextStyleFont graph node interface. More...

#include "murl_graph_i_text_style_font.h"

Inheritance diagram for Murl::Graph::ITextStyleFont:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual IFontResourceTargetGetFontResourceTarget ()=0
 Get a mutable Graph::IFontResourceTarget container. More...
 
virtual const IFontResourceTargetGetFontResourceTarget () const =0
 Get a constant Graph::IFontResourceTarget container. More...
 
virtual Bool SetFontSize (Real fontSize)=0
 Set the font size. More...
 
virtual Real GetFontSize () const =0
 Get the font size. More...
 
virtual Bool SetSpacing (Real spacing)=0
 Set the character spacing value. More...
 
virtual Real GetSpacing () const =0
 Get the character spacing value. More...
 
virtual Bool SetLeading (Real leading)=0
 Set the leading value. More...
 
virtual Real GetLeading () const =0
 Get the leading value. More...
 
virtual Bool SetAscent (Real ascent)=0
 Set the ascent value. More...
 
virtual Real GetAscent () const =0
 Get the ascent value. More...
 
virtual Bool SetDescent (Real descent)=0
 Set the descent value. More...
 
virtual Real GetDescent () const =0
 Get the descent value. More...
 
virtual Bool SetEmbolding (Real strength)=0
 Set the embolding strength value. More...
 
virtual Real GetEmbolding () const =0
 Get the embolding strength value. More...
 
virtual Bool SetSpaceWidthFactor (Real factor)=0
 Set the space width factor. More...
 
virtual Real GetSpaceWidthFactor () const =0
 Get the space width factor. More...
 
virtual Bool SetDigitWidthFactor (Real factor)=0
 Set the digit width factor. More...
 
virtual Real GetDigitWidthFactor () const =0
 Get the digit width factor. More...
 
virtual Bool SetSameDigitWidthEnabled (Bool enabled)=0
 Enable/disable unified digit width. More...
 
virtual Bool IsSameDigitWidthEnabled () const =0
 Check if unified digit width is enabled. More...
 
- Public Member Functions inherited from Murl::Graph::ITagged
virtual Bool SetStartTag (const String &tag)=0
 Set the start tag. More...
 
virtual const StringGetStartTag () const =0
 Get the start tag. More...
 
virtual Bool SetEndTag (const String &tag)=0
 Set the end tag. More...
 
virtual const StringGetEndTag () const =0
 Get the end tag. More...
 

Detailed Description

The ITextStyleFont graph node interface.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::ITextStyleFont::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::ITextStyleFont::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ GetFontResourceTarget() [1/2]

virtual IFontResourceTarget* Murl::Graph::ITextStyleFont::GetFontResourceTarget ( )
pure virtual

Get a mutable Graph::IFontResourceTarget container.

This method returns a mutable pointer to a Graph::IFontResourceTarget container, which allows to add, remove or query the font resources referenced by a node implementing this interface.

Returns
The mutable Graph::IFontResourceTarget container, or null if not available

◆ GetFontResourceTarget() [2/2]

virtual const IFontResourceTarget* Murl::Graph::ITextStyleFont::GetFontResourceTarget ( ) const
pure virtual

Get a constant Graph::IFontResourceTarget container.

This method returns a constant pointer to a Graph::IFontResourceTarget container, which allows to query the font resources referenced by a node implementing this interface.

Returns
The constant Graph::IFontResourceTarget container, or null if not available

◆ SetFontSize()

virtual Bool Murl::Graph::ITextStyleFont::SetFontSize ( Real  fontSize)
pure virtual

Set the font size.

Parameters
fontSizeThe font size in system units.
Returns
true if successful.

◆ GetFontSize()

virtual Real Murl::Graph::ITextStyleFont::GetFontSize ( ) const
pure virtual

Get the font size.

Returns
The font size in system units.

◆ SetSpacing()

virtual Bool Murl::Graph::ITextStyleFont::SetSpacing ( Real  spacing)
pure virtual

Set the character spacing value.

This method sets the character spacing used for output, i.e. the horizontal distance between neighbored characters. The given spacing value adds to the default value specified in the font used for rendering this text; a value of 0.0 represents the font's original spacing, a positive value increases the horizontal distance between characters, and a negative value decreases it.

Note: The given spacing value is not scaled by the font used; if e.g. a positive value is used for a large font, the same value used with a smaller version of that same font will result in a (relatively) larger distance between characters. It is however influenced by a possible additional scaling operation performed by a text rendering object.

Parameters
spacingThe character spacing value.
Returns
true if successful.

◆ GetSpacing()

virtual Real Murl::Graph::ITextStyleFont::GetSpacing ( ) const
pure virtual

Get the character spacing value.

Returns
The character spacing value.

◆ SetLeading()

virtual Bool Murl::Graph::ITextStyleFont::SetLeading ( Real  leading)
pure virtual

Set the leading value.

This method sets the leading value used for output, i.e. the vertical distance between subsequent text lines. The given leading value adds to the default value specified in the font used for rendering this text; a value of 0.0 represents the font's original leading, a positive value increases the vertical distance between lines, and a negative value decreases it.

Note: The given leading value is not scaled by the font used; if e.g. a positive value is used for a large font, the same value used with a smaller version of that same font will result in a (relatively) larger distance between lines. It is however influenced by a possible additional scaling operation performed by a text rendering object.

Parameters
leadingThe leading value.
Returns
true if successful.

◆ GetLeading()

virtual Real Murl::Graph::ITextStyleFont::GetLeading ( ) const
pure virtual

Get the leading value.

Returns
The leading value.

◆ SetAscent()

virtual Bool Murl::Graph::ITextStyleFont::SetAscent ( Real  ascent)
pure virtual

Set the ascent value.

Parameters
ascentThe ascent value.
Returns
true if successful.

◆ GetAscent()

virtual Real Murl::Graph::ITextStyleFont::GetAscent ( ) const
pure virtual

Get the ascent value.

Returns
The ascent value.

◆ SetDescent()

virtual Bool Murl::Graph::ITextStyleFont::SetDescent ( Real  descent)
pure virtual

Set the descent value.

Parameters
descentThe descent value.
Returns
true if successful.

◆ GetDescent()

virtual Real Murl::Graph::ITextStyleFont::GetDescent ( ) const
pure virtual

Get the descent value.

Returns
The descent value.

◆ SetEmbolding()

virtual Bool Murl::Graph::ITextStyleFont::SetEmbolding ( Real  strength)
pure virtual

Set the embolding strength value.

The embolding strength determines the "boldness" or "weight" of the font's rendered glyphs. Positive values result in thicker lines, and negative values can be used to make the font "thinner". Useful values are in the range from -1 to +1, but can also lie beyond that range.

Note that not all types of fonts allow glyph embolding. If not supported, this method returns false.

Parameters
strengthThe embolding strength value.
Returns
true if successful.

◆ GetEmbolding()

virtual Real Murl::Graph::ITextStyleFont::GetEmbolding ( ) const
pure virtual

Get the embolding strength value.

Returns
The embolding strength value.

◆ SetSpaceWidthFactor()

virtual Bool Murl::Graph::ITextStyleFont::SetSpaceWidthFactor ( Real  factor)
pure virtual

Set the space width factor.

This method sets a factor used to control the actual width of the white space character. In some cases, it is useful to manually control the space character's width, when a font's default space width produces too small or too big a distance between subsequent words. A space width factor of 1.0 represents the original width defined by the font used for rendering.

Parameters
factorThe space width factor.
Returns
true if successful.

◆ GetSpaceWidthFactor()

virtual Real Murl::Graph::ITextStyleFont::GetSpaceWidthFactor ( ) const
pure virtual

Get the space width factor.

Returns
The space width factor.

◆ SetDigitWidthFactor()

virtual Bool Murl::Graph::ITextStyleFont::SetDigitWidthFactor ( Real  factor)
pure virtual

Set the digit width factor.

This method sets a factor used to control the horizontal advance of all digit characters of a font ('0'-'9'). A digit width factor of 1.0 represents the original width defined by the font used for rendering.

Note, that this value only influences distance and not visual width; a value of e.g. 0.1 will result in overlapping digits without actually scaling them.

Parameters
factorThe digit width factor.
Returns
true if successful.

◆ GetDigitWidthFactor()

virtual Real Murl::Graph::ITextStyleFont::GetDigitWidthFactor ( ) const
pure virtual

Get the digit width factor.

Returns
The digit width factor.

◆ SetSameDigitWidthEnabled()

virtual Bool Murl::Graph::ITextStyleFont::SetSameDigitWidthEnabled ( Bool  enabled)
pure virtual

Enable/disable unified digit width.

For certain use cases, such as a score counter in an action game, it is useful to set a common width for all digits ('0'-'9'); doing so prevents the counter from jittering due to different digit widths.

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

◆ IsSameDigitWidthEnabled()

virtual Bool Murl::Graph::ITextStyleFont::IsSameDigitWidthEnabled ( ) const
pure virtual

Check if unified digit width is enabled.

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

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


Copyright © 2011-2024 Spraylight GmbH.