alinz / react-native-tabbar

Tab bar with more freedom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

里面的<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?

@navdove

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 as fontFamily.

screen shot 2016-01-29 at 2 08 10 pm

  • second you need to go to info.plist

screen shot 2016-01-29 at 2 10 20 pm

and add your ttf font to a value Fonts provided by application. if it's not there just add new one.

screen shot 2016-01-29 at 2 11 40 pm

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,