return box;
}
- face = pango_ft2_font_get_face (font);
+ face = pango_fc_font_lock_face (PANGO_FC_FONT (font));
if (face)
{
rendered->bitmap_left = face->glyph->bitmap_left;
rendered->bitmap_top = face->glyph->bitmap_top;
+ pango_fc_font_unlock_face (PANGO_FC_FONT (font));
+
if (G_UNLIKELY (!rendered->bitmap.buffer)) {
g_slice_free (PangoFT2RenderedGlyph, rendered);
return NULL;
}
else
{
+ pango_fc_font_unlock_face (PANGO_FC_FONT (font));
+
generic_box:
return pango_ft2_font_render_box_glyph (PANGO_UNKNOWN_GLYPH_WIDTH,
PANGO_UNKNOWN_GLYPH_HEIGHT,
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
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