[FREETYPE] Update to v2.6.1. CORE-10378
[reactos.git] / reactos / lib / 3rdparty / freetype / src / type1 / t1gload.c
index 5727577..56d7ccd 100644 (file)
       {
         FT_BBox            cbox;
         FT_Glyph_Metrics*  metrics = &t1glyph->metrics;
-        FT_Vector          advance;
 
 
         /* copy the _unscaled_ advance width */
 
 #if 1
         /* apply the font matrix, if any */
-        if ( font_matrix.xx != 0x10000L || font_matrix.yy != font_matrix.xx ||
-             font_matrix.xy != 0        || font_matrix.yx != 0              )
+        if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L ||
+             font_matrix.xy != 0        || font_matrix.yx != 0        )
+        {
           FT_Outline_Transform( &t1glyph->outline, &font_matrix );
 
+          metrics->horiAdvance = FT_MulFix( metrics->horiAdvance,
+                                            font_matrix.xx );
+          metrics->vertAdvance = FT_MulFix( metrics->vertAdvance,
+                                            font_matrix.yy );
+        }
+
         if ( font_offset.x || font_offset.y )
+        {
           FT_Outline_Translate( &t1glyph->outline,
                                 font_offset.x,
                                 font_offset.y );
 
-        advance.x = metrics->horiAdvance;
-        advance.y = 0;
-        FT_Vector_Transform( &advance, &font_matrix );
-        metrics->horiAdvance = advance.x + font_offset.x;
-        advance.x = 0;
-        advance.y = metrics->vertAdvance;
-        FT_Vector_Transform( &advance, &font_matrix );
-        metrics->vertAdvance = advance.y + font_offset.y;
+          metrics->horiAdvance += font_offset.x;
+          metrics->vertAdvance += font_offset.y;
+        }
 #endif
 
         if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )