summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_win_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-11-23 16:08:04 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-11-23 16:42:11 +0100
commit6ef5b4485b9fe5a9d25d2d9b5e67f110fb728a8b (patch)
treecf1fcc3f603c1bdf234e235fc96a943295084731 /src/gui/text/qfontengine_win_p.h
parent50465c3409d699612a59b6c1d16e3502bb3a92fd (diff)
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.h2
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 9c4b0a9280..43e1f12105 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;