I want to use Font Awesome 5 in my Nativescript-Angular app. I followed below article and did everything same but I always getting icon as "?" for iOS and "X" for android.
Nativescript Version - 6.5, Angular Version - 8.0
https://medium.com/alexonozor/fontawesome-5-and-nativescript-4-2-angular-ca29826f9346
Steps followed:-
- Downloaded Font-Awesome v5.1.15 from "https://fontawesome.com/how-to-use/on-the-web/setup/hosting-font-awesome-yourself"
- A new folder created with name "fonts" in my application and kept it under src folder. Copied all ttf files inside newly created folder. Below is the screenshot:-
- Add lines in app.css and use font-awesome 5 in HTML as mentioned below:-
/*app.css*/
.far {
font-family: Font Awesome 5 Free, "fa-regular-400";
font-weight: 400;
}
.fab {
font-family: Font Awesome 5 Brands, fa-brands-400;
font-weight: 400;
}
.fas {
font-family: Font Awesome 5 Free, fa-solid-900;
font-weight: 900;
}
/*html*/
<Image src="font://" stretch="none" class="fas"></Image>
<Label text="" class="far"></Label>
<Label text="" class="fab"></Label>
It is not returning the actual image. If I follow the same steps in Nativescript Playground then it is working fine but I cant make it work in VS Code.
Please help me here.

Try to add double quote around the font names and filenames.
If it still does not work you should consider using the
nativescript-fonticonlocated here. It makes it easier to use, same way as the Web way.