mirror of
https://github.com/selfxyz/self.git
synced 2026-02-08 05:15:19 -05:00
try to implement fonts
This commit is contained in:
@@ -8,11 +8,14 @@ import { name as appName } from './app.json';
|
||||
import { TamaguiProvider } from 'tamagui';
|
||||
import { createTamagui } from 'tamagui';
|
||||
import { config } from '@tamagui/config/v2-native'
|
||||
import myAppConfig from './tamagui.config';
|
||||
|
||||
|
||||
const tamaguiConfig = createTamagui(config)
|
||||
|
||||
|
||||
const Root = () => (
|
||||
<TamaguiProvider config={tamaguiConfig}>
|
||||
<TamaguiProvider config={myAppConfig}>
|
||||
<App />
|
||||
</TamaguiProvider>
|
||||
);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
module.exports = {
|
||||
assets: ['./src/fonts/'],
|
||||
project: {
|
||||
ios: {},
|
||||
android: {},
|
||||
},
|
||||
assets: ['./assets/fonts'],
|
||||
};
|
||||
@@ -332,7 +332,7 @@ const MainScreen: React.FC<MainScreenProps> = ({
|
||||
<Dialog.Title>Help</Dialog.Title>
|
||||
<HelpCircle mt="$1" alignSelf='center' size="$2" />
|
||||
</XStack>
|
||||
<H3 mt="$3">How to scan your passport ?</H3>
|
||||
<H3 fontFamily="Luciole" mt="$3">How to scan your passport ?</H3>
|
||||
<YStack>
|
||||
<Text>1. Find the location of the NFC chip of your passport.</Text>
|
||||
<Text>If you are struggling <Text color="#3185FC">this post</Text> will help you to find it.</Text>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { config } from '@tamagui/config/v3'
|
||||
import { createTamagui, createFont } from 'tamagui' // or '@tamagui/core'
|
||||
import { config } from '@tamagui/config/v2-native'
|
||||
import { createTamagui, createFont } from 'tamagui'
|
||||
|
||||
|
||||
export type AppConfig = typeof appConfig
|
||||
@@ -41,15 +41,20 @@ const Luciole = createFont({
|
||||
},
|
||||
})
|
||||
|
||||
// Extend the existing config with your fonts
|
||||
const extendedConfig = {
|
||||
|
||||
const extendedConfig = createTamagui({
|
||||
...config,
|
||||
fonts: {
|
||||
...config.fonts,
|
||||
Luciole, // Add the Luciole font to your configuration
|
||||
// Replace or add the 'Luciole' font as needed. Assuming 'body' is a key you want to replace/add.
|
||||
body: Luciole,
|
||||
heading: Luciole,
|
||||
// If you have other font roles (e.g., 'heading'), you might want to add or replace them here as well.
|
||||
},
|
||||
}
|
||||
const appConfig = createTamagui(extendedConfig)
|
||||
// Include any other customizations to the config here
|
||||
});
|
||||
|
||||
const myAppConfig = createTamagui(extendedConfig)
|
||||
|
||||
|
||||
export default appConfig
|
||||
export default myAppConfig
|
||||
Reference in New Issue
Block a user