Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.2, 5.12.4
-
-
318a991907b6c08f52786160bafea1e30d3ad9bd (qt/qtbase/5.15)
Description
This was tested on Windows 10 default configuration with no dpi scaling.
Legend: 1. Arial - Ascii text; 2. Segoe UI Emoji - Ascii text; 3. Arial - Unicode; 4. Segoe UI Emoji - Unicode
See main.qml
Issues:
Rendering:
- The font "Segoe UI Emoji" is drawn a little too much to the right and down. This causes it to be drawn outside of its own Item. With clipping enabled, about one or two pixels are cut on the bottom. This offset was mentioned in the comments of
QTBUG-55096. On Stackoverflow there was some discussion: stackoverflow.com
- Arial fallback is drawn only in B/W. See
QTBUG-68763. - Arial is not using ligatures correctly when falling back to Segoe UI Emoji
Usability:
- Even with RichText html tags or Text.verticalAlignment, there is no way to vertically align the unicode characters such as emojis to the top or center of the line. They are always aligned to the bottom.
Metrics:
- Alignment of tightBoundingRect of Arial seems alright, with Segoe UI Emoji it's off a little (because of rendering). The issue gets worse the smaller the font is.
- childrenRect and tightBoundingRect of the Arial font both report too much width.
Documentation:
- There is next to no documentation on FontMetrics boundingRect and tightBoundingRect. I combined the x and y values to make them align with the Arial/Ascii example, but separately they don't make any sense, and there is no docs what they represent.
Attachments
For Gerrit Dashboard: QTBUG-71928 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
284260,3 | Windows: Fix offset of glyphs with DirectWrite font engine | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
302002,2 | Fix various offset issues with DirectWrite font engine | dev | qt/qtbase | Status: MERGED | +2 | 0 |
302111,3 | Fix various offset issues with DirectWrite font engine | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |