react-native-fontawesome: 6.0.1 Icons with matching names do not show regular font
When upgrading to 6.0.1, if I try to use icons that have the same name between the regular and solid fonts, the icon always defaults to the solid font. Ex:
<FontAwesome type={IconTypes.FAR}>{Icons.circle}</FontAwesome>
and
<FontAwesome type={IconTypes.FAS}>{Icons.circle}</FontAwesome>
both show solid circles, even with the correct fonts installed in iOS (I have not tested Android). This is making some of the Regular icons inaccessible using this package.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 17 (2 by maintainers)
I did a little digging into this issue and I found that the correct fontFamily is being passed into the Text component inside this package. I believe the issue resides in the fact that Solid and Regular are in the same font family (FontAwesome5Free). Because of that I believe it can not determine properly which one to use. That is just a theory but wanted to give y’all something to go on.
EDIT: @jgcmarins I just found this link that will give some insight into whats going on. I am unable to find a solution as of yet.
Here is a repo with a demo of iOS behavior: https://github.com/bsbechtel/FADemo
I just tested in Android and it’s working fine as you can see at the images bellow, but unfortunately I can’t test on IOS:
FAR SCREENSHOT and FAS SCREENSHOT