1

I am using Fedora and installed fontawesome via sudo dnf install fontawesome fonts. Later because it didn't work I also additionally installed the font manually via downloading the zip from the Github page and following these instructions.

When I copy a icon, e.g. the Firefox Icon  via "Copy Glyph" from this Website and then I paste it into my Vim or Emacs, not the Firefox logo ist pasted, but instead a checkmark  appears. The same happens, when I insert it with the unicode insertion e.g. ctr+v u+e007.

The same principle also happens with other icons: another unicode character which is not the icon appears. E.g. instead of for the Signal Messenger Icon, a cup with a straw appears. The output of file -bi on the file is text/plain; charset=utf-8 so the encoding is utf-8.

How can I paste it correctly?

For context: I am trying to configure the i3 bar to use icons, but since I am unable to paste them into the configuration file, this doesn't work. I searched for similar questions, but all the questions regarding the fontawesome font icons were about displaying them correctly, not pasting them correctly. I nevertheless tried some of the solutions, which didn't work.

1 Answer 1

1

Font Awesome fonts have their icons assigned to code points in the Unicode Private Use Areas. These are sets of code points which can be used when an application needs "characters" that are not part of the Unicode standard, at the price of interoperability since, unlike normal Unicode characters, Unicode does not, by definition, define the meaning of each PUA code point.

So, you don't just have to install the Font Awesome fonts, you also have to ensure that the text you're using them for is rendered with those fonts. Otherwise, the system (e.g., via FontConfig) will probably select some font which has glyphs for these code points, but these fonts might be using them for completely different purposes.

2
  • Thank you for the answer, that explains a lot! :) Giving this an upvote. Actually my problem disappeared after a complete reboot of the system (not just logout and login) and now they are rendered correctly. Because of this, I am not sure, whether I should mark this as the accepted answer, even though technically it didn't solve the problem.
    – Sinthoras
    Commented Apr 5 at 9:09
  • 1
    That reboot might have triggered some rebuild of Vim's/Emacs' font caches or something. Fundamentally, if you didn't configure your editor to prioritize Font Awesome fonts over other fonts, then it's just luck that the characters are rendered with those fonts. Note that this is not necessarily a problem. If your underlying goal is to use the icons in i3, then you can configure i3 only, and just accept that when you edit the files, the characters look weird (but they're still the right characters). Commented Apr 5 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .