From b559abe7220b3d86edc427bcbf7db26f9f6f62d6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 12 Jan 2025 13:09:40 +0900 Subject: Add support for Unicode surrogate characters and planes above zero. If the selected font supports the required characters, the text will be displayed correctly. If the selected font does not support such characters, empty boxes will be displayed in place of the expected text. Part of the code changes comes from Qt4 code. Signed-off-by: Michele Calgaro (cherry picked from commit e0a38072cf48a6819a5cd788588267f3441d9d6a) --- src/kernel/qscriptengine.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/kernel/qscriptengine.cpp') diff --git a/src/kernel/qscriptengine.cpp b/src/kernel/qscriptengine.cpp index 19ca36e97..cc454d72f 100644 --- a/src/kernel/qscriptengine.cpp +++ b/src/kernel/qscriptengine.cpp @@ -279,15 +279,13 @@ void qt_heuristicPosition(TQShaperItem *item) -// set the glyph attributes heuristically. Assumes a 1 to 1 relationship between chars and glyphs -// and no reordering. -// also computes logClusters heuristically +// Set the glyph attributes heuristically. Assumes no reordering. +// Also computes logClusters heuristically static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, int length) { // justification is missing here!!!!! - if ( item->num_glyphs != length ) - tqWarning("TQScriptEngine::heuristicSetGlyphAttributes: char length and num glyphs disagree" ); + Q_ASSERT(item->num_glyphs <= length); unsigned short *logClusters = item->log_clusters; -- cgit v1.2.3