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

Icon far fa-star not working #12677

Closed
ShoeLace1291 opened this issue Mar 22, 2018 · 21 comments
Closed

Icon far fa-star not working #12677

ShoeLace1291 opened this issue Mar 22, 2018 · 21 comments

Comments

@ShoeLace1291
Copy link

ShoeLace1291 commented Mar 22, 2018

I am trying to use the star icons to make an article rating system.If an article has 3/5 star rating, it shows 3 "fas fa-star" icons and 2 "far fa-star" icons. I assume that fas means solid, far means regular. The regular star icon is not showing up. It just shows up as an empty square outline. The solid star works fine. I am using webfonts.

Update: Even after switching to JS SVGs this is not working. Am I missing something?

@aizazshahid
Copy link

@ShoeLace1291 Actually in every font awesome icon there is a constant thing which is "fa", so we can say that it's a short-form of Font Awesome.
Try "fa fa-star", surely it will work.

Regards,
Aizaz

@ShoeLace1291
Copy link
Author

ShoeLace1291 commented Mar 24, 2018

@aizazshahid this is displaying the exact same icon as "fas fa-star" which is the solid and what I want is the "empty" star. From what I can remember, in v4.0, the class was fa-star-o for the empty star. This is what I want, but that code doesn't work in v5.

@aizazshahid
Copy link

@ShoeLace1291 my mistake i didn't know that. But, may be, this will solve your problem Upgrading from version 4

@Syed-Ibrahim
Copy link

This issue is not fixed yet. Latest Version 5.0.9 also having same issue. I cant able to select empty star.

@rywn
Copy link

rywn commented Mar 29, 2018

I'm using these on my own project just fine, but I know it's pretty easy to accidentally override the font weight on these and result in a broken icon if you're using the CSS approach - not sure if that still happens with the SVG method though.

@julicamb
Copy link

julicamb commented Apr 5, 2018

I have the same issue
This works perfect:
<font-awesome-icon size="2x" :icon="['fas', 'heart']" />
But this gives me an error "Check not find one or more icon(s) "
<font-awesome-icon size="2x" :icon="['far', 'heart']" />

@tagliala
Copy link
Member

tagliala commented Apr 6, 2018

Hi!

Thanks for being part of the Font Awesome Community.

Please provide all the information required by our bug report template

@danijelh
Copy link

I am having the same issue as @julicamb . Any solution or info so far?

@tagliala
Copy link
Member

No feedback, closing here.

Please provide all the information required by our bug report template

@julicamb
Copy link

@DanijeIH
If I remember right you have to install the far icons yourself. When you install the package they aren’t included. But it’s an easy install, ‘npm install blablablafar’, but you’ll have to find that one yourself, I havan’t dealt with this package for months.

@julicamb
Copy link

So basically: This issue is easily fixable when you know how, I posted my solution in another issue with a similar issue I think. I apparently forgot to post it here too. When you find the exact steps, post them here for future reference.

@danijelh
Copy link

danijelh commented Oct 30, 2018

Yes, I figured it out.
There are two packages, "@fortawesome/free-solid-svg-icons"(fas) and "@fortawesome/free-regular-svg-icons"(far). Import needs to be done correctly from those packages in order for icons to work. I wish only if this was documented better.

import { faCheckSquare } from '@fortawesome/free-solid-svg-icons'
import { faCheckSquare as faCheckSquareRegular } from '@fortawesome/free-regular-svg-icons'

@tagliala
Copy link
Member

This is documented at https://fontawesome.com/how-to-use/with-the-api/setup/importing-icons, at the very bottom of the page

To import the same icon from different styles

@danijelh
Copy link

@tagliala Thanks for the info! I wasn't able to find it but had to figure it out on my own. I am using this with Vue and was focusing on the Vue-Fontawesome part and searching something like that doesn't provide this info as plain. Just a suggestion, maybe if this were also added to https://github.com/FortAwesome/vue-fontawesome readme.

@mokhosh
Copy link

mokhosh commented Nov 17, 2018

I had the same issue, thanks to @julicamb I added this line to my sass and fixed my problem:

@import "~@fortawesome/fontawesome-free/scss/regular";

@Bhonny
Copy link

Bhonny commented Jan 16, 2019

Just simply link the css file this way

"project-folder/font-awesome-folder/css/all.css"

rather than

"project-folder/font-awesome-folder/css/font-awesome.min.css"

It perfectly work from my end:)

Happy New Year:

@assmabenmussa
Copy link

I hope you solved your issue, but for anyone still looking, simple add

 <script defer src="https://use.fontawesome.com/releases/v5.15.1/js/all.js"></script>
 <script defer src="https://use.fontawesome.com/releases/v5.15.1/js/v4-shims.js"></script>

to your head element in the html, this worked for me

@Ataberkuygur
Copy link

I hope you solved your issue, but for anyone still looking, simple add

 <script defer src="https://use.fontawesome.com/releases/v5.15.1/js/all.js"></script>
 <script defer src="https://use.fontawesome.com/releases/v5.15.1/js/v4-shims.js"></script>

to your head element in the html, this worked for me

This works thanks

@dushyantsingh-dev
Copy link

far fa-star is paid

@tagliala
Copy link
Member

far fa-star is paid

Hi,

far fa-star (fa-star in regular style) is free in both FA5 and FA6

If you have troubles in using or upgrading Font Awesome, please check our documentation

https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use

If you still have issues in using fa-star regular with FA Free, feel free to fill out our bug report template and provide a reproducible test case

@gopikrishnan7
Copy link

@ShoeLace1291 Actually in every font awesome icon there is a constant thing which is "fa", so we can say that it's a short-form of Font Awesome. Try "fa fa-star", surely it will work.

Regards, Aizaz

It's working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests