◉RORK LABJP
●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens
Articles/Dev Tools
⬡ Dev Tools/2026-04-22Intermediate

Loading Custom Fonts Cleanly in Rork Apps — Preventing Startup Flicker (FOIT/FOUT) With expo-font

When you ship a Rork-generated app with a custom font, you often see a brief flash of the system font at launch — the classic FOIT/FOUT problem. This guide shows how to combine expo-font and expo-splash-screen to hold the splash screen until fonts are ready, with copy-paste-ready code.

Rork622expo-fontCustom FontsSplashScreenFOITFOUTReact Native244

The day I added a Japanese font to the settings screen of one of my wallpaper apps, I noticed something I couldn't unsee. On every cold start, the system font showed up for a split second before the real one took over. I only confirmed it by stepping through a screen recording frame by frame. It was that brief — and yet once I'd seen it, my eyes went straight to it on every launch.

It's the mobile cousin of FOIT (Flash of Invisible Text) and FOUT (Flash of Unstyled Text) from the web. Telling Rork "use Noto Sans JP" in a prompt doesn't settle it, because the flash comes from timing, not from the font name.

What I'd like to say up front: hold the splash screen by hand until fonts are ready. It's a modest fix, and the most reliable one I've found. I'll start with what's actually happening.

What's happening in that split second

A Rork project runs on Expo and React Native, so startup roughly goes like this:

StepWhat happens
1The native side shows the splash screen
2The JavaScript bundle loads and React evaluates
3useFonts starts loading the font files asynchronously
4The root component renders
5Fonts finish loading and the text re-renders

The flicker lives between steps 4 and 5. If text is painted before the font is ready, it appears in San Francisco (iOS) or Roboto (Android) first, then swaps. Setting fontFamily in a prompt can't close that gap — you have to control when the first render happens.

The shape of the fix — hide the splash manually

By default Expo hides the splash as soon as the root component mounts. We switch to manual mode instead.

# Run at the root of your Rork project
npx expo install expo-font expo-splash-screen

You can ask Rork to rewrite your entry file for this, and you'll get something close to the code below. I once handed the small details over entirely and paid for it later, so I always read the generated code myself now.

A working _layout.tsx

With Expo Router, app/_layout.tsx is the natural home. The splash stays up while fonts load and is hidden on success or error.

// app/_layout.tsx
import { Stack } from "expo-router";
import { useFonts } from "expo-font";
import * as SplashScreen from "expo-splash-screen";
import { useEffect } from "react";
import { View } from "react-native";
 
// 1. Prevent the splash from auto-hiding.
//    Without this, it disappears as soon as React mounts.
SplashScreen.preventAutoHideAsync().catch(() => {
  // Safe to ignore in hot-reload or WebView contexts.
});
 
export default function RootLayout() {
  // 2. Register your custom fonts.
  const [fontsLoaded, fontError] = useFonts({
    "NotoSansJP-Regular": require("../assets/fonts/NotoSansJP-Regular.ttf"),
    "NotoSansJP-Bold": require("../assets/fonts/NotoSansJP-Bold.ttf"),
  });
 
  // 3. Hide the splash when fonts are loaded OR errored.
  useEffect(() => {
    if (fontsLoaded || fontError) {
      SplashScreen.hideAsync();
    }
  }, [fontsLoaded, fontError]);
 
  // 4. Render nothing until fonts are ready.
  if (!fontsLoaded && !fontError) {
    return null;
  }
 
  return (
    <View style={{ flex: 1 }}>
      <Stack screenOptions={{ headerShown: false }} />
    </View>
  );
}

Step 4 is the key: returning null removes the window where the system font could show through. Including fontError in the guard means a broken font file won't leave you stuck on the splash.

What you should see

MomentWhat you see
Right after launchThe splash stays up a little longer — by the font load time, usually a few hundred milliseconds, depending on device and font size
The instant the splash disappearsThe first screen is already in your custom font
If loading failsThe splash still hides and the app falls back to system fonts without crashing

I took a detour to get here. At first I left the splash alone and set opacity to 0 on the text while fontsLoaded was false. The flash went away, but a blank white frame now sat between the splash and the first screen, and the result was worse than what I'd started with. I was hiding things in the wrong place: the splash is where the waiting belongs, not the screen. I only saw that after comparing the two builds side by side on a real device.

Another route — embed fonts at build time

Everything above loads fonts at runtime. Expo also offers a config plugin in expo-font that embeds the fonts into the native build:

{
  "expo": {
    "plugins": [
      [
        "expo-font",
        {
          "fonts": [
            "./assets/fonts/NotoSansJP-Regular.ttf",
            "./assets/fonts/NotoSansJP-Bold.ttf"
          ]
        }
      ]
    ]
  }
}

Embedded fonts are already on the device at launch, so there's less to wait for. The catch: it needs a development build or a prebuild-based rebuild, so you can't check it in Expo Go, and the way fontFamily names are resolved differs from useFonts. I may be missing newer details here — SDK versions move quickly — so please check the official docs for the current syntax before adopting it.

With the embedding route there's no useFonts key to match; the fontFamily name seems to follow the file name, though that detail shifts between SDK versions, so I check it against my installed version before rewriting anything.

My own split is simple: useFonts while I'm iterating in Expo Go, and I consider moving to embedding as a release approaches. Keeping both around has never hurt me.

Edge cases that have bitten me

1. Wrong require path

assets/font/ instead of assets/fonts/ stops Metro with Unable to resolve module. The most common culprit for me has been naming — hyphens versus underscores, Noto-Sans-JP versus NotoSansJP. Keep the name Google Fonts ships (NotoSansJP-Regular.ttf) and match your useFonts key to it.

2. Using the filename as fontFamily

<Text style={{ fontFamily: "NotoSansJP-Regular", fontSize: 16 }}>
  Hello, custom-font world
</Text>

The value is the key you passed to useFonts, with no extension. Rork occasionally generates "NotoSansJP-Regular.ttf", so I run grep -n "\.ttf\"" app/ after generation.

3. A stale font in the simulator

Almost always a cache, and trying the cheap fixes first has been faster than hunting for a cause. Clear Metro with npx expo start --clear. If nothing changes, delete the app from the simulator and reinstall. On a bare workflow, remove ios/build and android/build and rebuild as a last step.

4. The splash never hides

useFonts is stuck at [false, undefined]. Often a path failed to resolve and expo-font raised an error that your condition isn't catching. Add temporary logging:

useEffect(() => {
  if (fontsLoaded) console.log("[Font] loaded OK");
  if (fontError) console.log("[Font] error:", fontError);
  if (fontsLoaded || fontError) {
    SplashScreen.hideAsync();
  }
}, [fontsLoaded, fontError]);

5. Correct in dev, system font in the EAS build

Check, in this order:

Where to lookWhat to suspect
Font file locationFiles in a custom path instead of assets/fonts/
app.json / app.config.jsassetBundlePatterns excluding the font folder
.gitignoreassets/fonts/*.ttf swallowed, leaving the CI runner with no fonts

I once lost half a day to that last one in my own project. It wasn't the stomach-knotting kind of bug, just the kind that quietly eats an afternoon. git ls-files assets/fonts/ is where I look first now.

Phrasing it for Rork

Four facts in one prompt tend to get you close: the font family and weights, where the font files live, that expo-splash-screen should hold until fonts load, and that the logic belongs in _layout.tsx.

My template:

I placed Noto Sans JP Regular and Bold in assets/fonts/. In app/_layout.tsx, load them with useFonts, keep expo-splash-screen visible until loading finishes, and return null before fonts are ready so we avoid a FOUT flash.

If the result is off, I add one small correction at a time ("include fontError in the guard") rather than rewriting the whole prompt. That has been steadier for me.

A note on Android

Android varies a lot by device, and I've heard of fontFamily resolution being flaky on some heavily modified ROMs. I haven't tested that far myself, but a thin wrapper keeps the font choice in one place:

import { Text, TextProps } from "react-native";
 
export function AppText(props: TextProps) {
  return (
    <Text
      allowFontScaling={true}
      {...props}
      style={[
        { fontFamily: "NotoSansJP-Regular", color: "#222" },
        props.style,
      ]}
    />
  );
}

With <AppText> everywhere, a later font swap is a one-place change.

Keeping CJK font size in check

Noto Sans JP is lovely, but even the Regular file is several megabytes, and two weights add up. Exact sizes depend on the file you download, so measure yours.

Subset the glyphs. If your app uses a limited set of characters, pyftsubset from fonttools can trim the file to what you need.

pip install fonttools
pyftsubset NotoSansJP-Regular.ttf \
  --unicodes-file=used_unicodes.txt \
  --output-file=NotoSansJP-Regular.subset.ttf

You'll need to re-run it whenever user-facing copy changes, so it suits apps with stable text.

Lazy-load for rarely visited screens. Font.loadAsync accepts { Name: { uri: "https://..." } }. That screen gets a short loading state in exchange for a lighter initial bundle.

The small rules I settled on

RuleWhy
Put fonts flat in assets/fonts/Subfolders multiply require path mismatches
Stick to Regular and BoldCJK files are heavy, and every extra weight lands in the bundle
Wrap Text in AppText from the startA later font swap becomes a one-place change
Keep font loading in _layout.tsx onlyReleasing the splash stays one component's job

Receive fonts in one place, release the splash in one place. The day you scatter useFonts across screens is the day one of them forgets its guard, and I'd rather not hold that line only on good days.

What to try next

Paste the _layout.tsx into your project and relaunch the simulator. If the flash is gone, you'll see it in one launch.

I've written about related polish in Fixing the "cheap look" of Rork-generated UIs, if that's useful.

Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⬡ Dev Tools2026-11-04
Catching the Few Seconds Before Streaming Audio Starts: A Loading State and a Timeout
You tap play and nothing happens for a moment. Here is how I model that gap with expo-audio: a requested flag, a 400ms delayed spinner, and an 8-second timeout.
⬡ Dev Tools2026-10-07
Japanese Headings Won't Turn Bold on Android: How to Trace and Fix a fontWeight That Does Nothing
A troubleshooting note for Rork apps where headings look bold on iPhone but stay thin on Android. How to tell the symptoms apart, pick weights through fontFamily, and verify the fix.
⬡ Dev Tools2026-09-04
EAS secret visibility does not keep a value out of your app — deciding prefix and visibility separately
The EXPO_PUBLIC_ prefix decides what ships inside your app; EAS visibility decides who can read it. Why stacking them blanks a value on OTA updates, and how to check your build.