Skip to content

Expose fallback font configuration API for React Native (global runtime font fallback) #144

@edgarrii

Description

@edgarrii

Summary

Please expose a public fallback font configuration API for @rive-app/react-native (Nitro), so apps can reliably render non-Latin text (CJK, Arabic, Hebrew, Indic, etc.) without patching native internals.

Problem

In production apps, Rive text can render as missing glyphs ("tofu") when the active font does not include required character ranges.
Right now, there is no official React Native-level way to set a global fallback font in a predictable cross-platform way.

As a result, developers need to:

  • patch native package code,
  • manually probe platform font paths (Android),
  • or build app-specific hacks around runtime initialization.

This increases maintenance cost and creates fragile behavior across devices/OS versions.

Expected behavior

React Native users should have an official API to provide a fallback font (or ordered list of fallbacks) that the runtime uses for missing glyphs.

Proposed API (one possible direction)

Any equivalent design is fine, but something like this would solve the problem:

Why this matters

  • Correct multilingual rendering is a core requirement for global apps.
  • Eliminates need for local patches to Nitro wrapper internals.
  • Improves cross-platform parity and predictability.
  • Reduces first-frame localization glitches for dynamic text updates.

Current workaround (not ideal)

We currently patch native code to load a fallback font at startup.
It works for us, but this should be supported by public API instead of custom package patching.

Scope / acceptance criteria

  • Public RN API to configure fallback font(s).
  • Works on both iOS and Android.
  • Supports at least bundled app assets.
  • Behavior is documented (init timing, precedence, replacement/update semantics).
  • Includes an example in docs for multilingual text.

Additional note

If a global API is not preferred, an alternative per-view prop/API would also help, but global runtime config is likely the most practical default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions