Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font Awesome & Unicode

I'm using (the excellent) Font-Awesome in my site, and it's working fine, if I use it this way:

<i class="icon-home"></i> 

But (for some reasons) I want to use it in the Unicode way, like:

<i>&#xf015;</i> 

(Font Awesome's cheatsheet)

But it doesn't work - the browser shows a square instead.

How do I solve this? The CSS path is correct (as the first way of using Font Awesome works).

Edit: I do have the FontAwesome.otf installed.

like image 431
matan129 Avatar asked Jun 22 '13 19:06

matan129


People also ask

Is Font Awesome free?

Font Awesome Free is free, open source, and GPL friendly. You can use it for commercial projects, open source projects, or really almost whatever you want.

What is Font Awesome used for?

Font Awesome is a widely-used icon set that gives you scalable vector images that can be customized with CSS. With over 1,600 icons in the free set, you should be able to find an icon to suit your needs.

What is Font Awesome CSS?

Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.


1 Answers

I got a simillary problem using unicode and fontawesome. when i wrote :

font-family: 'Font Awesome\ 5 Free'; content: "\f061"; /* FontAwesome Unicode */ 

On google chrome, a square appear instead of the icon. The new version of Font Awesome also requires

font-weight: 900; 

That's work for me.

From : https://github.com/FortAwesome/Font-Awesome/issues/11946

Hope that's will help.

like image 112
Basile Avatar answered Sep 23 '22 05:09

Basile