klyn.gui.windows.themes.ThemeManager.scaleAdaptiveFont
method

    public static scaleAdaptiveFont(font as String) as String:

Description

Scales a painter font with the same display and content factors as a KSS font.

Use this method when a custom-painted widget must visually match themed controls such as menu bars. The display factor is cached because this method can be called from a rendering hot path.

Parameters

Parameter | Description
--- | ---
`font` | Font specification to scale.

Returns

Font specification adapted to the display and current zoom.

Example

    painter.font = ThemeManager.scaleAdaptiveFont("17px Cascadia Mono, monospace")