Skip to main content

has_emoji_presentation

Function has_emoji_presentation 

Source
pub fn has_emoji_presentation(cluster: &str) -> bool
Expand description

Does this grapheme cluster have emoji presentation, per Unicode (UTS #51)?

True for clusters that default to a color glyph (😀, 🦀, 🇸🇪, 👨‍👩‍👧), for clusters with an explicit emoji presentation selector (⏮️, U+FE0F), and for emoji modifier (skin tone) sequences (☝🏻).

False for text-presentation symbols (⏮, ✔, ♥) and for clusters with an explicit text presentation selector (⏮︎, U+FE0E).

Used by eframe’s web glyph rasterizer to guess whether a browser-drawn glyph is color.