Forum Moderators: open
But please think twice about slathering on the emojis
They’re not actually pictures, they’re characters in a font, and different operating systems have different default fonts.
The problem is that the custom font is better than nothing on Windows but worse than the default on other OS's.Are you able to put each of those emojis into a named span (even if it means 80 of them on the page)? You then need to put a line in the CSS that says
span.emoji {font-family: OSFamily1, OSFamily2, MyFamily3;}listed in order of preference: the ones that are better than your custom font come before your custom font. The browser will pick the first one it has available. And then elsewhere in the CSS you put an @font-face rule to cover the custom font.
if (window.navigator.platform == "Win32") body.style["font-family"] = "OpenSansEmoji";
But my understanding is that defaults fonts for Linux, Android, IOs would all load on Windows, they just would do a lousy job rendering the Emojis.Yup, that's yet another complication. Sometimes two or more platforms will have a font with the same name, but it isn’t really the identical font. Or, worse, they look the same for basic Latin-1 text and then have entirely different content when you get into remoter unicode ranges.
font-family: OpenSans, sans-serif;