diff --git a/NEWS.md b/NEWS.md index 0862ca8e..2c38a7ae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 "Makefile is modifed" when "View Makefile" is rerun. - fix: In compiler options page, Can't save default stack size to 0MB. + - enhancement: Support national flag emojis. Red Panda C++ Version 3.0 diff --git a/libs/qsynedit/qsynedit/document.cpp b/libs/qsynedit/qsynedit/document.cpp index 181f2cd1..9176a29d 100644 --- a/libs/qsynedit/qsynedit/document.cpp +++ b/libs/qsynedit/qsynedit/document.cpp @@ -839,9 +839,15 @@ QList calcGlyphStartCharList(const QString &text) //a Combining character } else if (ucs4>=0xE0100 && ucs4 <= 0xE01EF) { //variation selector + } else if (ucs4>=0x1F3FB && ucs4 <= 0x1F3FF) { + //Emoji modifiers for skin tone + } else if (!consecutive) { + glyphStartCharList.append(i); + if (ucs4>=0x1F1E6 && ucs4<=0x1F1FF) // National Flags emoji + consecutive = true; + else + consecutive = false; } else { - if (!consecutive) - glyphStartCharList.append(i); consecutive = false; } i+=2;