diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-01-12 13:09:40 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-01-12 13:25:56 +0900 |
| commit | e0a38072cf48a6819a5cd788588267f3441d9d6a (patch) | |
| tree | 5875e89df7d84f3c72f19496961694ab6009e5a1 /src/kernel/tqtextengine_unix.cpp | |
| parent | ccd304b2a6415d8b747d04b3a47736d1e6f45717 (diff) | |
| download | tqt-e0a38072cf48a6819a5cd788588267f3441d9d6a.tar.gz tqt-e0a38072cf48a6819a5cd788588267f3441d9d6a.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>
Diffstat (limited to 'src/kernel/tqtextengine_unix.cpp')
| -rw-r--r-- | src/kernel/tqtextengine_unix.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernel/tqtextengine_unix.cpp b/src/kernel/tqtextengine_unix.cpp index 0d5e3b920..0de67f04a 100644 --- a/src/kernel/tqtextengine_unix.cpp +++ b/src/kernel/tqtextengine_unix.cpp @@ -80,8 +80,8 @@ void TQTextEngine::shape( int item ) const si.fontEngine = fnt->engineForScript( script ); si.fontEngine->ref(); - si.ascent = si.fontEngine->ascent(); - si.descent = si.fontEngine->descent(); + si.ascent = si.fontEngine->ascent(); + si.descent = si.fontEngine->descent(); si.num_glyphs = 0; if ( si.fontEngine && si.fontEngine != (TQFontEngine*)-1 ) { @@ -96,7 +96,6 @@ void TQTextEngine::shape( int item ) const shaper_item.has_positioning = FALSE; while (1) { -// tqDebug(" . num_glyphs=%d, used=%d, item.num_glyphs=%d", num_glyphs, used, shaper_item.num_glyphs); ensureSpace(shaper_item.num_glyphs); shaper_item.num_glyphs = num_glyphs - used; // tqDebug(" .. num_glyphs=%d, used=%d, item.num_glyphs=%d", num_glyphs, used, shaper_item.num_glyphs); |
