diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-11-23 15:08:04 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-11-23 15:42:11 (GMT) |
commit | 6ef5b4485b9fe5a9d25d2d9b5e67f110fb728a8b (patch) | |
tree | cf1fcc3f603c1bdf234e235fc96a943295084731 /src/gui/text/qfontengine_win_p.h | |
parent | 50465c3409d699612a59b6c1d16e3502bb3a92fd (diff) | |
download | Qt-6ef5b4485b9fe5a9d25d2d9b5e67f110fb728a8b.zip Qt-6ef5b4485b9fe5a9d25d2d9b5e67f110fb728a8b.tar.gz Qt-6ef5b4485b9fe5a9d25d2d9b5e67f110fb728a8b.tar.bz2 |
Fix positioning of diacritics in .otf fonts on Windows
Since .otf fonts are not considered truetype fonts, they take the
code paths intended for non-outline fonts. When calculating the bounding
box of a glyph, this would mean we'd find the largest possible bounding
rect of any glyph in the font, while the other metrics, such as the GPOS
tables used to position diacritics in relation to base glyphs, are
positioning the actual outline of the glyph. The result was that certain
diacritics that depended on the opentype positioning would not be shown on
Windows at all, as they would be positioned based on the wrong left bearing
and height when drawn into the glyph cache.
The fix is to find the tight bounding rect of the outline whenever
possible and fall back to the old code when this fails. I've also added
the left bearing of the glyph to the bounding box in the fallback case,
as we did not respect this before and would misplace glyphs that has
a bearing.
Task-number: QTBUG-5860
Reviewed-by: Trond
Diffstat (limited to 'src/gui/text/qfontengine_win_p.h')
-rw-r--r-- | src/gui/text/qfontengine_win_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h index 9c4b0a9..43e1f12 100644 --- a/src/gui/text/qfontengine_win_p.h +++ b/src/gui/text/qfontengine_win_p.h @@ -109,6 +109,8 @@ public: int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const; void getCMap(); + bool getOutlineMetrics(glyph_t glyph, const QTransform &t, glyph_metrics_t *metrics) const; + QString _name; HFONT hfont; LOGFONT logfont; |