Kanzi Framework  3.9.0
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< Integer > FontHintingPreferenceProperty
 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< Integer > StyleProperty
 Sets the style of the FontStyleConcept. More...
 
DynamicPropertyType< Integer > WeightProperty
 Sets the weight of the FontStyleConcept. More...
 

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<Integer> FontHintingPreferenceProperty
Initial value:
=
new DynamicPropertyType<>("FontStyleConcept.FontHintingPreference", Integer.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.

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

◆ 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

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

Sets the style of the FontStyleConcept.

◆ WeightProperty

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

Sets the weight of the FontStyleConcept.