Kanzi  3.9.5
Kanzi Engine API
Text

Text nodes display and receive text input in the application. More...

Collaboration diagram for Text:

Classes

class  kanzi::BitmapFontFile
 Font implementation for bitmap fonts. More...
 
class  kanzi::BitmapFontLoader
 FontLoader implementation for bitmap fonts. More...
 
struct  kanzi::CharacterLayout
 Structure for layout of a single character for text rendering. More...
 
class  kanzi::FontEnginePlugin
 FontEnginePlugin is the interface definition for font engine plugins. More...
 
class  kanzi::FontFamily
 A font family resource contains font files. More...
 
class  kanzi::FontFile
 FontFile is the base class for different font file resource implementations. More...
 
class  kanzi::FontLoader
 Use FontLoader to create FontFile objects from memory or a file. More...
 
class  kanzi::FontManager
 Use the FontManager class to: More...
 
class  kanzi::FontRuntime
 Runtime font. More...
 
class  kanzi::FontStyleConcept
 FontStyleConcept is the base class for the nodes that draw text with different font styles. More...
 
class  kanzi::FontStyleConceptImpl< TDerivedClass >
 Implementation class for FontStyleConcept. More...
 
class  kanzi::FontStyleDefinition
 FontStyleDefinition provides a collection of font characteristics. More...
 
class  kanzi::FreeTypeFontEnginePlugin
 FreeTypeFontEnginePlugin is the FreeType font engine plugin implementation. More...
 
class  kanzi::FreeTypeFontFile
 Font implementation using the Freetype rasterizer. More...
 
class  kanzi::FreeTypeFontLoader
 FontLoader implementation for the Freetype rasterizer. More...
 
class  kanzi::FreeTypeTextShaper
 TextShaper implementation using these open source libraries: More...
 
class  kanzi::TextBlock2D
 Text Block 2D displays a small amount of text in 2D. More...
 
class  kanzi::TextBlock3D
 Text Block 3D displays a small amount of text in 3D. More...
 
class  kanzi::TextBlockConcept
 Base class for the Text Block nodes that you can use to show a small amount of text in your application. More...
 
class  kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >
 Implementation class for TextBlockConcept. More...
 
class  kanzi::TextBox2D
 TextBox2D provides the required overrides to handle 2D rendering and gesture handling for the 2D text input. More...
 
class  kanzi::TextBox3D
 TextBox3D provides the required overrides to handle 3D rendering and gesture handling for the 3D text input. More...
 
class  kanzi::TextBoxConcept
 Use the Text Box nodes to add single-line text input to your application. More...
 
class  kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >
 TextBoxConceptImpl is an abstract class for implementing the Text Box node concept. More...
 
class  kanzi::TextConcept
 TextConcept is the base class for the nodes that implement text rendering. More...
 
class  kanzi::TextConceptImpl< TDerivedClass >
 TextConceptImpl provides the common base implementation for text rendering nodes. More...
 
struct  kanzi::TextLayout
 Structure for layout of arbitrary number of characters for text rendering. More...
 

Functions

FontRuntimeSharedPtr kanzi::acquireFont (const Node &node)
 Gets a runtime font object. More...
 
tuple< FontRuntimeSharedPtr, bool > kanzi::acquireFont (const FontRuntimeSharedPtr &runtimeFont, const Node &node)
 Use this function to check whether a runtimeFont uses the font file and font style required to draw text with the property values of the node. More...
 

Detailed Description

Text nodes display and receive text input in the application.

Function Documentation

◆ acquireFont() [1/2]

FontRuntimeSharedPtr kanzi::acquireFont ( const Node node)

Gets a runtime font object.

You can use a runtime font object to draw text with the font characteristics determined by the property values of the node. You cannot modify a runtime font object. You must acquire a new runtime font object if any node properties, which determine font characteristics, change.

Parameters
nodeNode whose property values Kanzi uses to return the matching FontRuntime object.

◆ acquireFont() [2/2]

tuple<FontRuntimeSharedPtr, bool> kanzi::acquireFont ( const FontRuntimeSharedPtr runtimeFont,
const Node node 
)

Use this function to check whether a runtimeFont uses the font file and font style required to draw text with the property values of the node.

If the passed runtimeFont matches with the property values of the passed node, the function returns the passed runtimeFont. If the passed runtimeFont does not match with the property values of the passed node, Kanzi acquires a new font and returns it.

Returns
A tuple with:
  • The runtime font object.
  • If Kanzi acquires a new font object to match with current property values of the node, true, otherwise false.