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></i>
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.
It does not work, because <i></i>
simply asks the browser to display the Private Use code point U+F015 using an italic typeface. The Font Awesome CSS code has nothing that would affect this. If you add class=icon-home
to the tag, you will get the glyph assigned to U+F015 in the FontAwesome font, but you will get it twice, due to the way the Font Awesome trickery works.
To get the glyph just once, you need to use CSS that asks for the use of the FontAwesome font without triggering the rules that add a glyph via generated content. A simple trick is to use a class name that starts with icon-
but does not match any of the predefined names in Font Awesome or any name otherwise used in your CSS or JavaScript code. E.g.,
<i class=icon-foo></i>
Alternatively, use CSS code that sets font-family: FontAwesome
and font-style: normal
on the i
element.
PS. Note that Private Use code points such as U+F015 have, by definition, no interoperable meaning. Consequently, when style sheets are disabled, 
will not be displayed as any character; the browser will use its way of communicating the presence of undefined data, such as a small box, possibly containing the code point number.