X Tutup
Skip to content

Remove useFonts and embed them as part of the App Binary #2995

@ChristopherGabba

Description

@ChristopherGabba

Good morning Infinite Red,

I came across this X.com thread: https://x.com/aleqsio/status/1968273285239734405 and I read through the expo font docs: https://docs.expo.dev/versions/latest/sdk/font/

and they talk about the preference for fonts is to not use useFonts and load them asynchronously but to include them in the app binary using the expo-config-plugin. I just finished getting this working in my app, and here are all the diffs, which should be similar to ignite, just with different fonts:

App.tsx:

Image

app.json:

Image

package.json:

Image

typography:

Image

Then you have to add the font files under the assets/fonts folder.

This should theoretically decrease the TTI of the app and reduce splash screen show time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup