From e89e9825cc47a02a195f41fb44a8d09e0ec1a84d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 8 Oct 2014 12:30:27 +0200 Subject: Fix missing glyphs in selection Change 198009db79a85d3cab7fe3a6432635d36123a2d6 revealed a bug in the new selection algorithm which would occur sometimes when a given run of text spanned several script items. Since we are checking the glyph runs for overlaps in the actual text, we need to report the exact characters spanned by the glyph run. We use the new enabler for this in QGlyphRunPrivate. Added a new test case which is an error case we did not yet cover, which is when there is only a single script item, but several font engines are used to produce it (fallback fonts). Change-Id: Ie4c3e79ad98a033d5c75fd67ada4ae83df33435b Task-number: QTBUG-41808 Reviewed-by: Simon Hausmann --- .../data/text/textinput_selected_fallback_font.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/manual/scenegraph_lancelot/data/text/textinput_selected_fallback_font.qml (limited to 'tests/manual/scenegraph_lancelot') diff --git a/tests/manual/scenegraph_lancelot/data/text/textinput_selected_fallback_font.qml b/tests/manual/scenegraph_lancelot/data/text/textinput_selected_fallback_font.qml new file mode 100644 index 0000000000..2c5b152ea1 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/textinput_selected_fallback_font.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +Item { + width: 320 + height: 480 + TextInput { + anchors.centerIn: parent + id: textInput + font.family: "Arial" + font.pixelSize: 14 + text: "∯AA≨" + + Component.onCompleted: { + textInput.select(2, 4) + } + } +} -- cgit v1.2.3