On this page:
Font
Font.kind
Font.name
Font.size
Font.in_  pixels
Font.style
Font.weight
Font.has_  underline
Font.smoothing
Font.hinting
Font.features
Font.Kind
Font.Style
Font.Weight
8.12

5 Font🔗ℹ

class

class Font():

  constructor (

    ~kind: kind :: Font.Kind = #'default,

    ~name: name :: maybe(String) = #false,

    ~size: size :: Real.in(0.0, 1024.0) = 12.0,

    ~in_pixels: in_pixels :: Any = #false,

    ~style: style :: Font.Style = #'normal,

    ~weight: weight :: Font.Weight = #'normal,

    ~has_underline: has_underline :: Any = #false,

    ~smoothing: smoothing :: Font.Smoothing = #'default,

    ~hinting: hinting :: Font.Hinting = #'aligned,

    ~features:

      features :: Map.of(Font.FeatureString, NonnegInt) = {},

  )

Creates a font configuration.

A font like an existing one can be constructed using with and the field names kind, name, size, in_pixels, style, weight, has_underline, smoothing, hinting, and features.

property

property (font :: Font).kind :: Font.Kind

 

property

property (font :: Font).name :: maybe(String)

 

property

property (font :: Font).size :: Real.in(0.0, 1024.0)

 

property

property (font :: Font).in_pixels :: Boolean

 

property

property (font :: Font).style :: Font.Style

 

property

property (font :: Font).weight :: Font.Weight

 

property

property (font :: Font).has_underline :: Boolean

 

property

property (font :: Font).smoothing :: Font.Smoothing

 

property

property (font :: Font).hinting :: Font.Hinting

 

property

property (font :: Font).features

  :: Map.of(Font.FeatureString, NonnegInt)

Propeties to access font components.

annotation

Font.Kind

Satisfied by the following symbols:

annotation

Font.Style

Satisfied by the following symbols:

annotation

Font.Weight

Satisfied by either an integer in 100 to 1000 (inclusive) or one of the following symbols: