@@ -63,6 +63,16 @@ function resolveAppVariant(value: string | undefined): AppVariant {
6363
6464const variant = VARIANT_CONFIG [ APP_VARIANT ] ;
6565
66+ const dmSansFonts = {
67+ regular : "@expo-google-fonts/dm-sans/400Regular/DMSans_400Regular.ttf" ,
68+ medium : "@expo-google-fonts/dm-sans/500Medium/DMSans_500Medium.ttf" ,
69+ bold : "@expo-google-fonts/dm-sans/700Bold/DMSans_700Bold.ttf" ,
70+ } as const ;
71+
72+ // These aliases match the fonts' PostScript names on iOS. Register the same
73+ // names on Android so React Native and the native composer use one set of
74+ // family names without waiting for runtime font loading.
75+
6676const config : ExpoConfig = {
6777 name : variant . appName ,
6878 slug : "t3-code" ,
@@ -121,7 +131,30 @@ const config: ExpoConfig = {
121131 favicon : "./assets/favicon.png" ,
122132 } ,
123133 plugins : [
124- "expo-font" ,
134+ [
135+ "expo-font" ,
136+ {
137+ ios : {
138+ fonts : [ dmSansFonts . regular , dmSansFonts . medium , dmSansFonts . bold ] ,
139+ } ,
140+ android : {
141+ fonts : [
142+ {
143+ fontFamily : "DMSans-Regular" ,
144+ fontDefinitions : [ { path : dmSansFonts . regular , weight : 400 } ] ,
145+ } ,
146+ {
147+ fontFamily : "DMSans-Medium" ,
148+ fontDefinitions : [ { path : dmSansFonts . medium , weight : 500 } ] ,
149+ } ,
150+ {
151+ fontFamily : "DMSans-Bold" ,
152+ fontDefinitions : [ { path : dmSansFonts . bold , weight : 700 } ] ,
153+ } ,
154+ ] ,
155+ } ,
156+ } ,
157+ ] ,
125158 "expo-secure-store" ,
126159 "expo-sqlite" ,
127160 [ "@clerk/expo" , { theme : "./clerk-theme.json" } ] ,
0 commit comments