diff options
author | Michele Calgaro <[email protected]> | 2025-01-12 13:09:40 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2025-01-12 13:25:56 +0900 |
commit | e0a38072cf48a6819a5cd788588267f3441d9d6a (patch) | |
tree | 5875e89df7d84f3c72f19496961694ab6009e5a1 /src/kernel/tqpainter.cpp | |
parent | ccd304b2a6415d8b747d04b3a47736d1e6f45717 (diff) | |
download | tqt3-e0a38072cf48a6819a5cd788588267f3441d9d6a.tar.gz tqt3-e0a38072cf48a6819a5cd788588267f3441d9d6a.zip |
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 <[email protected]>
Diffstat (limited to 'src/kernel/tqpainter.cpp')
-rw-r--r-- | src/kernel/tqpainter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/tqpainter.cpp b/src/kernel/tqpainter.cpp index 452af0a57..7b30e0af6 100644 --- a/src/kernel/tqpainter.cpp +++ b/src/kernel/tqpainter.cpp @@ -2883,12 +2883,12 @@ void qt_format_text( const TQFont& font, const TQRect &_r, int desc = fm.descent(); height = -leading; - //tqDebug("\n\nbeginLayout: lw = %d, rectwidth=%d", lineWidth , r.width()); + //tqDebug("beginLayout: lw = %d, rectwidth=%d", lineWidth , r.width()); while ( !textLayout.atEnd() ) { height += leading; - textLayout.beginLine( lineWidth == INT_MAX ? lineWidth : lineWidth ); + textLayout.beginLine( lineWidth ); //tqDebug("-----beginLine( %d )-----", lineWidth ); - bool linesep = FALSE; + bool linesep = false; while ( 1 ) { TQTextItem ti = textLayout.currentItem(); //tqDebug("item: from=%d, ch=%x", ti.from(), text.unicode()[ti.from()].unicode() ); @@ -2913,7 +2913,7 @@ void qt_format_text( const TQFont& font, const TQRect &_r, ti.setWidth( tw ); } if ( ti.isObject() && text.unicode()[ti.from()] == TQChar_linesep ) - linesep = TRUE; + linesep = true; if ( linesep || textLayout.addCurrentItem() != TQTextLayout::Ok || textLayout.atEnd() ) break; |