oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.31k stars 2.12k forks source link

fa-upgrade script didn't work for me and Android Font Awesome Pro6 Naming Conventions #1617

Closed zacdemi closed 6 days ago

zacdemi commented 1 month ago

react native 0.73.8 react-native-vector-icons 10.1.0

Description

The fa-upgrad script wouldn't work for me: it would say success, but then the fonts were never copied into a directory. I even tried to specify a directory.


Zacs-MacBook-Pro app % yarn fa6-upgrade Please enter your Font Awesome Pro npm token: [SUCCESS] Set up npm config [SUCCESS] Temporary directory [/var/folders/vv/xtby6zq97476q4tp11rkbxpw0000gn/T/rnvi.XXXXXX.KH6hU988N0] was created

I tried to add the fonts manually for android. Here is the naming conventions you need to use if you do in the meantime. These are converting the 'web' versions downloaded from Font Awesome.

cp "$font_dir_path/fa-light-300.ttf" "$DEST_DIR_PATH/FontAwesome6_Pro_Light.ttf" &&
cp "$font_dir_path/fa-brands-400.ttf" "$DEST_DIR_PATH/FontAwesome6_Pro_Brands.ttf" &&
cp "$font_dir_path/fa-regular-400.ttf" "$DEST_DIR_PATH/FontAwesome6_Pro_Regular.ttf" &&
cp "$font_dir_path/fa-solid-900.ttf" "$DEST_DIR_PATH/FontAwesome6_Pro_Solid.ttf"
cp "$font_dir_path/fa-duotone-900.ttf" "$DEST_DIR_PATH/FontAwesome6_Pro_Duotone.ttf"
cp "$font_dir_path/fa-thin-100.ttf" "$DEST_DIR_PATH/FontAwesome6_Pro_Thin.ttf"
cp "$font_dir_path/fa-sharp-solid-900.ttf" "$DEST_DIR_PATH/FontAwesome6_Pro_Sharp_Solid.ttf"
johnf commented 2 weeks ago

Was that the entire output? It should look more like

$ /Users/johnf/TestApp/node_modules/.bin/fa6-upgrade
Please enter your Font Awesome Pro npm token:
[SUCCESS] Set up npm config
[SUCCESS] Temporary directory [/var/folders/79/cx40g47n3xdf6kxz889brj7h0000gn/T/rnvi.XXXXXX.uVK8NuhtBW] was created
npm notice 
npm notice New major version of npm available! 9.5.1 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice Run npm install -g npm@10.8.1 to update!
npm notice 
[SUCCESS] Font Awesome Pro was unpacked to [/var/folders/79/cx40g47n3xdf6kxz889brj7h0000gn/T/rnvi.XXXXXX.uVK8NuhtBW/package] directory
[SUCCESS] Copied Font Awesome Pro to [assets/fonts] directory
You already have a react-native-config.js file, make sure you have the new fonts added to the dependencies!
[INFO] Didn't create react-native.config.js, it already exists. Make sure 'assets/fonts' is part of the 'assets' array!
[SUCCESS] Font Awesome Pro was successfully upgraded
Note: [/var/folders/79/cx40g47n3xdf6kxz889brj7h0000gn/T/rnvi.XXXXXX.uVK8NuhtBW] was created. Delete it manually or it will be deleted automatically on next reboot
✨  Done in 8.76s.

Can you try running this and send the output, make sure you remove your token from the output

bash -x ./node_modules/react-native-vector-icons/bin/fa-upgrade.sh 
johnf commented 6 days ago

Closed due to no response