From bd837bc80aa6667a3d46e3b517c5dc76f978900f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 1 Oct 2024 13:50:49 -0500 Subject: [PATCH] Include ghost hook to statically export fonts --- src/alf/fonts.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/alf/fonts.ts b/src/alf/fonts.ts index ae2aaa97a0..54fe7a34e0 100644 --- a/src/alf/fonts.ts +++ b/src/alf/fonts.ts @@ -1,3 +1,5 @@ +import {useFonts} from 'expo-font' + import {isWeb} from '#/platform/detection' import {Device, device} from '#/storage' @@ -63,3 +65,15 @@ export function applyFonts( */ style.fontVariant = ['no-contextual'] } + +/* + * IMPORTANT: This is unused. Expo statically extracts these fonts. + * + * All used fonts MUST be configured here. Unused fonts can be commented out. + */ +export function DO_NOT_USE() { + return useFonts({ + InterVariable: require('../../assets/fonts/inter/InterVariable.ttf'), + 'InterVariable-Italic': require('../../assets/fonts/inter/InterVariable-Italic.ttf'), + }) +}