src/gui/text/qfontengine_ft.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
--- a/src/gui/text/qfontengine_ft.cpp	Fri Sep 17 08:34:18 2010 +0300
+++ b/src/gui/text/qfontengine_ft.cpp	Mon Oct 04 01:19:32 2010 +0300
@@ -94,6 +94,13 @@
 #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)
@@ -794,7 +801,7 @@
     }
 
     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;
@@ -940,7 +947,7 @@
         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));
@@ -1558,8 +1565,6 @@
         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;