React-native-vector-icons: [4.4.0] Unwanted ~40px marginTop with Feather icons

Created on 17 Sep 2017  路  12Comments  路  Source: oblador/react-native-vector-icons

Before with FontAwesome (middle icon):

<Icon name="arrows-alt" size={17} color={iconColor} /> Browser

screenshot 2017-09-16 15 37 59

After with Feather (middle icon):

<FeatherIcon name="globe" size={17} color={iconColor} /> Browser

screenshot 2017-09-16 15 36 19

I tried adding style={{padding: 0, margin: 0}} prop to <FeatherIcon>, no difference.

It seems all Feather icons add this 40px or so additional margin on top of the icons. (I tried 2 icons besides "globe")

I upgraded RN-vector-icons from 4.3.0 to 4.4.0.

Most helpful comment

Any news on this @kleiram ? I'm having trouble with it too :-(

All 12 comments

Think this might be due to the fontcustom transformation. Since you added this icon set, does it work for you @kleiram?

Looking at the outputted icons they also seem to suffer the stroke vs fill issue. Did you look at the link I sent you @kleiram in the PR? This was prematurely merged :-/

yes, I meet it yet! the last one is feather icon
2017-09-18 1 25 24

@oblador

@oblador I'm going to check, it used to work for me, since I ran the package from my own repository for a while. Let me get back to you!

Any news on this @kleiram ? I'm having trouble with it too :-(

+1

@tpedersen123 Not yet unfortunately! I really don't understand what's happening to be honest. Perhaps the font is messed up.

Alright, so, I've been investigating further, and it seems the fontcustom command adds an extra margin to the top of the generated font.

@oblador Do you have any experience with this? It looks to be related to fontcustom/fontcustom#134

@oblador I think it might be best to revert the merge, release a version 4.4.1 and return to work for now.

I went with generating them by hand via icomoon instead. Not what I wanted, but maybe you can maintain them @kleiram? I've documented steps needed in the repo.

Fix released in 4.4.1.

Works for me!

Was this page helpful?
0 / 5 - 0 ratings