qt5base-lts/tests/auto/gui/text/qfontmetrics
Eskil Abrahamsen Blomfeldt e6880e7cd1 Fix text shifting vertically when elided
When eliding text we would check for the existence of the ellipsis
character and fall back to using the dot if it was not available.
However, when font merging was in use, we would also use ellipsis
from a fallback font if available. This could cause the metrics
of the text to increase if the fallback font had larger metrics,
and the result was that text could shift when elided.

It is better to prefer the dot from the current font than to use
the ellipsis from a fallback, so we only use the ellipsis if
it is in the main font.

[ChangeLog][QtGui][Text] Fixed a bug where eliding text could
change the height of its bounding rectangle for certain fonts.

Fixes: QTBUG-72553
Change-Id: Ib27fc65302465ddce661801bcc5ae32e55f1aeb9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 10:27:12 +00:00
..
.gitignore
qfontmetrics.pro Tests: Remove CONFIG += parallel_test. 2015-09-05 07:16:50 +00:00
testfont.qrc Fix text shifting vertically when elided 2018-12-21 10:27:12 +00:00
tst_qfontmetrics.cpp Fix text shifting vertically when elided 2018-12-21 10:27:12 +00:00
ucs4font.ttf