Issue #2492 - Standardized use of Emoji Character Properties

Detection of Emoji Components, for use as suffixes of TextDefault.
Detection of Non-Presentation Emojis as TextDefault.
Detection of all Extended Pictographics as EmojiDefault.
This commit is contained in:
Andy 2024-03-30 04:57:12 -07:00 committed by roytam1
commit 69f3b4e199
5 changed files with 33 additions and 32 deletions

View file

@ -3113,10 +3113,11 @@ gfxFontGroup::WhichPrefFontSupportsChar(uint32_t aCh, uint32_t aNextCh)
gfxPlatformFontList* pfl = gfxPlatformFontList::PlatformFontList();
EmojiPresentation emoji = GetEmojiPresentation(aCh);
if ((emoji != EmojiPresentation::TextOnly &&
(aNextCh == kVariationSelector16 ||
(emoji == EmojiPresentation::EmojiDefault &&
aNextCh != kVariationSelector15)))) {
EmojiPresentation eNext = GetEmojiPresentation(aNextCh);
if (aNextCh != kVariationSelector15 &&
emoji != EmojiPresentation::TextOnly &&
(emoji != EmojiPresentation::TextDefault ||
eNext == EmojiPresentation::EmojiComponent)) {
charLang = eFontPrefLang_Emoji;
} else {
// get the pref font list if it hasn't been set up already