M
M
MRcracker2020-08-27 22:14:47
Fonts
MRcracker, 2020-08-27 22:14:47

How to connect fontawesome correctly?

I connect fontawesome 5 icons to the site. In some browsers everything works fine, but in some browsers a square is displayed. What could be the problem?

.prev
  &:before
    font-family: FontAwesome
    content: '\f104'
    font-size: 24px

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Osadchy, 2020-08-28
@DELUX

I recently encountered such a problem ..
You have a 100% problem with the connection of the font itself, that is, the paths are not specified correctly - this is indicated by "and in some browsers a square is displayed" - in my case the font was installed on the PC, so I did not see the problem and others have seen

D
Den Sabrov, 2020-08-28
@bersus

Look in the console for any errors. For example, CORS policy errors, or similar. Then take a look at the server settings.

S
sashabeep, 2020-08-29
@sashabeep

font-weight is not specified. And the name of the font is wrong.
Shown for those who have the 4th version installed locally. in the 5th version, even the name is different
. Did you try to look there? https://fontawesome.com/how-to-use/on-the-web/adva...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question