Skip to content

fix: support Android font assets in Skia - #1473

Merged
dannyhw merged 3 commits into
callstack:mainfrom
whydidoo:fix/android-font-assets
Oct 2, 2026
Merged

dannyhw merged 3 commits into
callstack:mainfrom
whydidoo:fix/android-font-assets

Conversation

@whydidoo

@whydidoo whydidoo commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1472.

Skia loads bundled Android fonts from res/raw, while Re.Pack previously emitted them only to res/font.

  • Emit an additional res/raw copy for TTF, OTF, and TTC fonts, preserving existing R.font and XML font-family references.
  • Generate res/raw/keep.xml so resource shrinking preserves assets loaded by name from JavaScript.

Test plan

  • Tested real TTF, OTF, TTC fonts and images with Skia 2.11.2 on Android 13 and iOS 26.5 using Metro, Webpack, and Rspack 2.1.3.
  • Verified Android R.font and XML font-family references in release builds.
  • Verified resource shrinking with assets referenced only from JavaScript; removing keep.xml caused those resources to be removed.

@changeset-bot

changeset-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 38fcef1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack Patch
@callstack/repack-plugin-expo-modules Patch
@callstack/repack-plugin-nativewind Patch
@callstack/repack-plugin-reanimated Patch
@callstack/repack-dev-server Patch
@callstack/repack-init Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

@whydidoo is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@whydidoo
whydidoo requested review from bartekkrok and dannyhw October 1, 2026 20:10
Comment thread packages/repack/src/plugins/utils/AssetsCopyProcessor.ts Outdated
@whydidoo
whydidoo requested a review from dannyhw October 2, 2026 08:26
@dannyhw

dannyhw commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks! 🙏

@dannyhw
dannyhw merged commit f9326a0 into callstack:main Oct 2, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android release assets differ from Metro: fonts go to res/font/ and no raw/keep.xml is written

2 participants