From 84c7f73e8405b7e89202a2d3dcab140a656d618a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 30 Mar 2010 12:06:10 +0200 Subject: Compile on MingW MingW apparently doesn't support the GDI function GetCharABCWidthsI(), so the getGlyphBearings()-optimization is disabled for that compiler. Reviewed-by: Friedemann Kleint --- src/gui/text/qfontengine_win.cpp | 2 ++ src/gui/text/qfontengine_win_p.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index a133b48..92fb7de 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -649,6 +649,7 @@ static const ushort char_table[] = { static const int char_table_entries = sizeof(char_table)/sizeof(ushort); +#ifndef Q_CC_MINGW void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing) { HDC hdc = shared_dc(); @@ -673,6 +674,7 @@ void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal * } #endif } +#endif // Q_CC_MINGW qreal QFontEngineWin::minLeftBearing() const { diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h index f19e48e..68b53b5 100644 --- a/src/gui/text/qfontengine_win_p.h +++ b/src/gui/text/qfontengine_win_p.h @@ -106,7 +106,9 @@ public: virtual QImage alphaMapForGlyph(glyph_t, const QTransform &xform); virtual QImage alphaRGBMapForGlyph(glyph_t t, int margin, const QTransform &xform); +#ifndef Q_CC_MINGW virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0); +#endif int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const; void getCMap(); -- cgit v0.12