toUIFont

fun FontSpec.toUIFont(isBold: Boolean = false): UIFont

Converts this platform-agnostic FontSpec into a native iOS UIFont.

Attempts to load the design system's custom font families ("Outfit-Regular" or "Outfit-Bold") from the main bundle resources, falling back to the standard iOS system font if unavailable.

Return

The resolved native UIFont instance.

Parameters

isBold

If true, attempts to load the bold typeface, otherwise loads the regular typeface.