summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-01-10 11:17:35 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-02-17 14:01:09 -0600
commit482bb960096f54e5cc1ee089edd4d5add0a0d062 (patch)
treef919389a1b132978d1b0e048b274b1feeacf8f17
parentac6d0822e809a78a32fea184dbf296a8b3668e7b (diff)
downloadpango-482bb960096f54e5cc1ee089edd4d5add0a0d062.tar.gz
Drop deprecated pangoxft api
-rw-r--r--pango/pangoxft-font.c142
-rw-r--r--pango/pangoxft-fontmap.c79
-rw-r--r--pango/pangoxft-private.h2
-rw-r--r--pango/pangoxft.h56
4 files changed, 8 insertions, 271 deletions
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index d7ba539b..2b45e18c 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -27,6 +27,8 @@
#include "pangoxft-private.h"
#include "pangofc-private.h"
+#define PANGO_TYPE_XFT_FONT PANGO_XFT_TYPE_FONT
+
#define PANGO_XFT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_XFT_FONT, PangoXftFontClass))
#define PANGO_XFT_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_XFT_FONT))
#define PANGO_XFT_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_XFT_FONT, PangoXftFontClass))
@@ -468,14 +470,6 @@ pango_xft_font_real_shutdown (PangoFcFont *fcfont)
}
}
-/**
- * pango_xft_font_get_font: (skip)
- * @font: (nullable): a `PangoFont`
- *
- * Returns the `XftFont` of a font.
- *
- * Return value: (nullable): the `XftFont` associated to @font
- */
XftFont *
pango_xft_font_get_font (PangoFont *font)
{
@@ -485,135 +479,3 @@ pango_xft_font_get_font (PangoFont *font)
return xft_font_get_font (font);
}
-/**
- * pango_xft_font_get_display: (skip)
- * @font: (type PangoXftFont): a `PangoFont`
- *
- * Returns the X display of the `XftFont` of a font.
- *
- * Return value: (transfer none): the X display of the XftFont associated to @font.
- **/
-Display *
-pango_xft_font_get_display (PangoFont *font)
-{
- PangoFcFont *fcfont;
- Display *display;
-
- g_return_val_if_fail (PANGO_XFT_IS_FONT (font), NULL);
-
- fcfont = PANGO_FC_FONT (font);
- _pango_xft_font_map_get_info (fcfont->fontmap, &display, NULL);
-
- return display;
-}
-
-/**
- * pango_xft_font_get_unknown_glyph:
- * @font: (type PangoXftFont): a `PangoFont`
- * @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.
- **/
-PangoGlyph
-pango_xft_font_get_unknown_glyph (PangoFont *font,
- gunichar wc)
-{
- g_return_val_if_fail (PANGO_XFT_IS_FONT (font), PANGO_GLYPH_EMPTY);
-
- return PANGO_GET_UNKNOWN_GLYPH (wc);
-}
-
-/**
- * pango_xft_font_lock_face: (skip)
- * @font: (type PangoXftFont): a `PangoFont`
- *
- * Gets the FreeType `FT_Face` associated with a font.
- *
- * This face will be kept around until you call pango_xft_font_unlock_face().
- *
- * Use pango_fc_font_lock_face() instead.
- *
- * Return value: the FreeType `FT_Face` associated with @font.
- *
- * Since: 1.2
- **/
-FT_Face
-pango_xft_font_lock_face (PangoFont *font)
-{
- g_return_val_if_fail (PANGO_XFT_IS_FONT (font), NULL);
-
- return pango_fc_font_lock_face (PANGO_FC_FONT (font));
-}
-
-/**
- * pango_xft_font_unlock_face: (skip)
- * @font: (type PangoXftFont): a `PangoFont`
- *
- * Releases a font previously obtained with
- * pango_xft_font_lock_face().
- *
- * Use pango_fc_font_unlock_face() instead.
- *
- * Since: 1.2
- **/
-void
-pango_xft_font_unlock_face (PangoFont *font)
-{
- g_return_if_fail (PANGO_XFT_IS_FONT (font));
-
- pango_fc_font_unlock_face (PANGO_FC_FONT (font));
-}
-
-/**
- * pango_xft_font_get_glyph:
- * @font: (type PangoXftFont): a `PangoFont` for the Xft backend
- * @wc: Unicode codepoint to look up
- *
- * Gets the glyph index for a given Unicode character
- * for @font.
- *
- * If you only want to determine whether the font has
- * the glyph, use pango_xft_font_has_char().
- *
- * Use pango_fc_font_get_glyph() instead.
- *
- * Return value: the glyph index, or 0, if the Unicode
- * character does not exist in the font.
- *
- * Since: 1.2
- **/
-guint
-pango_xft_font_get_glyph (PangoFont *font,
- gunichar wc)
-{
- g_return_val_if_fail (PANGO_XFT_IS_FONT (font), 0);
-
- return pango_fc_font_get_glyph (PANGO_FC_FONT (font), wc);
-}
-
-/**
- * pango_xft_font_has_char:
- * @font: (type PangoXftFont): a `PangoFont` for the Xft backend
- * @wc: Unicode codepoint to look up
- *
- * Determines whether @font has a glyph for the codepoint @wc.
- *
- * Use pango_fc_font_has_char() instead.
- *
- * Return value: %TRUE if @font has the requested codepoint.
- *
- * Since: 1.2
- **/
-gboolean
-pango_xft_font_has_char (PangoFont *font,
- gunichar wc)
-{
- g_return_val_if_fail (PANGO_XFT_IS_FONT (font), 0);
-
- return pango_fc_font_has_char (PANGO_FC_FONT (font), wc);
-}
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index 1b5f5b5a..3b0a4c2b 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -273,63 +273,6 @@ pango_xft_shutdown_display (Display *display,
}
}
-/**
- * pango_xft_set_default_substitute:
- * @display: an X Display
- * @screen: the screen number of a screen within @display
- * @func: function to call to to do final config tweaking
- * on #FcPattern objects.
- * @data: data to pass to @func
- * @notify: function to call when @data is no longer used.
- *
- * Sets a function that will be called to do final configuration
- * substitution on a #FcPattern before it is used to load
- * the font. This function can be used to do things like set
- * hinting and antialiasing options.
- *
- * Deprecated: 1.46: Use pango_fc_font_map_set_default_substitute()
- * instead.
- *
- * Since: 1.2
- **/
-void
-pango_xft_set_default_substitute (Display *display,
- int screen,
- PangoXftSubstituteFunc func,
- gpointer data,
- GDestroyNotify notify)
-{
- PangoXftFontMap *xftfontmap = (PangoXftFontMap *)pango_xft_get_font_map (display, screen);
-
- PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (xftfontmap);
- pango_fc_font_map_set_default_substitute(fcfontmap, func, data, notify);
-}
-
-/**
- * pango_xft_substitute_changed:
- * @display: an X Display
- * @screen: the screen number of a screen within @display
- *
- * Call this function any time the results of the
- * default substitution function set with
- * pango_xft_set_default_substitute() change.
- * That is, if your substitution function will return different
- * results for the same input pattern, you must call this function.
- *
- * Deprecated: 1.46: Use pango_fc_font_map_substitute_changed()
- * instead.
- *
- * Since: 1.2
- **/
-void
-pango_xft_substitute_changed (Display *display,
- int screen)
-{
- PangoXftFontMap *xftfontmap = (PangoXftFontMap *)pango_xft_get_font_map (display, screen);
-
- pango_fc_font_map_substitute_changed(PANGO_FC_FONT_MAP (xftfontmap));
-}
-
void
_pango_xft_font_map_get_info (PangoFontMap *fontmap,
Display **display,
@@ -344,28 +287,6 @@ _pango_xft_font_map_get_info (PangoFontMap *fontmap,
}
/**
- * pango_xft_get_context: (skip)
- * @display: an X display.
- * @screen: an X screen.
- *
- * Retrieves a `PangoContext` appropriate for rendering with
- * Xft fonts on the given screen of the given display.
- *
- * Return value: the new `PangoContext`.
- *
- * Deprecated: 1.22: Use pango_xft_get_font_map() followed by
- * pango_font_map_create_context() instead.
- **/
-PangoContext *
-pango_xft_get_context (Display *display,
- int screen)
-{
- g_return_val_if_fail (display != NULL, NULL);
-
- return pango_font_map_create_context (pango_xft_get_font_map (display, screen));
-}
-
-/**
* _pango_xft_font_map_get_renderer:
* @fontmap: a `PangoXftFontMap`
*
diff --git a/pango/pangoxft-private.h b/pango/pangoxft-private.h
index 7f6ad384..f9b8a84b 100644
--- a/pango/pangoxft-private.h
+++ b/pango/pangoxft-private.h
@@ -56,6 +56,8 @@ PangoRenderer *_pango_xft_font_map_get_renderer (PangoXftFontMap *xftfontmap);
PangoFont *_pango_xft_font_get_mini_font (PangoXftFont *xfont);
+XftFont * pango_xft_font_get_font (PangoFont *font);
+
G_END_DECLS
#endif /* __PANGOXFT_PRIVATE_H__ */
diff --git a/pango/pangoxft.h b/pango/pangoxft.h
index b035d79e..bf17507b 100644
--- a/pango/pangoxft.h
+++ b/pango/pangoxft.h
@@ -11,7 +11,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -25,7 +25,6 @@
#include <pango/pangofc-fontmap.h>
#include <pango/pango-context.h>
-#include <pango/pango-ot.h>
#include <pango/pangofc-font.h>
#include <pango/pango-layout.h>
#include <pango/pangoxft-render.h>
@@ -72,74 +71,27 @@ typedef struct _PangoXftFont PangoXftFont;
* Function type for doing final config tweaking on prepared FcPatterns.
*/
typedef void (*PangoXftSubstituteFunc) (FcPattern *pattern,
- gpointer data);
+ gpointer data);
/* Calls for applications
*/
PANGO_AVAILABLE_IN_1_2
PangoFontMap *pango_xft_get_font_map (Display *display,
- int screen);
-#ifndef PANGO_DISABLE_DEPRECATED
-PANGO_DEPRECATED
-PangoContext *pango_xft_get_context (Display *display,
- int screen);
-#endif
+ int screen);
PANGO_AVAILABLE_IN_1_2
void pango_xft_shutdown_display (Display *display,
- int screen);
-
-#ifndef PANGO_DISABLE_DEPRECATED
-PANGO_DEPRECATED_IN_1_48_FOR(pango_fc_font_map_set_default_substitute)
-void pango_xft_set_default_substitute (Display *display,
- int screen,
- PangoXftSubstituteFunc func,
- gpointer data,
- GDestroyNotify notify);
-PANGO_DEPRECATED_IN_1_48_FOR(pango_fc_font_map_substitute_changed)
-void pango_xft_substitute_changed (Display *display,
- int screen);
-#endif
+ int screen);
PANGO_AVAILABLE_IN_ALL
GType pango_xft_font_map_get_type (void) G_GNUC_CONST;
-#ifdef __GI_SCANNER__
#define PANGO_XFT_TYPE_FONT (pango_xft_font_get_type ())
#define PANGO_XFT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_XFT_TYPE_FONT, PangoXftFont))
#define PANGO_XFT_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_XFT_TYPE_FONT))
-#else
-#define PANGO_TYPE_XFT_FONT (pango_xft_font_get_type ())
-#define PANGO_XFT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT, PangoXftFont))
-#define PANGO_XFT_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT))
-#endif
PANGO_AVAILABLE_IN_ALL
GType pango_xft_font_get_type (void) G_GNUC_CONST;
-/* For shape engines
- */
-
-#ifndef PANGO_DISABLE_DEPRECATED
-
-PANGO_DEPRECATED
-XftFont * pango_xft_font_get_font (PangoFont *font);
-PANGO_DEPRECATED
-Display * pango_xft_font_get_display (PangoFont *font);
-PANGO_DEPRECATED_FOR(pango_fc_font_lock_face)
-FT_Face pango_xft_font_lock_face (PangoFont *font);
-PANGO_DEPRECATED_FOR(pango_fc_font_unlock_face)
-void pango_xft_font_unlock_face (PangoFont *font);
-PANGO_DEPRECATED_FOR(pango_fc_font_get_glyph)
-guint pango_xft_font_get_glyph (PangoFont *font,
- gunichar wc);
-PANGO_DEPRECATED_FOR(pango_fc_font_has_char)
-gboolean pango_xft_font_has_char (PangoFont *font,
- gunichar wc);
-PANGO_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH)
-PangoGlyph pango_xft_font_get_unknown_glyph (PangoFont *font,
- gunichar wc);
-#endif /* PANGO_DISABLE_DEPRECATED */
-
G_END_DECLS
#endif /* __PANGOXFT_H__ */