diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-09-13 10:13:28 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-09-13 10:13:28 (GMT) |
commit | 8f9d38ed63a2c568596febe5ea59a55fe03d7ba9 (patch) | |
tree | aed0951fc53191a24c3f64862554976c57a708c9 /src/gui/text/qfontengine_ft.cpp | |
parent | 0bf1b83cd7d972a69388cdbd759dbba8b1baffd2 (diff) | |
parent | 72cc21e597f2d77ea1be3c1a3f7df36d8909d2fc (diff) | |
download | Qt-8f9d38ed63a2c568596febe5ea59a55fe03d7ba9.zip Qt-8f9d38ed63a2c568596febe5ea59a55fe03d7ba9.tar.gz Qt-8f9d38ed63a2c568596febe5ea59a55fe03d7ba9.tar.bz2 |
Merge branch 'qt-4.7' into lighthouse-4.7
Conflicts:
configure
src/corelib/tools/qsimd.cpp
Diffstat (limited to 'src/gui/text/qfontengine_ft.cpp')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 1ee7144..814ad21 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -94,6 +94,13 @@ QT_BEGIN_NAMESPACE #define Y_SIZE(face,i) ((face)->available_sizes[i].height << 6) #endif +/* FreeType 2.1.10 starts to provide FT_GlyphSlot_Embolden */ +#if (FREETYPE_MAJOR*10000+FREETYPE_MINOR*100+FREETYPE_PATCH) >= 20110 +#define Q_FT_GLYPHSLOT_EMBOLDEN(slot) FT_GlyphSlot_Embolden(slot) +#else +#define Q_FT_GLYPHSLOT_EMBOLDEN(slot) +#endif + #define FLOOR(x) ((x) & -64) #define CEIL(x) (((x)+63) & -64) #define TRUNC(x) ((x) >> 6) @@ -799,7 +806,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyphMetrics(QGlyphSet *set, uint glyph } FT_GlyphSlot slot = face->glyph; - if (embolden) FT_GlyphSlot_Embolden(slot); + if (embolden) Q_FT_GLYPHSLOT_EMBOLDEN(slot); int left = slot->metrics.horiBearingX; int right = slot->metrics.horiBearingX + slot->metrics.width; int top = slot->metrics.horiBearingY; @@ -945,7 +952,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, Glyph return 0; FT_GlyphSlot slot = face->glyph; - if (embolden) FT_GlyphSlot_Embolden(slot); + if (embolden) Q_FT_GLYPHSLOT_EMBOLDEN(slot); FT_Library library = qt_getFreetype(); info.xOff = TRUNC(ROUND(slot->advance.x)); @@ -1563,8 +1570,6 @@ bool QFontEngineFT::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs FT_Face face = freetype->face; for ( int i = 0; i < len; ++i ) { unsigned int uc = getChar(str, i, len); - if (mirrored) - uc = QChar::mirroredChar(uc); glyphs->glyphs[glyph_pos] = uc < QFreetypeFace::cmapCacheSize ? freetype->cmapCache[uc] : 0; if ( !glyphs->glyphs[glyph_pos] ) { glyph_t glyph; |