From 21426b727029b30fd553d246588d66c6cff3bc5e Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 19 Aug 2015 15:49:32 +0200 Subject: Tryout WinSetFont --- Linux_C_12/cpicture_121.c | 4 +++- pictCCall_12.icl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Linux_C_12/cpicture_121.c b/Linux_C_12/cpicture_121.c index bc95fbf..54c130d 100644 --- a/Linux_C_12/cpicture_121.c +++ b/Linux_C_12/cpicture_121.c @@ -1215,9 +1215,11 @@ void WinDisposeBitmap (GdkPixbuf *pixbuf) void WinSetFont (CLEAN_STRING fontName, gint style, gint size, GdkDrawable *inDraw, OS ios, GdkDrawable **outDraw, OS *oos) { - printf("WinSetFont\n"); + printf("WinSetFont: %s\n", cstring(fontName)); if (theFont) gdk_font_unref(theFont); + if (theFontDesc) pango_font_description_free(theFontDesc); + theFontDesc = pango_font_description_new(); pango_font_description_set_family(theFontDesc,cstring(fontName)); pango_font_description_set_weight(theFontDesc,(style & iBold) ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); pango_font_description_set_style(theFontDesc,(style & iItalic) ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); diff --git a/pictCCall_12.icl b/pictCCall_12.icl index 193664d..54b8235 100644 --- a/pictCCall_12.icl +++ b/pictCCall_12.icl @@ -160,7 +160,7 @@ winSetFont _ _ = code { .inline WinSetFont - ccall WinSetFont "SIIII-II" + ccall WinSetFont "SIIpI-pI" .end } -- cgit v1.2.3