I'm finding Unicode for special characters from FileFormat.Info's search.
Some characters are rendering as the classic black-and-white glyphs, such as ⚠ (warning sign, \u26A0
or ⚠
). These are preferable, since I can apply CSS styles (such as color) to them.
Others are rendering as newer cartoony emoji, such as ⌛ (hourglass, \u231B
or ⌛
). These are not preferable, since I cannot fully style them.
It appears that the browser is making this change, since I'm able to see the hourglass glyph on Mac Firefox, just not Mac Chrome nor Mac Safari.
Is there a way to force browsers to display the older (flat monotone) versions to display?
Update: It seems (from comments below) there is a text presentation selector, FE0E
, available to enforce text-vs-emoji. The selector is concatenated as a suffix without space onto the character's code, such as ⌛︎
for HTML hex or \u231B\uFE0E
for JS. However, it is simply not honored by all browsers (eg Chrome and Edge).
Android fonts are not rich as you may expect. Font files don't have these exotic glyph and Android has a hack for few characters without glyph. They are replaced with icons.
So solution is to integrate the site with a web font (woff). Create new font file with FontForge and pick required glyph from free serif TTF for example. Every glyph takes 1k. Generate woff file.
Prepare simple CSS to import the custom font family.
style.css:
index.html file:
None of the solutions above worked for the "Emoji for Google Chrome" Extension.
So I made a screenshot of the Unicode Character 'BALLOT BOX WITH CHECK' (U+2611) and added it as image with php:
See: https://spacetrace.org/man_card.php?tec_id=21&techname=multi-emp-vessel
Append the Unicode variation selector character for forcing text, VS15,
︎
.This forces the previous character to be rendered as text rather than as an Emoji Symbol.
For me on OSX the solution was to set font-family to
EmojiSymbols
I had such a Unicode character as
span::before
content. Chrome used "Segoe UI Emoji" as the font to render it. Even when i set the font family to "Segoe UI Symbol", it didn't work.But, when I set the font-family to "Segoe UI Symbol" explicitly for the
span::before
, rather than just for thespan
, then it worked.I dont know of a way to turn off the emoji type rendering. Usually I use an icon font such as font awesome or glyphicons (comes with Bootstrap 3).
The benefit of using these over the unicode characters is that
The only downside is that its one more thing for the browser to download when they view your page.