htmlcssunicodeemojiicon-fonts

css icon without image


How are icons / images shown (šŸ›, šŸ“š, šŸš€ ) which appear to be a normal character (as if i would enter b,d,r)

<p>
<span data-preserver-spaces="true">
If your team is a bit more "fun", you can always give these alternate signals a shot: 
āœØ (<span style="font-family: 'andale mono', 'lucida console';">feat</span>), 
šŸ› (<span style="font-family: 'andale mono', 'lucida console';">fix</span>), 
šŸ“š (<span style="font-family: 'andale mono', 'lucida console';">docs</span>), 
šŸ’Ž (<span style="font-family: 'andale mono', 'lucida console';">style</span>), 
ā™»ļø (<span style="font-family: 'andale mono', 'lucida console';">refactor</span>), 
šŸš€ (<span style="font-family: 'andale mono', 'lucida console';">perf</span>), 
āœ… (<span style="font-family: 'andale mono', 'lucida console';">test</span>), 
šŸ“¦ (<span style="font-family: 'andale mono', 'lucida console';">build</span>), 
šŸ‘· (<span style="font-family: 'andale mono', 'lucida console';">ci</span>), 
šŸ”§ (<span style="font-family: 'andale mono', 'lucida console';">chore</span>).
</span>
</p>

In case it does not render on every browser i copied the code above to this codepen and attach this screenshot here

Icons

Question

not relevant


Solution

  • Yes, they are all Unicode characters, and the fonts have to deal with them of course, that's why you sometimes encounter an empty rectangle or a question mark instead of the actual icon. You can play around with this tool that tells you what character is it.

    The tool balestone returns the unicode for a given input.

    bug_books_rocket

    Pasting in the characters for bug, books, rocket (šŸ› šŸ“š šŸš€) resulted in

    U+1F41B : BUG
    U+1F4DA : BOOKS
    U+1F680 : ROCKET