Open
Conversation
16688d6 to
a53e063
Compare
|
@mfazekas thank you! |
a53e063 to
64ab88b
Compare
64ab88b to
cfe8e4e
Compare
HayesGordon
reviewed
Feb 25, 2026
| @@ -1,6 +0,0 @@ | |||
| import type { HybridObject } from 'react-native-nitro-modules'; | |||
|
|
|||
| export interface Rive | |||
Contributor
There was a problem hiding this comment.
Ah this lasted long :)
I figured eventually this would get extended in some way
dskuza
reviewed
Feb 25, 2026
dskuza
reviewed
Feb 25, 2026
88a361d to
ca4786f
Compare
Replace separate addFallbackFont/addFallbackFontFromResource/addFallbackFontFromURL with a single addFallbackFont(source: FontSource) that accepts require() IDs, URI objects, resource names, URLs, or raw ArrayBuffer bytes. All methods are now async. Renamed native HybridObject from Rive to RiveFontConfig to better reflect its purpose.
The font file existed in example/ios/ but wasn't referenced in the Xcode project, so addFallbackFontFromResource couldn't find it at runtime.
Prevents "Cannot set value for property" error on initial render when the riv file hasn't loaded yet.
This reverts commit 16688d6.
…s API
Adds `{ name: string }` to FontSource for system fonts (e.g. `{ name: 'Thonburi' }` on iOS,
`{ name: 'serif' }` on Android). Renames `addFallbackFont` to `addFallbackFonts` accepting
an array to make font ordering explicit and avoid sequential awaits.
Separate font loading from configuration — loadFont() returns opaque FallbackFont handles, setFallbackFonts() accepts a weight-keyed map. System fonts always appended as last resort.
42eb65e to
7ac409b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
RiveFonts— font fallback API for react-native. Two-phase design: load fonts into opaque handles, then configure a weight-based fallback map. System fonts are always appended as last resort.How to test
Open the Font Fallback exerciser in the example app (
Exercisers > Font Fallback).1. System defaults only — tap "Mount View" without selecting any fonts, use text presets (Latin / CJK / Thai / Arabic / Mixed) — all should render via system fallback.
2. URL font — unmount & reset, select "Kanit (URL)", wait for download checkmark, mount — Latin/Thai render in Kanit, CJK/Arabic fall back to system.
3. Bundled resource font — unmount & reset, select "Kanit (Bundled)", mount — same result from native bundle.
4. System font by name — select "Thonburi (System)" on iOS or "serif (System)" on Android, mount with Thai text.
5. Multiple fonts — select both Kanit + Noto Serif Thai, mount, test Mixed preset for multi-script rendering.