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:
| Step | What happens |
|---|---|
| 1 | The native side shows the splash screen |
| 2 | The JavaScript bundle loads and React evaluates |
| 3 | useFonts starts loading the font files asynchronously |
| 4 | The root component renders |
| 5 | Fonts 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-screenYou 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
| Moment | What you see |
|---|---|
| Right after launch | The 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 disappears | The first screen is already in your custom font |
| If loading fails | The 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 look | What to suspect |
|---|---|
| Font file location | Files in a custom path instead of assets/fonts/ |
app.json / app.config.js | assetBundlePatterns excluding the font folder |
.gitignore | assets/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/. Inapp/_layout.tsx, load them withuseFonts, keepexpo-splash-screenvisible until loading finishes, and returnnullbefore 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.ttfYou'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
| Rule | Why |
|---|---|
Put fonts flat in assets/fonts/ | Subfolders multiply require path mismatches |
| Stick to Regular and Bold | CJK files are heavy, and every extra weight lands in the bundle |
Wrap Text in AppText from the start | A later font swap becomes a one-place change |
Keep font loading in _layout.tsx only | Releasing 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.