[pango/kill-ft-face: 13/18] fc: Drop some gratitious use of FT types



commit f63c8929650b8cac5ea258abe975accf9dc49374
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 4 15:00:23 2019 +0000

    fc: Drop some gratitious use of FT types

 pango/pangofc-font.c    | 14 ++------------
 pango/pangofc-private.h |  1 -
 pango/pangoft2.c        |  2 +-
 pango/pangoxft-font.c   |  1 -
 4 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index e4d2f0da..976b852a 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -195,16 +195,8 @@ pattern_is_transformed (FcPattern *pattern)
 
   if (FcPatternGetMatrix (pattern, FC_MATRIX, 0, &fc_matrix) == FcResultMatch)
     {
-      FT_Matrix ft_matrix;
-
-      ft_matrix.xx = 0x10000L * fc_matrix->xx;
-      ft_matrix.yy = 0x10000L * fc_matrix->yy;
-      ft_matrix.xy = 0x10000L * fc_matrix->xy;
-      ft_matrix.yx = 0x10000L * fc_matrix->yx;
-
-      return ((ft_matrix.xy | ft_matrix.yx) != 0 ||
-             ft_matrix.xx != 0x10000L ||
-             ft_matrix.yy != 0x10000L);
+      return fc_matrix->xx != 1 || fc_matrix->xy != 0 ||
+             fc_matrix->yx != 0 || fc_matrix->yy != 1;
     }
   else
     return FALSE;
@@ -805,7 +797,6 @@ _pango_fc_font_set_font_key (PangoFcFont    *fcfont,
 /**
  * pango_fc_font_get_raw_extents:
  * @fcfont: a #PangoFcFont
- * @load_flags: flags to pass to FT_Load_Glyph()
  * @glyph: the glyph index to load
  * @ink_rect: (out) (optional): location to store ink extents of the
  *   glyph, or %NULL
@@ -826,7 +817,6 @@ _pango_fc_font_set_font_key (PangoFcFont    *fcfont,
  **/
 void
 pango_fc_font_get_raw_extents (PangoFcFont    *fcfont,
-                              FT_Int32        load_flags,
                               PangoGlyph      glyph,
                               PangoRectangle *ink_rect,
                               PangoRectangle *logical_rect)
diff --git a/pango/pangofc-private.h b/pango/pangofc-private.h
index 658d68fe..8d281ad8 100644
--- a/pango/pangofc-private.h
+++ b/pango/pangofc-private.h
@@ -70,7 +70,6 @@ void            _pango_fc_font_set_font_key      (PangoFcFont    *fcfont,
 
 _PANGO_EXTERN
 void            pango_fc_font_get_raw_extents    (PangoFcFont    *font,
-                                                 FT_Int32        load_flags,
                                                  PangoGlyph      glyph,
                                                  PangoRectangle *ink_rect,
                                                  PangoRectangle *logical_rect);
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index a5ac6fc5..e2d5685f 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -309,7 +309,7 @@ pango_ft2_font_get_glyph_info (PangoFont   *font,
     {
       info = g_slice_new0 (PangoFT2GlyphInfo);
 
-      pango_fc_font_get_raw_extents (fcfont, ft2font->load_flags,
+      pango_fc_font_get_raw_extents (fcfont,
                                     glyph,
                                     &info->ink_rect,
                                     &info->logical_rect);
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 91856304..2526b13d 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -331,7 +331,6 @@ get_glyph_extents_raw (PangoXftFont     *xfont,
       extents = g_slice_new (Extents);
 
       pango_fc_font_get_raw_extents (PANGO_FC_FONT (xfont),
-                                    FT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING,
                                     glyph,
                                     &extents->ink_rect,
                                     &extents->logical_rect);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]