summaryrefslogtreecommitdiff
path: root/app/wlib/gtklib/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/wlib/gtklib/font.c')
-rw-r--r--app/wlib/gtklib/font.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/wlib/gtklib/font.c b/app/wlib/gtklib/font.c
index e2f741b..29df04d 100644
--- a/app/wlib/gtklib/font.c
+++ b/app/wlib/gtklib/font.c
@@ -182,11 +182,11 @@ PangoLayout *wlibFontCreatePangoLayout(GtkWidget *widget,
wFont_p fp,
wFontSize_t fs,
const char *s,
- int *width_p,
- int *height_p,
- int *ascent_p,
- int *descent_p,
- int *baseline_p)
+ wDrawPix_t *width_p,
+ wDrawPix_t *height_p,
+ wDrawPix_t *ascent_p,
+ wDrawPix_t *descent_p,
+ wDrawPix_t *baseline_p)
{
if (!fontInitted) {
fontInit();
@@ -215,9 +215,10 @@ PangoLayout *wlibFontCreatePangoLayout(GtkWidget *widget,
FONTSIZE_TO_PANGOSIZE(fs) * PANGO_SCALE);
pango_layout_set_font_description(layout, fontDescription);
/* get layout measures */
- pango_layout_get_size(layout, width_p, height_p);
- *width_p = *width_p / PANGO_SCALE;
- *height_p = *height_p / PANGO_SCALE;
+ gint width_i, height_i;
+ pango_layout_get_size(layout, &width_i, &height_i);
+ *width_p = width_i / PANGO_SCALE;
+ *height_p = height_i / PANGO_SCALE;
context = gtk_widget_create_pango_context(widget);
metrics = pango_context_get_metrics(context, fontDescription,
pango_context_get_language(context));