diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-11-18 12:15:48 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-11-18 13:34:25 +0100 |
commit | e19345987714f4f76c8d7075355980b154adbc44 (patch) | |
tree | 727c1a33502230784edcebe5f95ba41393797c5d /util/harfbuzz | |
parent | 8e8b50b06165903a6d0e3d08737e67be47d5ec3b (diff) |
Fix kerning with fractional pixel size
Since most of our APIs for pixel size are integer-based, we
would assume it was when passing it to Harfbuzz. But QRawFont
(and the internal APIs in Qt and Harfbuzz) support floating
point pixel sizes. The result would be that setting e.g.
pixel size 20.25 would give the same glyph positions as 20.75,
but the glyphs would be some fraction of a pixel larger.
Using floats instead should have no impact on the common case
where the pixel size is an integer, but it should also enable
the other case, where QRawFont is used (or potentially future
APIs that do not have the integer limitation.)
[ChangeLog][QtGui][Text] Fixed a problem where pixel sizes
would be truncated before calculating glyph positions.
Fixes: QTBUG-67091
Change-Id: Ib066b1330ddcf52d4b344412e350aa9a60c847ff
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'util/harfbuzz')
0 files changed, 0 insertions, 0 deletions