里面的<IconWithBar label='Favorite' type={glypy.Favorite} from={'icomoon'}/>能详细介绍一下 type 和 from?参数应该怎么填?
LYZName opened this issue · comments
@LYZName, so type
and from
are 2 properties which defines which unicode in custom font you want to use and from
defines the font's name.
if you look at the example folder, code I have used a utility which comes with react-native-tabbar
calls glypyMapMaker
.
For better undrestanding how you could add new fotns to iOS and android app please refer to this repo which I documented everything.
Hi alinz, i have worked with xcode fonts before, i also checked your other repo, i still get "Unrecognized font family 'icomoon' " astounded! I could print in font name using swift though (same project has mix of swift, objc and react-native), i have tried restarting packager too. Any ideas?
in iOS you should do 2 things in order to add a new font
- first you have to add the ttf file. your ttf file name is important. If it's apple.ttf, then you have to use
apple
asfontFamily
.
- second you need to go to
info.plist
and add your ttf font to a value Fonts provided by application
. if it's not there just add new one.
make sure to close react-native package terminal window and rebuild the project in xcode.
I am closing this ticket but feel free to continue the discussion here. I will try my best to help you guys.
Cheers,