TextConcept is base class for nodes that implement text rendering. More...
#include <kanzi/ui/node/concept/text_block.hpp>
Public Types | |
enum | TextHorizontalAlignment { TextHorizontalAlignmentLeft, TextHorizontalAlignmentRight, TextHorizontalAlignmentCenter } |
Horizontal alignment options for text layout. More... | |
enum | TextVerticalAlignment { TextVerticalAlignmentTop, TextVerticalAlignmentBaseline, TextVerticalAlignmentCenter, TextVerticalAlignmentBottom } |
Vertical alignment options for text layout. More... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Attributes | |
Properties | |
static PropertyType< ColorRGBA > | FontColorProperty |
Use the Font Color property to set the text color for the default font material and for the materials with a fragment shader that uses the FontColor uniform. More... | |
static PropertyType< float > | FontSizeProperty |
Use the Font Size property to set the size of the font in device-independent pixels. More... | |
static PropertyType< ResourceSharedPtr > | FontMaterialProperty |
Use the Font Material property to set the material whose shader is used to render the text. More... | |
static PropertyType< TextBlockConcept::TextHorizontalAlignment > | TextHorizontalAlignmentProperty |
Use the Text Horizontal Alignment property to set the horizontal alignment of the text. More... | |
static PropertyType< TextBlockConcept::TextVerticalAlignment > | TextVerticalAlignmentProperty |
Use the Text Vertical Alignment property to set the vertical alignment of the text. More... | |
static PropertyType< float > | LineSpacingProperty |
Use the Line Spacing property to set the line spacing in multiples of the normal line height of the selected font. More... | |
static PropertyType< float > | CharacterSpacingProperty |
Use the Character Spacing property to set the character spacing in device-independent pixels. More... | |
static PropertyType< string > | OverflowProperty |
Use the Overflow property to set the characters that represent the clipped text when the text string to be rendered is too long to fit in the node. More... | |
static PropertyType< string > | TextProperty |
Use the Text property to set the text content that the text block renders. More... | |
static PropertyType< bool > | WordWrapProperty |
Use the Word Wrap property to break long text lines to multiple lines to make the text fit within the boundaries of the text block. More... | |
static PropertyType< bool > | ConstrainContentHeightProperty |
Use the Constrain Content Height property to cut out the last lines that do not fit within the boundaries of the text block. More... | |
static PropertyType< float > | FixedCharacterWidthProperty |
Use the Fixed Character Width property to override the font advance widths and make each character take a fixed amount of space specified in device-independent pixels. More... | |
static PropertyType< Vector2 > | HorizontalPaddingProperty |
Use the Horizontal Padding property to set the padding spaces between the content and the left and right boundaries of the text block. More... | |
static PropertyType< Vector2 > | VerticalPaddingProperty |
Use the Vertical Padding property to set the padding spaces between the content and the top and bottom boundaries of the text block. More... | |
static PropertyType< bool > | RemoveSideBearingsProperty |
Use the Remove Side Bearings property to position the leftmost characters of left-aligned text and rightmost characters of right-aligned text exactly within the boundary of the text block. More... | |
static PropertyType< bool > | FractionalCharacterWidthProperty |
Sets whether Kanzi uses fractional or rounded character widths to lay out text. More... | |
static PropertyType< bool > | SnapCharacterToPixelProperty |
Sets whether Kanzi positions characters in 2D rendering to the nearest pixel: More... | |
static PropertyType< FontHintingPreference > | HintingPreferenceProperty |
Sets the hinting preference of the selected font. More... | |
TextConcept is base class for nodes that implement text rendering.
Vertical alignment options for text layout.
|
static |
|
static |
Use the Font Color property to set the text color for the default font material and for the materials with a fragment shader that uses the FontColor uniform.
The default value is ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f).
|
static |
Use the Font Size property to set the size of the font in device-independent pixels.
The default value is 36.0f.
|
static |
Use the Font Material property to set the material whose shader is used to render the text.
The shader must use the ContentTexture uniform which is automatically filled with glyph data. The default value is ResourceSharedPtr().
|
static |
Use the Text Horizontal Alignment property to set the horizontal alignment of the text.
The default value is TextBlockConcept::TextHorizontalAlignmentLeft.
|
static |
Use the Text Vertical Alignment property to set the vertical alignment of the text.
The default value is TextBlockConcept::TextVerticalAlignmentTop.
|
static |
Use the Line Spacing property to set the line spacing in multiples of the normal line height of the selected font.
The default value is 1.0f.
|
static |
Use the Character Spacing property to set the character spacing in device-independent pixels.
The default value is 0.0f.
|
static |
Use the Overflow property to set the characters that represent the clipped text when the text string to be rendered is too long to fit in the node.
The default value is "...".
|
static |
Use the Text property to set the text content that the text block renders.
The default value is "Text".
|
static |
Use the Word Wrap property to break long text lines to multiple lines to make the text fit within the boundaries of the text block.
The default value is true.
|
static |
Use the Constrain Content Height property to cut out the last lines that do not fit within the boundaries of the text block.
The default value is true.
|
static |
Use the Fixed Character Width property to override the font advance widths and make each character take a fixed amount of space specified in device-independent pixels.
The default value is -1.0f.
|
static |
Use the Horizontal Padding property to set the padding spaces between the content and the left and right boundaries of the text block.
The default value is Vector2(0.0f, 0.0f).
|
static |
Use the Vertical Padding property to set the padding spaces between the content and the top and bottom boundaries of the text block.
The default value is Vector2(0.0f, 0.0f).
|
static |
Use the Remove Side Bearings property to position the leftmost characters of left-aligned text and rightmost characters of right-aligned text exactly within the boundary of the text block.
The default value is false.
|
static |
Sets whether Kanzi uses fractional or rounded character widths to lay out text.
In most cases fractional widths provide the best result. However, with small font sizes, fractional widths can cause the characters to run together or have too much space, making it difficult to read.
|
static |
Sets whether Kanzi positions characters in 2D rendering to the nearest pixel:
|
static |
Sets the hinting preference of the selected font.
The default value is FontHintingPreference::NativeHinting.