summaryrefslogtreecommitdiffstats
path: root/src/kernel/qtextengine.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-01-12 13:09:40 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-01-12 23:34:08 +0900
commitb559abe7220b3d86edc427bcbf7db26f9f6f62d6 (patch)
tree83c6a8a483f629d23d12d93f210379f5c51281f4 /src/kernel/qtextengine.cpp
parent1c9111b3795a3b87254cbac172dcc565c7f76a57 (diff)
downloadtqt-b559abe7220b3d86edc427bcbf7db26f9f6f62d6.tar.gz
tqt-b559abe7220b3d86edc427bcbf7db26f9f6f62d6.zip
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 <michele.calgaro@yahoo.it> (cherry picked from commit e0a38072cf48a6819a5cd788588267f3441d9d6a)
Diffstat (limited to 'src/kernel/qtextengine.cpp')
-rw-r--r--src/kernel/qtextengine.cpp7
1 files changed, 1 insertions, 6 deletions
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 )