Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change fonts? #1814

Open
itsgratien opened this issue May 10, 2024 · 3 comments
Open

How to change fonts? #1814

itsgratien opened this issue May 10, 2024 · 3 comments

Comments

@itsgratien
Copy link

itsgratien commented May 10, 2024

Hello,

I would like to ask how to change fonts? I tried to follow the documentation using mapping but seems fonts aren't changing.
any suggestion would be appreciated.

Thanks

@Bill-Niz
Copy link

Same here, i'm using expo

@danya0365
Copy link

danya0365 commented May 21, 2024

Config with customMapping param

import { default as appMapping } from "@/constants/app-mapping-eva.json";
import { ApplicationProvider } from "@ui-kitten/components";
import * as eva from "@eva-design/eva";

<ApplicationProvider 
   {...eva}
   theme={eva.dark} 
   customMapping={appMapping as any}>
 <Text>Hello world</Text>
</ApplicationProvider>

for app-mapping-eva.json

{
  "__comment__": "node_modules/@eva-design/eva/mapping.json",
  "strict": {
    "text-font-family": "Sarabun_400Regular"
  }
}

for example project https://github.com/danya0365/expo-react-native-uikitten-with-auth-middleware

@itsgratien
Copy link
Author

Config with customMapping param

import { default as appMapping } from "@/constants/app-mapping-eva.json";
import { ApplicationProvider } from "@ui-kitten/components";
import * as eva from "@eva-design/eva";

<ApplicationProvider 
   {...eva}
   theme={eva.dark} 
   customMapping={appMapping as any}>
 <Text>Hello world</Text>
</ApplicationProvider>

for app-mapping-eva.json

{
  "__comment__": "node_modules/@eva-design/eva/mapping.json",
  "strict": {
    "text-font-family": "Sarabun_400Regular"
  }
}

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants