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

Linking to windows - no add as link option

Open DeBueno opened this issue 4 years ago • 16 comments

  • :ballot_box_with_check: Review the documentation: https://github.com/oblador/react-native-vector-icons
  • :ballot_box_with_check: Search for existing issues (including closed ones): https://github.com/oblador/react-native-vector-icons/issues

Environment

OS: windows 10 target platform: windows Visual Studio Version: Microsoft Visual Studio Community 2019 Version 16.5.4 react-native version: 0.60 react-native-windows version: 0.60 react-native-vector-icons version: 6.6.0

Description

I can't follow the two last steps. There's no drop-down button on add and no "Copy to output directory" option.

:heavy_check_mark: Open your solution in Visual Studio, right click the Assets folder in your solution, click Add Existing. 1

:heavy_check_mark: Browse to the node_modules\react-native-vector-icons\Fonts folder, select the required font files

:x: Click the Add drop-down and select Add as Link.

2

:x: Set Copy To Output Directory property of each font file to Copy if newer

3

Icons are just a rectangle for me.

Is there an even more manual way of doing it?

DeBueno avatar Apr 26 '20 00:04 DeBueno

Same here, no Add as Link option on VS 2019

linkstrifer avatar May 16 '20 21:05 linkstrifer

Has anyone been able to solve it?

cgarcia55 avatar Jul 01 '20 21:07 cgarcia55

Also need a solution for this!

exotexot avatar Sep 01 '20 15:09 exotexot

However, It shouldnt be a strong difference if you add an Asset as a Link or add the file itself. Adding the file to the asset folder doesnt resolve the issue though. Would be good to have some input here on how to link properly.

exotexot avatar Sep 03 '20 10:09 exotexot

Same issue here, currently only work if you manual install the font in your device

deepseapenguin avatar Sep 06 '20 21:09 deepseapenguin

anyone figured this out?

capc0 avatar Oct 31 '20 14:10 capc0

+1 here, the option is missing and all icons render as a square even when adding the file itself to assets.

alexanderblackh avatar Nov 06 '20 02:11 alexanderblackh

https://github.com/oblador/react-native-vector-icons/issues/1237

exotexot avatar Nov 06 '20 10:11 exotexot

That worked for me! Thanks @exotexot.

For everyone else, what I did was copy the desired fonts to the assets folder within /windows/project-name. Screenshot 1

From there, I entered the project solution, right-clicked on Assets and pressed Add > Existing Item and selected the fonts I copied into /windows/project-name/assets. Screen2

It worked on the next build (Both VS and via npx if anyone wants to be sure).

alexanderblackh avatar Nov 06 '20 16:11 alexanderblackh

If others can confirm this worked, I'll make a pull request to the project to update this. @capc0 @LeeJiaLe

alexanderblackh avatar Nov 07 '20 01:11 alexanderblackh

I can confirm that copying the files into the Assets folder is working

capc0 avatar Nov 07 '20 01:11 capc0

@alexanderblackh copying the files over also worked for me, an update to the docs would be very appreciated! :)

Would also like to note, this only seemed to help w/ default FontAwesome (4?) icons, when I tried to use any FontAwesome5 icons, still shows as unknown font.

@alexanderblackh was this also the case for you, I saw you had FA5 in your folder screenshot. Were you able to get it working?

dd-apt avatar Dec 23 '20 13:12 dd-apt

@alexanderblackh copying the files over also worked for me, an update to the docs would be very appreciated! :)

Would also like to note, this only seemed to help w/ default FontAwesome (4?) icons, when I tried to use any FontAwesome5 icons, still shows as unknown font.

@alexanderblackh was this also the case for you, I saw you had FA5 in your folder screenshot. Were you able to get it working?

Sorry for the delay in response. FA5 is added but it's not working, only getting FA4 working.

alexanderblackh avatar Feb 12 '21 02:02 alexanderblackh

@alexanderblackh copying the files over also worked for me, an update to the docs would be very appreciated! :) Would also like to note, this only seemed to help w/ default FontAwesome (4?) icons, when I tried to use any FontAwesome5 icons, still shows as unknown font. @alexanderblackh was this also the case for you, I saw you had FA5 in your folder screenshot. Were you able to get it working?

Sorry for the delay in response. FA5 is added but it's not working, only getting FA4 working.

same here on RN 0.64

mdbaniani avatar Apr 26 '21 13:04 mdbaniani

Is there any way to achieve this without using Visual Studio? I tried using Visual Studio 2022, and it has been a mess for me (most of the options you mention seems not to be available, afaik).

juliolugo96 avatar Jan 17 '22 15:01 juliolugo96

yes for me too the same issue. there is no add to existing items option in visual studio 2022

IsuruLakshan97 avatar May 09 '23 04:05 IsuruLakshan97