4 ms·
Emojis are complicated from a font rendering perspective. But from a string processing perspective, they're generally going to be among the simplest characters:
by jcranmer 1y ago
Emojis are complicated from a font rendering perspective. But from a string processing perspective, they're generally going to be among the simplest characters: they don't have a lot of complex properties with a lot of variation between individual characters. Compare something like the basic Latin characters, where the mappings for precomposed characters are going to vary wildly from 'a' to 'b' to 'c', etc., whereas the list of precomposed characters for the emoji blocks amounts to "none."
- necovek 1y agoAgreed! FWIW, they are not even "complicated" from a font rendering perspective: they're simple non-combining characters and they are probably never used in ligatures either (though nothing really stops you; just like you can have locale-specific variants with locl tables). It's basically "draw whatever is in a font at this codepoint". Yes, if you want to call them out based on Unicode names, you need to have them in the database, and there are many of them, so a font needs to have them all, but really, they are the simplest of characters Unicode could have.
- nicoburns 1y ago"draw whatever is in a font at this codepoint" is doing quite a lot of work there. Some emoji fonts just embed a PNG which is easy. But COLRv1 fonts define an entire vector graphics imaging model which is similar what you need to render an SVG.
- kibwen 1y agoYes, but at this point we're completely outside the scope of Unicode, which has nothing to do with how anything actually gets drawn to the screen.
- overfeed 1y ago> they're simple non-combining characters Skin-tone emoji's are combined characters: base emoji + tone.
- necovek 1y agoTIL, thanks for pointing it out.
- SkiFire13 1y agoTo add to the skintone emojis example, country flags emojis are combined characters using two letter characters corresponding to the country code. The various "family" emojis are also combined characters of individual person emojis, and so on.
- nine_k 1y agoSorry, what? You mean, emoji composition rules are simpler than combining diacritics? https://blog.codepoints.net/emojis-under-the-hood.html https://blog.codepoints.net/emojis-under-the-hood.html
- necovek 1y agoI was unaware of this: thanks for pointing it out!