react-native-magnus icon indicating copy to clipboard operation
react-native-magnus copied to clipboard

[Docs] Custom fontFamily?

Open iamtomffee opened this issue 4 years ago • 4 comments

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.

iamtomffee avatar Mar 03 '21 06:03 iamtomffee

Is there any way to set fontFamily via theme customization?

dhruvsaxena1998 avatar Apr 17 '21 19:04 dhruvsaxena1998

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',
}

dhruvsaxena1998 avatar Apr 17 '21 19:04 dhruvsaxena1998

@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.

radelcom avatar Aug 15 '21 03:08 radelcom

Don't Work in iOS

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

ayrtonlacerda avatar Dec 26 '21 23:12 ayrtonlacerda