Kanzi 3.9.10
FontStyleConceptMetadata Interface Reference

Metadata definitions for FontStyleConcept. More...

Inheritance diagram for FontStyleConceptMetadata:
[legend]

Public Attributes

DynamicPropertyType< FloatCharacterSpacingProperty
 Sets the character spacing in pixels.
 
DynamicPropertyType< FloatFixedCharacterWidthProperty
 When set, overrides the font advance widths to make each character take a fixed amount of space specified in pixels.
 
DynamicPropertyType< FontHintingPreferenceFontHintingPreferenceProperty
 Sets the hinting preference of the font.
 
DynamicPropertyType< BooleanFractionalCharacterWidthProperty
 Sets whether Kanzi uses fractional or rounded character widths to lay out text.
 
DynamicPropertyType< FloatLineSpacingProperty
 Sets the line spacing in multiples of the normal line height of the selected font.
 
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.FontStyleConcept")
 Metaclass for FontStyleConcept.
 
DynamicPropertyType< FloatSizeProperty
 Sets the size of the font in pixels.
 
DynamicPropertyType< BooleanSnapCharacterToPixelPropertyProperty
 Sets whether Kanzi positions characters in 2D rendering to the nearest pixel:
 
DynamicPropertyType< FontStyleStyleProperty
 Sets the style of the font.
 
DynamicPropertyType< FontWeightWeightProperty
 Sets the weight of the font.
 

Detailed Description

Metadata definitions for FontStyleConcept.

Member Data Documentation

◆ CharacterSpacingProperty

DynamicPropertyType<Float> CharacterSpacingProperty
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.CharacterSpacing", Float.class)

Sets the character spacing in pixels.

◆ FixedCharacterWidthProperty

DynamicPropertyType<Float> FixedCharacterWidthProperty
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.FixedCharacterWidth", Float.class)

When set, overrides the font advance widths to make each character take a fixed amount of space specified in pixels.

◆ FontHintingPreferenceProperty

DynamicPropertyType<FontHintingPreference> FontHintingPreferenceProperty
Initial value:
=
new DynamicPropertyType<>(
"FontStyleConcept.FontHintingPreference", FontHintingPreference.class)

Sets the hinting preference of the font.

  • No hinting: Render text without hinting the outlines of glyphs.
  • Native hinting: Prefer native hinter of the font over the auto-hinter of the rasterizer.
  • Auto hinting: Prefer auto-hinter of the rasterizer over the native hinter of the font.

Defined in ui/node/concept/font_style_concept.cpp as HintingPreferenceProperty.

◆ FractionalCharacterWidthProperty

DynamicPropertyType<Boolean> FractionalCharacterWidthProperty
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.FractionalCharacterWidth", Boolean.class)

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.

  • When enabled, Kanzi uses fractional character widths, which means that the spacing between characters varies and can be a fraction of a pixel.
  • When disabled, Kanzi uses character widths rounded to the nearest pixel. Disable fractional widths when you want to fix character spacing in whole-pixel increments and prevent characters in small font sizes from running together.

◆ LineSpacingProperty

DynamicPropertyType<Float> LineSpacingProperty
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.LineSpacing", Float.class)

Sets the line spacing in multiples of the normal line height of the selected font.

◆ SizeProperty

DynamicPropertyType<Float> SizeProperty
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.Size", Float.class)

Sets the size of the font in pixels.

◆ SnapCharacterToPixelPropertyProperty

DynamicPropertyType<Boolean> SnapCharacterToPixelPropertyProperty
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.SnapCharacterToPixelProperty", Boolean.class)

Sets whether Kanzi positions characters in 2D rendering to the nearest pixel:

  • When enabled, text sharpness improves, but some characters can shift a fraction of a pixel.
  • When disabled, certain combinations of screen resolution, use of anti-aliasing, and font size can cause the text to appear blurry. In that case, you can improve the appearance of the text with the Fractional Character Width and Character Spacing properties.

◆ StyleProperty

Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.Style", FontStyle.class)

Sets the style of the font.

◆ WeightProperty

Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.Weight", FontWeight.class)

Sets the weight of the font.