Implementation class for FontStyleConcept. More...
#include <kanzi/ui/node/concept/font_style_concept.hpp>
Protected Member Functions | |
FontStyleConceptImpl ()=default | |
Constructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from kanzi::FontStyleConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Attributes inherited from kanzi::FontStyleConcept | |
static PropertyType< float > | SizeProperty |
Sets the size for the font in pixels. More... | |
static PropertyType< FontStyle > | StyleProperty |
Sets the style for the font. More... | |
static PropertyType< FontWeight > | WeightProperty |
Sets the weight for the font. More... | |
static PropertyType< float > | CharacterSpacingProperty |
Sets the character spacing in pixels. More... | |
static PropertyType< float > | FixedCharacterWidthProperty |
Overrides the font advance widths and makes each character take a fixed amount of space specified in pixels. More... | |
static PropertyType< float > | LineSpacingProperty |
Sets the line spacing in multiples of the normal line height of the selected font. 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... | |
Implementation class for FontStyleConcept.
|
explicitprotecteddefault |
Constructor.
bool kanzi::FontStyleConceptImpl< TDerivedClass >::updateRuntimeFont | ( | ) |
Updates the runtime font.
If FontStyleConceptImpl does not yet have a runtime font, fetches a new runtime font. In case runtime font does not match with the node properties, which determine the font characteristics, fetches a new runtime font.
FontRuntimeSharedPtr kanzi::FontStyleConceptImpl< TDerivedClass >::getRuntimeFont | ( | ) |
Gets the runtime font.
If FontStyleConceptImpl does not yet have a runtime font, fetches a new runtime font.
void kanzi::FontStyleConceptImpl< TDerivedClass >::releaseRuntimeFont | ( | ) |
Releases the runtime font that is held by FontStyleConceptImpl.
float kanzi::FontStyleConceptImpl< TDerivedClass >::getFontSize | ( | ) | const |
Gets the value of the FontStyleConcept::SizeProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setFontSize | ( | float | value | ) |
Sets the value of the FontStyleConcept::SizeProperty property.
value | The size of the font in pixels. |
FontStyle kanzi::FontStyleConceptImpl< TDerivedClass >::getFontStyle | ( | ) | const |
Gets the value of the FontStyleConcept::StyleProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setFontStyle | ( | FontStyle | style | ) |
Sets the value of the FontStyleConcept::StyleProperty property.
style | The requested style for the font file that Kanzi fetches from the selected font family. |
FontWeight kanzi::FontStyleConceptImpl< TDerivedClass >::getFontWeight | ( | ) | const |
Gets the value of the FontStyleConcept::WeightProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setFontWeight | ( | FontWeight | weight | ) |
Sets the value of the FontStyleConcept::WeightProperty property.
weight | The requested weight for the font file that Kanzi fetches from the selected font family. |
float kanzi::FontStyleConceptImpl< TDerivedClass >::getLineSpacing | ( | ) | const |
Gets the value of the FontStyleConcept::LineSpacingProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setLineSpacing | ( | float | value | ) |
Sets the value of the FontStyleConcept::LineSpacingProperty property.
value | The line spacing in multiples of the normal line height of the selected font. |
float kanzi::FontStyleConceptImpl< TDerivedClass >::getCharacterSpacing | ( | ) | const |
Gets the value of the FontStyleConcept::CharacterSpacingProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setCharacterSpacing | ( | float | value | ) |
Sets the value of the FontStyleConcept::CharacterSpacingProperty property.
value | The character spacing in pixels. |
float kanzi::FontStyleConceptImpl< TDerivedClass >::getFixedCharacterWidth | ( | ) | const |
Gets the value of the FontStyleConcept::FixedCharacterWidthProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setFixedCharacterWidth | ( | float | value | ) |
Sets the value of the FontStyleConcept::FixedCharacterWidthProperty property.
value | The fixed character width in pixels. |
bool kanzi::FontStyleConceptImpl< TDerivedClass >::getFractionalCharacterWidth | ( | ) | const |
Gets the value of the FontStyleConcept::FractionalCharacterWidthProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setFractionalCharacterWidth | ( | bool | enable | ) |
Sets the value of the FontStyleConcept::FractionalCharacterWidthProperty property.
enable | To enable fractional character width, set to true. |
bool kanzi::FontStyleConceptImpl< TDerivedClass >::getSnapCharacterToPixel | ( | ) | const |
Gets the value of the FontStyleConcept::SnapCharacterToPixelProperty property.
void kanzi::FontStyleConceptImpl< TDerivedClass >::setSnapCharacterToPixel | ( | bool | enable | ) |
Sets the value of the FontStyleConcept::SnapCharacterToPixelProperty property.
enable | To enable snap character to pixel, set to true. |
FontHintingPreference kanzi::FontStyleConceptImpl< TDerivedClass >::getHintingPreference | ( | ) | const |
void kanzi::FontStyleConceptImpl< TDerivedClass >::setHintingPreference | ( | FontHintingPreference | hintingPreference | ) |
Sets the value of HintingPreferenceProperty.
hintingPreference | The hinting preference of the font. |