summaryrefslogtreecommitdiffstats
path: root/tests/auto/shared/resources/test.ttf
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-12-12 11:04:54 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-12-15 13:44:04 +0000
commitd37ef31674d4de6907011e9c0cb7de34c1a4a03f (patch)
tree4b032429090bdc58cd775109b92da9026fdb3c5d /tests/auto/shared/resources/test.ttf
parent70b6896a820cf96fed6dd49657bd0a7df9c35df2 (diff)
Don't hide object replacement char except in rich textv6.5.0-beta1
The object replacement character (U+FFFC) is used to represent inline objects such as images in rich-text. To enable this, we have special handling of it in QTextEngine. For classes where inline images are not supported, it will just be hidden from the visual text, which is unexpected. Instead of always special-casing it, we make this dependent on whether the document layout has registered any object handlers. If they have not, then there will be no visual representation of the object, and it is better to show the glyph for it. For anything based on QTextDocument, there will always be the image handler, so U+FFFC will still have special handling there, but for non-rich labels and plain text editors the glyph will be shown instead. Note that there was also a bug in QLineEdit, where the object replacement character was always replaced by a space. This was introduced in 2007, in a patch which replaced a !ch.isPrint() with a check for "the most obvious non-printable characters" to reduce the number of characters that were not shown. However, U+FFFC is a printable character and would thus not have been filtered by the !isPrint() condition, so I think this was a mistake at the time. However, due to the special-casing of the character in Qt, it would not have had any effect until now. This also changes the QTextLayout::cursorToXForInlineObject() test to actually test proper inline objects, as this was previously using a hack which depended on the inline object code to be used even for plain QTextLayouts with no handlers for these. [ChangeLog][Text] The object replacement character (U+FFFC) is now only filtered out in rich text controls, where they represent inline objects. In other controls, its glyphs will be shown as with other text. Fixes: QTBUG-101526 Change-Id: I7fcaf2b10918feb41589e1098016efbf79a0e62d Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit ca64365e3a7245f6ef0f8f6962db3c1b85421cef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/shared/resources/test.ttf')
-rw-r--r--tests/auto/shared/resources/test.ttfbin2128 -> 2196 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/tests/auto/shared/resources/test.ttf b/tests/auto/shared/resources/test.ttf
index b2bb6cd036..8b56c046d4 100644
--- a/tests/auto/shared/resources/test.ttf
+++ b/tests/auto/shared/resources/test.ttf
Binary files differ