Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see Custom Icon(imported from local) #1607

Closed
knightmate opened this issue Apr 1, 2024 · 3 comments
Closed

Can't see Custom Icon(imported from local) #1607

knightmate opened this issue Apr 1, 2024 · 3 comments
Labels
waiting Waiting on OP response

Comments

@knightmate
Copy link

ref-https://stackoverflow.com/questions/56574618/why-i-cant-see-custom-created-icomoon-icons-in-my-app#new-answer

I imported the TTF file from Icomoon's website (https://icomoon.io/app/#/select). However, when I use the imported icons in my application, they are not displaying properly. Interestingly, everything works fine when I use the fonts provided by Icomoon
it takes the space also onClick is working but icon is not visible

@johnf
Copy link
Collaborator

johnf commented May 13, 2024

Can you share the code you are using to configure the font?

@johnf johnf added the waiting Waiting on OP response label May 13, 2024
@knightmate
Copy link
Author

knightmate commented May 13, 2024

@johnf
import { createIconSetFromFontello } from 'react-native-vector-icons'; import fontelloConfig from './config.json'; const Icon = createIconSetFromFontello(fontelloConfig); ... export default () => <Icon name="toad" size={80} color="#bf1313" />;
I have followed all the steps outlined in the article "Add Custom Icons to Your React Native Application" (https://medium.com/bam-tech/add-custom-icons-to-your-react-native-application-f039c244386c). When using internal icons with the same steps, it works as expected. However, when adding a custom icon, it's not displaying properly;
the space is being allocated but the icon itself isn't visible

@johnf
Copy link
Collaborator

johnf commented May 14, 2024

@knightmate You are using the fontello instructions. Check here for the section for IcoMoon
https://github.com/oblador/react-native-vector-icons?tab=readme-ov-file#custom-fonts

3rd example

@johnf johnf closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting on OP response
Projects
None yet
Development

No branches or pull requests

2 participants