LavaUI docs

struct ContentScale

Swift

struct ContentScale

Discrete UI text scale — bitmap fonts re-raster at fixed pixel sizes so Yoga measure and FreeType glyphs stay pixel-aligned (no GPU scale of atlas coverage).

Intended as a reusable policy object for a future declarative-UI package: apps bind shortcuts to zoomIn / zoomOut; layout hosts re-run after FontStore.apply.

Sources/LavaUI/Font.swift:841

Constructors

init(basePixelSize: Float = 16, multipliers: [Float] = ContentScale.defaultMultipliers, index: Int? = nil)

Not documented.

Sources/LavaUI/Font.swift:851

Properties

let basePixelSize: Float

Face size at multiplier 1.0.

Sources/LavaUI/Font.swift:849

var canZoomIn: Bool { get }

Not documented.

Sources/LavaUI/Font.swift:874

var canZoomOut: Bool { get }

Not documented.

Sources/LavaUI/Font.swift:875

static let defaultMultipliers: [Float]

Multipliers of the bootstrap base size (e.g. 16 → 12…32).

Sources/LavaUI/Font.swift:843

var index: Int { get }

Index into multipliers (clamped).

Sources/LavaUI/Font.swift:847

var multiplier: Float { get }

Not documented.

Sources/LavaUI/Font.swift:867

let multipliers: [Float]

Not documented.

Sources/LavaUI/Font.swift:845

var pixelSize: Float { get }

Integer FT pixel size for the active step (min 1).

Sources/LavaUI/Font.swift:870

Methods

@discardableResult mutating func reset() -> Bool

Not documented.

Sources/LavaUI/Font.swift:892

@discardableResult mutating func zoomIn() -> Bool

Not documented.

Sources/LavaUI/Font.swift:878

@discardableResult mutating func zoomOut() -> Bool

Not documented.

Sources/LavaUI/Font.swift:885