jsartisan / react-native-magnus

A Utility-First React Native UI Framework 🚀🧩
https://magnus-ui.com
MIT License
1.18k stars 77 forks source link

[Docs] Custom fontFamily? #83

Open iamtomffee opened 3 years ago

iamtomffee commented 3 years ago

Documentation Link

https://magnus-ui.com/docs/customization/

Describe the problem

Could you provide an object of all theme customization settings? How the developer can change the default font your UI is using?

Describe the improvement

Add example of how to change default fontFamily settings.

dhruvsaxena1998 commented 3 years ago

Is there any way to set fontFamily via theme customization?

dhruvsaxena1998 commented 3 years ago

Ok after a while found out the default theme options, https://github.com/jsartisan/react-native-magnus/blob/master/src/style/defaultTheme.ts

also we can give default font-family like this in same ThemeProvider option, working and tested. Though it's not given in defaultStyles.

fontFamily: {
  normal: 'Poppins-Regular',
  bold: 'Poppins-Bold',
  100: 'Poppins-Light',
  500: 'Poppins-Medium',
  700: 'Poppins-SemiBold',
  900: 'Poppins-ExtraBold',
}
radelcom commented 3 years ago

@dhruvsaxena1998 does loading a custom font work for you? I tried to load a custom font Google Font Inter but does not seem to work.

ayrtonlacerda commented 2 years ago

Don't Work in iOS

version 1.0.62 Screen Shot 2021-12-26 at 20 06 42 2