- enhancement: Support national flags emoji.

This commit is contained in:
Roy Qu 2024-05-18 17:40:39 +08:00
parent 0e3a1fdca9
commit 296bdfafeb
2 changed files with 9 additions and 2 deletions

View File

@ -5,6 +5,7 @@ Red Panda C++ Version 3.1
- fix: Shouldn't warn "xxx.s is modifed" when "Generate assembly" is rerun. - fix: Shouldn't warn "xxx.s is modifed" when "Generate assembly" is rerun.
- fix: Shouldn't warn "Makefile is modifed" when "View Makefile" is rerun. - fix: Shouldn't warn "Makefile is modifed" when "View Makefile" is rerun.
- fix: In compiler options page, Can't save default stack size to 0MB. - fix: In compiler options page, Can't save default stack size to 0MB.
- enhancement: Support national flag emojis.
Red Panda C++ Version 3.0 Red Panda C++ Version 3.0

View File

@ -839,9 +839,15 @@ QList<int> calcGlyphStartCharList(const QString &text)
//a Combining character //a Combining character
} else if (ucs4>=0xE0100 && ucs4 <= 0xE01EF) { } else if (ucs4>=0xE0100 && ucs4 <= 0xE01EF) {
//variation selector //variation selector
} else { } else if (ucs4>=0x1F3FB && ucs4 <= 0x1F3FF) {
if (!consecutive) //Emoji modifiers for skin tone
} else if (!consecutive) {
glyphStartCharList.append(i); glyphStartCharList.append(i);
if (ucs4>=0x1F1E6 && ucs4<=0x1F1FF) // National Flags emoji
consecutive = true;
else
consecutive = false;
} else {
consecutive = false; consecutive = false;
} }
i+=2; i+=2;