Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.1, 5.14.1
-
None
-
Ubuntu Linux 16.10.
-
25677ec4b2957f7fd56618781dec28cb139f9df7 (qt/qtbase/5.14)
Description
Strings that contain sequences of ZWNJ (0x200c) or ZWSP (0x200b) cause QFontMetricsF to report boundingRects that do not match QPainter. In Qt 4 (4.8.7), the attached program outputs
|.| QRectF(-24,-1237 444x1571)
|..| QRectF(-24,-1237 444x1571)
|...| QRectF(-24,-1237 444x1571)
|*| QRectF(0,-1237 444x1571)
|**| QRectF(0,-1237 444x1571)
|***| QRectF(0,-1237 444x1571)
which correctly reflects the fact that repeated ZWNJ and ZWSP do not add actual width to text. In Qt5 (5.6.1), however, the output is:
|.| QRectF(0,-1237 814x1571)
|..| QRectF(0,-1237 1184x1571)
|...| QRectF(0,-1237 1554x1571)
|*| QRectF(0,-1237 868x1571)
|**| QRectF(0,-1237 1292x1571)
|***| QRectF(0,-1237 1716x1571)
This is not correct, and does not match how Qt renders text containing ZWNJ and ZWSP.
Attachments
For Gerrit Dashboard: QTBUG-58854 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
292011,3 | Fix bounding box of zero-width entities in QFontEngineFT | 5.14 | qt/qtbase | Status: MERGED | +2 | 0 |