|
|
|
|
|
by keithnz
2524 days ago
|
|
also, just remember unicode is packed with icons though I find you do have to check if they render correctly.... but mostly they just work though you may need to make your font a bit bigger or it may look like UPDATE: apparently.... HN Isn't unicode friendly...https://pasteboard.co/IpxYWjH.png |
|
In general, avoid using font-based icons to avoid the problem you run into in your post above. :) SVGs are better in the vast majority of cases where you have control of markup.
Fonts are unreliable (esp on mobile) -- not enough that you should avoid them, but enough that you should avoid them for anything you need to look correct. I've seen websites and apps where not only do the unicode symbols not display, they get flat out replaced with different images, since some fonts organize themselves differently. And if they don't display, Unicode doesn't gracefully degrade, it just shows nothing.
It's always weirded me out and slightly annoyed me that emoji are associated with Unicode at all, it's a terrible format for accessibility. The more robust, markdown-ish way to do this would be to abandon attaching them to Unicode characters entirely and wholesale switch to the Slack/Twitter convention of spelling things out.
That way your unsupported emoji degrade perfectly, can be translated into multiple languages or be given aliases, and are more future-proof/extensible. If someone has a viewer that understands an emoji they can just swap out the fallback text in-place. Emoji should be built like escalators, not elevators.Plus, spelling them out allows you to use emoji like :squirtle_squad_robbing_bank: or :children_standing_in_cornfield: even though they haven't technically made it into the standard yet. On an unrelated note, for some reason the standards body has stopped responding to any of my emails.