[pango/pango2: 17/301] Drop deprecated pangofc api




commit 93675268f01e3d4929572731b8e99e13c28c9a16
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 10 12:38:14 2022 -0500

    Drop deprecated pangofc api

 pango/pangofc-font-private.h |   2 +
 pango/pangofc-font.c         | 121 -------------------------------------------
 pango/pangofc-font.h         |  19 -------
 pango/pangofc-fontmap.c      |  33 ++----------
 pango/pangofc-fontmap.h      |  11 +---
 tests/test-fonts.c           |   2 +-
 tests/test-layout.c          |   2 +-
 7 files changed, 9 insertions(+), 181 deletions(-)
---
diff --git a/pango/pangofc-font-private.h b/pango/pangofc-font-private.h
index 1a97a6abb..a27381e82 100644
--- a/pango/pangofc-font-private.h
+++ b/pango/pangofc-font-private.h
@@ -76,6 +76,8 @@ struct _PangoFcFontClass
   void (*_pango_reserved4) (void);
 };
 
+FT_Face    pango_fc_font_lock_face         (PangoFcFont      *font);
+void       pango_fc_font_unlock_face       (PangoFcFont      *font);
 
 G_END_DECLS
 #endif /* __PANGO_FC_FONT_PRIVATE_H__ */
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index 9d555a371..9f54cd7ac 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -556,20 +556,6 @@ pango_fc_font_real_get_glyph (PangoFcFont *font,
   return glyph;
 }
 
-/**
- * pango_fc_font_lock_face: (skip)
- * @font: a `PangoFcFont`.
- *
- * Gets the FreeType `FT_Face` associated with a font.
- *
- * This face will be kept around until you call
- * [method PangoFc Font.unlock_face].
- *
- * Return value: the FreeType `FT_Face` associated with @font.
- *
- * Since: 1.4
- * Deprecated: 1.44: Use pango_font_get_hb_font() instead
- */
 FT_Face
 pango_fc_font_lock_face (PangoFcFont *font)
 {
@@ -578,16 +564,6 @@ pango_fc_font_lock_face (PangoFcFont *font)
   return PANGO_FC_FONT_LOCK_FACE (font);
 }
 
-/**
- * pango_fc_font_unlock_face:
- * @font: a `PangoFcFont`.
- *
- * Releases a font previously obtained with
- * [method PangoFc Font.lock_face].
- *
- * Since: 1.4
- * Deprecated: 1.44: Use pango_font_get_hb_font() instead
- */
 void
 pango_fc_font_unlock_face (PangoFcFont *font)
 {
@@ -596,36 +572,6 @@ pango_fc_font_unlock_face (PangoFcFont *font)
   PANGO_FC_FONT_UNLOCK_FACE (font);
 }
 
-/**
- * pango_fc_font_has_char:
- * @font: a `PangoFcFont`
- * @wc: Unicode codepoint to look up
- *
- * Determines whether @font has a glyph for the codepoint @wc.
- *
- * Return value: %TRUE if @font has the requested codepoint.
- *
- * Since: 1.4
- * Deprecated: 1.44: Use [method Pango Font.has_char]
- */
-gboolean
-pango_fc_font_has_char (PangoFcFont *font,
-                       gunichar     wc)
-{
-  PangoFcFontPrivate *priv = font->priv;
-  FcCharSet *charset;
-
-  g_return_val_if_fail (PANGO_IS_FC_FONT (font), FALSE);
-
-  if (priv->decoder)
-    {
-      charset = pango_fc_decoder_get_charset (priv->decoder, font);
-      return FcCharSetHasChar (charset, wc);
-    }
-
-  return PANGO_FC_FONT_GET_CLASS (font)->has_char (font, wc);
-}
-
 /**
  * pango_fc_font_get_glyph:
  * @font: a `PangoFcFont`
@@ -660,31 +606,6 @@ pango_fc_font_get_glyph (PangoFcFont *font,
   return PANGO_FC_FONT_GET_CLASS (font)->get_glyph (font, wc);
 }
 
-
-/**
- * pango_fc_font_get_unknown_glyph:
- * @font: a `PangoFcFont`
- * @wc: the Unicode character for which a glyph is needed.
- *
- * Returns the index of a glyph suitable for drawing @wc
- * as an unknown character.
- *
- * Use PANGO_GET_UNKNOWN_GLYPH() instead.
- *
- * Return value: a glyph index into @font.
- *
- * Since: 1.4
- */
-PangoGlyph
-pango_fc_font_get_unknown_glyph (PangoFcFont *font,
-                                gunichar     wc)
-{
-  if (font && PANGO_FC_FONT_GET_CLASS (font)->get_unknown_glyph)
-    return PANGO_FC_FONT_GET_CLASS (font)->get_unknown_glyph (font, wc);
-
-  return PANGO_GET_UNKNOWN_GLYPH (wc);
-}
-
 void
 _pango_fc_font_shutdown (PangoFcFont *font)
 {
@@ -694,25 +615,6 @@ _pango_fc_font_shutdown (PangoFcFont *font)
     PANGO_FC_FONT_GET_CLASS (font)->shutdown (font);
 }
 
-/**
- * pango_fc_font_kern_glyphs:
- * @font: a `PangoFcFont`
- * @glyphs: a `PangoGlyphString`
- *
- * This function used to adjust each adjacent pair of glyphs
- * in @glyphs according to kerning information in @font.
- *
- * Since 1.44, it does nothing.
- *
- * Since: 1.4
- * Deprecated: 1.32
- */
-void
-pango_fc_font_kern_glyphs (PangoFcFont      *font,
-                          PangoGlyphString *glyphs)
-{
-}
-
 /**
  * _pango_fc_font_get_decoder:
  * @font: a `PangoFcFont`
@@ -1070,29 +972,6 @@ done:
   return hb_font;
 }
 
-/**
- * pango_fc_font_get_languages:
- * @font: a `PangoFcFont`
- *
- * Returns the languages that are supported by @font.
- *
- * This corresponds to the FC_LANG member of the FcPattern.
- *
- * The returned array is only valid as long as the font
- * and its fontmap are valid.
- *
- * Returns: (transfer none) (nullable): a %NULL-terminated
- *   array of `PangoLanguage`*
- *
- * Since: 1.48
- * Deprecated: 1.50: Use pango_font_get_language()
- */
-PangoLanguage **
-pango_fc_font_get_languages (PangoFcFont *font)
-{
-  return pango_font_get_languages (PANGO_FONT (font));
-}
-
 static PangoLanguage **
 _pango_fc_font_get_languages (PangoFont *font)
 {
diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h
index 25361fa06..5117396d9 100644
--- a/pango/pangofc-font.h
+++ b/pango/pangofc-font.h
@@ -89,32 +89,13 @@ struct _PangoFcFont
 PANGO_AVAILABLE_IN_ALL
 GType      pango_fc_font_get_type (void) G_GNUC_CONST;
 
-PANGO_DEPRECATED_IN_1_44
-gboolean   pango_fc_font_has_char          (PangoFcFont      *font,
-                                            gunichar          wc);
 PANGO_AVAILABLE_IN_1_4
 guint      pango_fc_font_get_glyph         (PangoFcFont      *font,
                                             gunichar          wc);
 
-PANGO_DEPRECATED_IN_1_50_FOR(pango_font_get_language)
-PangoLanguage **
-           pango_fc_font_get_languages     (PangoFcFont      *font);
-
 PANGO_AVAILABLE_IN_1_48
 FcPattern *pango_fc_font_get_pattern       (PangoFcFont      *font);
 
-PANGO_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH)
-PangoGlyph pango_fc_font_get_unknown_glyph (PangoFcFont      *font,
-                                            gunichar          wc);
-PANGO_DEPRECATED_IN_1_32
-void       pango_fc_font_kern_glyphs       (PangoFcFont      *font,
-                                            PangoGlyphString *glyphs);
-
-PANGO_DEPRECATED_IN_1_44_FOR(pango_font_get_hb_font)
-FT_Face    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);
-
 
 G_END_DECLS
 #endif /* __PANGO_FC_FONT_H__ */
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 4af531221..19436aaec 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1525,7 +1525,7 @@ pango_fc_font_map_add_decoder_find_func (PangoFcFontMap        *fcfontmap,
   PangoFcFontMapPrivate *priv;
   PangoFcFindFuncInfo *info;
 
-  g_return_if_fail (PANGO_IS_FC_FONT_MAP (fcfontmap));
+  g_return_if_fail (PANGO_FC_IS_FONT_MAP (fcfontmap));
 
   priv = fcfontmap->priv;
 
@@ -1559,7 +1559,7 @@ pango_fc_font_map_find_decoder (PangoFcFontMap *fcfontmap,
 {
   GSList *l;
 
-  g_return_val_if_fail (PANGO_IS_FC_FONT_MAP (fcfontmap), NULL);
+  g_return_val_if_fail (PANGO_FC_IS_FONT_MAP (fcfontmap), NULL);
   g_return_val_if_fail (pattern != NULL, NULL);
 
   for (l = fcfontmap->priv->findfuncs; l && l->data; l = l->next)
@@ -2350,7 +2350,7 @@ pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
 {
   FcConfig *oldconfig;
 
-  g_return_if_fail (PANGO_IS_FC_FONT_MAP (fcfontmap));
+  g_return_if_fail (PANGO_FC_IS_FONT_MAP (fcfontmap));
 
   oldconfig = fcfontmap->priv->config;
 
@@ -2385,7 +2385,7 @@ pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
 FcConfig *
 pango_fc_font_map_get_config (PangoFcFontMap *fcfontmap)
 {
-  g_return_val_if_fail (PANGO_IS_FC_FONT_MAP (fcfontmap), NULL);
+  g_return_val_if_fail (PANGO_FC_IS_FONT_MAP (fcfontmap), NULL);
 
   wait_for_fc_init ();
 
@@ -2618,31 +2618,6 @@ _pango_fc_font_map_get_languages (PangoFcFontMap *fcfontmap,
   return data->languages;
 }
 
-/**
- * pango_fc_font_map_create_context:
- * @fcfontmap: a `PangoFcFontMap`
- *
- * Creates a new context for this fontmap.
- *
- * This function is intended only for backend implementations deriving
- * from `PangoFcFontMap`; it is possible that a backend will store
- * additional information needed for correct operation on the `PangoContext`
- * after calling this function.
- *
- * Return value: (transfer full): a new `PangoContext`
- *
- * Since: 1.4
- *
- * Deprecated: 1.22: Use pango_font_map_create_context() instead.
- */
-PangoContext *
-pango_fc_font_map_create_context (PangoFcFontMap *fcfontmap)
-{
-  g_return_val_if_fail (PANGO_IS_FC_FONT_MAP (fcfontmap), NULL);
-
-  return pango_font_map_create_context (PANGO_FONT_MAP (fcfontmap));
-}
-
 static void
 shutdown_font (gpointer        key,
               PangoFcFont    *fcfont,
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h
index e1e56c94b..d66e38cc5 100644
--- a/pango/pangofc-fontmap.h
+++ b/pango/pangofc-fontmap.h
@@ -35,15 +35,10 @@ G_BEGIN_DECLS
  * PangoFcFontMap
  */
 
-#ifdef __GI_SCANNER__
 #define PANGO_FC_TYPE_FONT_MAP              (pango_fc_font_map_get_type ())
+#define PANGO_TYPE_FC_FONT_MAP              PANGO_FC_TYPE_FONT_MAP
 #define PANGO_FC_FONT_MAP(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FC_TYPE_FONT_MAP, 
PangoFcFontMap))
 #define PANGO_FC_IS_FONT_MAP(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FC_TYPE_FONT_MAP))
-#else
-#define PANGO_TYPE_FC_FONT_MAP              (pango_fc_font_map_get_type ())
-#define PANGO_FC_FONT_MAP(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT_MAP, 
PangoFcFontMap))
-#define PANGO_IS_FC_FONT_MAP(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT_MAP))
-#endif
 
 typedef struct _PangoFcFontMap        PangoFcFontMap;
 typedef struct _PangoFcFontMapClass   PangoFcFontMapClass;
@@ -94,10 +89,6 @@ PANGO_AVAILABLE_IN_1_4
 PangoFontDescription *pango_fc_font_description_from_pattern (FcPattern *pattern,
                                                              gboolean   include_size);
 
-#ifndef PANGO_DISABLE_DEPRECATED
-PANGO_DEPRECATED_IN_1_22_FOR(pango_font_map_create_context)
-PangoContext * pango_fc_font_map_create_context (PangoFcFontMap *fcfontmap);
-#endif
 PANGO_AVAILABLE_IN_1_4
 void           pango_fc_font_map_shutdown       (PangoFcFontMap *fcfontmap);
 
diff --git a/tests/test-fonts.c b/tests/test-fonts.c
index 918a816b6..2ecdc545d 100644
--- a/tests/test-fonts.c
+++ b/tests/test-fonts.c
@@ -103,7 +103,7 @@ test_fontset (gconstpointer d)
   char *s;
   GBytes *orig;
 
-  if (!PANGO_IS_FC_FONT_MAP (pango_cairo_font_map_get_default ()))
+  if (strcmp (G_OBJECT_TYPE_NAME (pango_cairo_font_map_get_default ()), "PangoFcFontMap") != 0)
     {
       g_test_skip ("Not an fc fontmap. Skipping...");
       return;
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 1139e4fd8..ca98523de 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -47,7 +47,7 @@ test_layout (gconstpointer d)
   PangoContext *context;
   PangoLayout *layout;
 
-  if (!PANGO_IS_FC_FONT_MAP (pango_cairo_font_map_get_default ()))
+  if (!PANGO_FC_IS_FONT_MAP (pango_cairo_font_map_get_default ()))
     {
       g_test_skip ("Not an fc fontmap. Skipping...");
       return;


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