Class FontStyleConceptMetadata

Defines properties and message types for FontStyleConcept.

Property Types

See also PropertyType
FontStyleConceptMetadata.SizeProperty

Sets the size of the font in pixels.

FontStyleConceptMetadata.StyleProperty

Sets the style of the font.

FontStyleConceptMetadata.WeightProperty

Sets the weight of the font.

FontStyleConceptMetadata.CharacterSpacingProperty

Sets the character spacing in pixels.

FontStyleConceptMetadata.FixedCharacterWidthProperty

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

FontStyleConceptMetadata.LineSpacingProperty

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

FontStyleConceptMetadata.FractionalCharacterWidthProperty

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.
FontStyleConceptMetadata.SnapCharacterToPixelPropertyProperty

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.
FontStyleConceptMetadata.FontHintingPreferenceProperty

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.

Message Types

See also MessageType

Message Arguments

Message arguments classes define message arguments used for different message types. Each class defines a number of property types - arguments - together with getter and setter functions for them.