toComposeTextStyle

fun <Error class: unknown class>.toComposeTextStyle(): TextStyle

Build a Compose TextStyle from a fully-resolved TextContext.

Useful from custom components registered via JoyDom's components map when they want to render text styled like a sibling joy-dom text node would be — call as node.style.text.toComposeTextStyle().


fun <Error class: unknown class>.toComposeTextStyle(resolveFontFamily: (String) -> FontFamily): TextStyle

toComposeTextStyle overload taking a custom font-family resolver — the renderer threads LocalJoyDomFontResolver here so a caller-supplied resolver (e.g. one that loads bundled faces) is honoured.