Skip to content

Commit

Permalink
Include ghost hook to statically export fonts (#5553)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Oct 1, 2024
1 parent e33b2b1 commit 5a98ea6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/alf/fonts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {useFonts} from 'expo-font'

import {isWeb} from '#/platform/detection'
import {Device, device} from '#/storage'

Expand Down Expand Up @@ -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'),
})
}

0 comments on commit 5a98ea6

Please sign in to comment.