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/qtextengine.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/kernel/qtextengine.cpp') diff --git a/src/kernel/qtextengine.cpp b/src/kernel/qtextengine.cpp index 48839b5c8..f527cd86a 100644 --- a/src/kernel/qtextengine.cpp +++ b/src/kernel/qtextengine.cpp @@ -150,7 +150,7 @@ static TQChar::Direction basicDirection( const TQString &str ) } -static void tqAppendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir ) +static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir ) { TQScriptItemArray &items = engine->items; const TQChar *text = engine->string.unicode(); @@ -243,9 +243,6 @@ static void tqAppendItems(TQTextEngine *engine, int &start, int &stop, BidiContr start = stop; } -typedef void (* fAppendItems)(TQTextEngine *, int &start, int &stop, BidiControl &control, TQChar::Direction dir); -static fAppendItems appendItems = tqAppendItems; - // creates the next TQScript items. static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) { @@ -666,8 +663,6 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) if ( sor <= eor ) appendItems(engine, sor, eor, control, dir); - - } void TQTextEngine::bidiReorder( int numItems, const TQ_UINT8 *levels, int *visualOrder ) -- cgit v1.2.3