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/tqscriptengine.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/tqscriptengine.cpp')
| -rw-r--r-- | src/kernel/tqscriptengine.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/kernel/tqscriptengine.cpp b/src/kernel/tqscriptengine.cpp index 2d97c84d5..588596716 100644 --- a/src/kernel/tqscriptengine.cpp +++ b/src/kernel/tqscriptengine.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; |
