Kanzi  3.9.7
Java API
FontStyleConceptMetadata Interface Reference

Metadata definitions for FontStyleConcept. More...

Inheritance diagram for FontStyleConceptMetadata:
[legend]

Public Attributes

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

Detailed Description

Metadata definitions for FontStyleConcept.

Member Data Documentation

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

Sets the character spacing in pixels.

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.

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.

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.
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 FontStyleConcept.

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

Sets the size of the font in pixels.

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.
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.Style", FontStyle.class)

Sets the style of the FontStyleConcept.

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

Sets the weight of the FontStyleConcept.