From 0e6d4483c4043aec45e766494d5fc639dc7bec1d Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 26 Feb 2024 10:01:08 +0800 Subject: [PATCH] handle unicode ZWNJ --- libs/qsynedit/qsynedit/document.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/qsynedit/qsynedit/document.cpp b/libs/qsynedit/qsynedit/document.cpp index 09ebe9c9..cab25361 100644 --- a/libs/qsynedit/qsynedit/document.cpp +++ b/libs/qsynedit/qsynedit/document.cpp @@ -867,7 +867,8 @@ QList calcGlyphStartCharList(const QString &text) } i+=2; continue; - } else if (ch.unicode() == 0x200D) { + } else if (ch.unicode() == 0x200D || ch.unicode() == 0x200C ) { + //ZWJ && ZWNJ consecutive = true; } else if (ch.combiningClass()!=0 && !glyphStartCharList.isEmpty()) { //a Combining character