Skip to main content

LetterSpacing

Overrides the default letter spacing inherited by descendent components with text.

Introduced in Kontakt 8.11.

modifier LetterSpacing
import { LetterSpacing, Text, VStack } from ui

export var main = VStack {
Text("Default")

VStack {
Text("Wide spacing")
Text("Wide spacing")
} with {
LetterSpacing(3.0)
}
}

Constructors

(_ spacing)

_ spacing: Float?

An optional letter spacing in pixels. Can be negative to tighten character spacing. To let text inherit the default letter spacing defined above this modifier provide nil.