react-native-vector-icons icon indicating copy to clipboard operation
react-native-vector-icons copied to clipboard

Add monorepo documentation for specifying iconFontsDir

Open jgornick opened this issue 4 years ago • 6 comments

Environment

macOS 10.15.4 Android 6.6.0

Description

In a monorepo setup, icons do not appear to render and show a rectangle with lines through them.

Android Emulator

Reproducible Demo

Using a monorepo setup and with yarn workspaces, the node_modules are installed at the root of the monorepo. The path to the icons needs to be updated with the new relative path:

project.ext.vectoricons = [
    iconFontsDir: "../../../../node_modules/react-native-vector-icons/Fonts"
]

apply from: file("../../../../node_modules/react-native-vector-icons/fonts.gradle");

jgornick avatar Jun 08 '20 03:06 jgornick

I have this issue, please help us :'(

ReeVicente avatar Jul 02 '20 13:07 ReeVicente

@jgornick hey joe, sorry to bother you. i'm struggling to get the icons to show on android with a monorepo setup. I've added the iconFontsDir, and looking inside the apk the fonts are getting copied to assets/fonts. But they still don't show up in the app. Is there anything else I need to change? I've tried copying them manually too, which doesn't work either. Any hints would be most welcome.

robclouth avatar Nov 08 '20 12:11 robclouth

Sorry @robclouth and @ReeVicente, the only help I can provide is in the solution I included above by specifying the iconFonsDir and applying the fonts.gradle. Just make sure the (relative) paths are correct.

jgornick avatar Nov 10 '20 19:11 jgornick

I figured it out. In expo bare workflow you need to manually import the fonts with expo-font. Two days down the drain because of that...🤦🏻‍♂️ Thanks for replying though!

On Tue, 10 Nov 2020, 20:15 Joe Gornick, [email protected] wrote:

Sorry @robclouth https://github.com/robclouth and @ReeVicente https://github.com/ReeVicente, the only help I can provide is in the solution I included above by specifying the iconFonsDir and applying the fonts.gradle.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oblador/react-native-vector-icons/issues/1183#issuecomment-724909807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJP3IQDONSMM5UOJGGBFX3SPGGMFANCNFSM4NX5SBVQ .

robclouth avatar Nov 10 '20 19:11 robclouth

Was ripping my hair out, this worked, thanks!

oskarhertzman avatar Feb 09 '22 12:02 oskarhertzman

I figured it out. In expo bare workflow you need to manually import the fonts with expo-font. Two days down the drain because of that...🤦🏻‍♂️ Thanks for replying though! On Tue, 10 Nov 2020, 20:15 Joe Gornick, @.***> wrote: Sorry @robclouth https://github.com/robclouth and @ReeVicente https://github.com/ReeVicente, the only help I can provide is in the solution I included above by specifying the iconFonsDir and applying the fonts.gradle. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1183 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJP3IQDONSMM5UOJGGBFX3SPGGMFANCNFSM4NX5SBVQ .

How did you do that, please?

dhatGuy avatar Aug 28 '22 08:08 dhatGuy