getFontBytes

actual fun getFontBytes(fontFamily: FontFamily?, platformContext: Any?): ByteArray?

Get font bytes from FontFamily on Android. Supports:

  • Resource fonts (e.g. FontFamily(Font(R.font.my_font)))

  • System default fonts as fallback

expect fun getFontBytes(fontFamily: ERROR CLASS: Symbol not found for FontFamily??, platformContext: Any?): ByteArray?

Get font bytes from a FontFamily using platform-specific mechanisms.

Return

Font file bytes, or null if not available

Parameters

fontFamily

The font family to resolve

platformContext

Platform context (Context on Android, null elsewhere)

actual fun getFontBytes(fontFamily: FontFamily?, platformContext: Any?): ByteArray?

Get font bytes from FontFamily on JVM/Desktop. Supports:

  • Resource fonts from classpath

  • File-based fonts

  • System fonts as fallback