summaryrefslogtreecommitdiff
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to 'native')
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
index 0670403dd..45cf4fbda 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
@@ -315,7 +315,9 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector
(*env)->ReleaseFloatArrayElements (env, java_positions, native_positions, 0);
(*env)->ReleaseIntArrayElements (env, java_codes, native_codes, 0);
+ pango_fc_font_lock_face( (PangoFcFont *)pfont->font );
cairo_show_glyphs (gr->cr, glyphs, n);
+ pango_fc_font_unlock_face( (PangoFcFont *)pfont->font );
g_free(glyphs);
}
@@ -761,18 +763,19 @@ install_font_peer(cairo_t *cr,
if (pfont->graphics_resource == NULL)
{
- face = pango_ft2_font_get_face (pfont->font);
+ face = pango_fc_font_lock_face( (PangoFcFont *)pfont->font );
g_assert (face != NULL);
ft = cairo_ft_font_face_create_for_ft_face (face, 0);
g_assert (ft != NULL);
cairo_set_font_face (cr, ft);
- cairo_font_face_destroy (ft);
+ /* cairo_font_face_destroy (ft);*/
cairo_set_font_size (cr,
(pango_font_description_get_size (pfont->desc) /
(double)PANGO_SCALE));
ft = cairo_get_font_face (cr);
+ pango_fc_font_unlock_face( (PangoFcFont *)pfont->font );
pfont->graphics_resource = ft;
}
else