[pango/kill-ft-face: 17/17] Drop freetype from pangofc-font.h



commit 97c37a2313cc5ff7244eda92330a4b1e37f16544
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 4 17:39:06 2019 +0000

    Drop freetype from pangofc-font.h
    
    Stop using FT_Face here, so we can stop
    including freetype headers.

 pango/pangocairo-fcfont.c    | 2 +-
 pango/pangofc-font-private.h | 2 +-
 pango/pangofc-font.c         | 2 +-
 pango/pangofc-font.h         | 5 +----
 pango/pangoft2.c             | 4 ++--
 pango/pangoxft-font.c        | 6 +++---
 6 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c
index 0019f83a..9c450317 100644
--- a/pango/pangocairo-fcfont.c
+++ b/pango/pangocairo-fcfont.c
@@ -118,7 +118,7 @@ pango_cairo_fc_font_get_glyph_extents (PangoFont      *font,
                                               logical_rect);
 }
 
-static FT_Face
+static gpointer
 pango_cairo_fc_font_lock_face (PangoFcFont *font)
 {
   PangoCairoFcFont *cffont = (PangoCairoFcFont *) (font);
diff --git a/pango/pangofc-font-private.h b/pango/pangofc-font-private.h
index 07b088b3..91f89207 100644
--- a/pango/pangofc-font-private.h
+++ b/pango/pangofc-font-private.h
@@ -109,7 +109,7 @@ struct _PangoFcFontClass
   PangoFontClass parent_class;
 
   /*< public >*/
-  FT_Face    (*lock_face)         (PangoFcFont      *font);
+  gpointer   (*lock_face)         (PangoFcFont      *font);
   void       (*unlock_face)       (PangoFcFont      *font);
   gboolean   (*has_char)          (PangoFcFont      *font,
                                   gunichar          wc);
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index ba061810..d6529f5b 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -590,7 +590,7 @@ pango_fc_font_real_get_glyph (PangoFcFont *font,
  * Since: 1.4
  * Deprecated: 1.44: Use pango_font_get_hb_font() instead
  **/
-FT_Face
+gpointer
 pango_fc_font_lock_face (PangoFcFont *font)
 {
   g_return_val_if_fail (PANGO_IS_FC_FONT (font), NULL);
diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h
index 5d04088e..fc6ee529 100644
--- a/pango/pangofc-font.h
+++ b/pango/pangofc-font.h
@@ -30,8 +30,6 @@
 #pragma GCC diagnostic ignored "-Wundef"
 #endif
 
-#include <ft2build.h>
-#include FT_FREETYPE_H
 #include <fontconfig/fontconfig.h>
 
 #ifdef PANGO_COMPILATION
@@ -47,12 +45,11 @@ G_BEGIN_DECLS
 typedef struct _PangoFcFont      PangoFcFont;
 typedef struct _PangoFcFontClass PangoFcFontClass;
 
-
 PANGO_AVAILABLE_IN_ALL
 GType      pango_fc_font_get_type (void) G_GNUC_CONST;
 
 PANGO_DEPRECATED_IN_1_44_FOR(pango_font_get_hb_font)
-FT_Face    pango_fc_font_lock_face         (PangoFcFont      *font);
+gpointer   pango_fc_font_lock_face         (PangoFcFont      *font);
 PANGO_DEPRECATED_IN_1_44_FOR(pango_font_get_hb_font)
 void       pango_fc_font_unlock_face       (PangoFcFont      *font);
 
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index e2d5685f..e8bb8e1f 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -64,7 +64,7 @@ static void     pango_ft2_font_get_glyph_extents (PangoFont      *font,
                                                   PangoRectangle *ink_rect,
                                                   PangoRectangle *logical_rect);
 
-static FT_Face  pango_ft2_font_real_lock_face    (PangoFcFont    *font);
+static gpointer pango_ft2_font_real_lock_face    (PangoFcFont    *font);
 static void     pango_ft2_font_real_unlock_face  (PangoFcFont    *font);
 
 
@@ -430,7 +430,7 @@ pango_ft2_font_get_kerning (PangoFont *font,
   return PANGO_UNITS_26_6 (kerning.x);
 }
 
-static FT_Face
+static gpointer
 pango_ft2_font_real_lock_face (PangoFcFont *font)
 {
   return pango_ft2_font_get_face ((PangoFont *)font);
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 2526b13d..779eb886 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -75,7 +75,7 @@ static void                  pango_xft_font_get_glyph_extents (PangoFont
                                                               PangoRectangle   *ink_rect,
                                                               PangoRectangle   *logical_rect);
 
-static FT_Face    pango_xft_font_real_lock_face         (PangoFcFont      *font);
+static gpointer   pango_xft_font_real_lock_face         (PangoFcFont      *font);
 static void       pango_xft_font_real_unlock_face       (PangoFcFont      *font);
 static gboolean   pango_xft_font_real_has_char          (PangoFcFont      *font,
                                                         gunichar          wc);
@@ -449,12 +449,12 @@ xft_font_get_font (PangoFont *font)
   return xfont->xft_font;
 }
 
-static FT_Face
+static gpointer
 pango_xft_font_real_lock_face (PangoFcFont *font)
 {
   XftFont *xft_font = xft_font_get_font ((PangoFont *)font);
 
-  return XftLockFace (xft_font);
+  return (gpointer)XftLockFace (xft_font);
 }
 
 static void


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