summaryrefslogtreecommitdiff
path: root/pango/pangoft2.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-01-07 21:01:45 -0500
committerMatthias Clasen <mclasen@redhat.com>2013-01-07 21:07:00 -0500
commit2dc0c3dbb1c389c3a3ba12a5c5c85f21dca46e84 (patch)
tree3d0355d5068cd5032f73f99442ed2df5afdefc18 /pango/pangoft2.c
parentb9bdbfdbb454bd172820344244b881cb4dc7826e (diff)
downloadpango-2dc0c3dbb1c389c3a3ba12a5c5c85f21dca46e84.tar.gz
Don't use the deprecated pango_ft2_font_get_face
Replace it with pango_fc_font_lock/unlock_face calls.
Diffstat (limited to 'pango/pangoft2.c')
-rw-r--r--pango/pangoft2.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index dc6db5da..cbe1d210 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -424,12 +424,13 @@ pango_ft2_font_get_kerning (PangoFont *font,
static FT_Face
pango_ft2_font_real_lock_face (PangoFcFont *font)
{
- return pango_ft2_font_get_face ((PangoFont *)font);
+ return pango_fc_font_lock_face (font);
}
static void
-pango_ft2_font_real_unlock_face (PangoFcFont *font G_GNUC_UNUSED)
+pango_ft2_font_real_unlock_face (PangoFcFont *font)
{
+ pango_fc_font_unlock_face (font);
}
static gboolean
@@ -499,12 +500,18 @@ pango_ft2_font_get_coverage (PangoFont *font,
PangoGlyph
pango_ft2_get_unknown_glyph (PangoFont *font)
{
- FT_Face face = pango_ft2_font_get_face (font);
+ PangoFcFont *fc_font = PANGO_FC_FONT (font);
+ FT_Face face;
+ PangoGlyph glyph;
+
+ face = pango_fc_font_lock_face (fc_font);
if (face && FT_IS_SFNT (face))
/* TrueType fonts have an 'unknown glyph' box on glyph index 0 */
- return 0;
+ glyph = 0;
else
- return PANGO_GLYPH_EMPTY;
+ glyph = PANGO_GLYPH_EMPTY;
+ pango_fc_font_unlock_face (fc_font);
+ return glyph;
}
typedef struct