custom font for native app

0
Hello, im trying to add fonts to a mendix native app , but i couldnt figure out how , any ideas ??
asked
2 answers
3

 

Unfortunately, there is no easy way to do that , you can check out comments in this forum question:

https://forum.mendix.com/link/questions/95403  (The only way to change the font is by adding it to the native template: https://github.com/mendix/native-template)

If you are looking for web app you can include custom family by defining it in the custom scss file like this:

@font-face {
    font-family: 'YourFontName<to be used later in style>'; 
    src: url('http://domain.com/fonts/font.ttf'); /*URL to font, should be something like '/font.ttf*, woff,woff2,eot etc
}

 Please make sure that you have put the custom fonts in base folder.

answered
2

First step is probably to add the fonts in native-template/ios/Fonts/ and native-template/android/app/src/main/assets/fonts/

In this https://docs.mendix.com/refguide/native-styling-refguide see 'TextStyle' and the reference to https://reactnative.dev/docs/text#style. This tells you how to set the font-family.
 

 

 

answered