Skip to content

@modoki/engine / index / fontPathFromFamily

Function: fontPathFromFamily()

fontPathFromFamily(family): string | null

Reverse lookup: find a representative asset path for a given CSS family name. Deterministic — prefers the regular (weight 400 / normal style) variant, then a normal-style variant, otherwise the first registered. Returns null if not found.

Parameters

family

string

Returns

string | null

Built with Modoki.