summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/font_pango.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/font_pango.c b/gtk/font_pango.c
index 6d9c0d085..c07ed145b 100644
--- a/gtk/font_pango.c
+++ b/gtk/font_pango.c
@@ -48,8 +48,10 @@ bool nsfont_width(const struct css_style *style,
PangoContext *context;
PangoLayout *layout;
- if (length == 0)
- return 0;
+ if (length == 0) {
+ *width = 0;
+ return true;
+ }
desc = nsfont_style_to_description(style);
context = gdk_pango_context_get();
@@ -190,7 +192,7 @@ bool nsfont_paint(const struct css_style *style,
((c & 0xff0000) >> 8) | (c & 0xff0000 >> 16) };
if (length == 0)
- return 0;
+ return true;
desc = nsfont_style_to_description(style);
context = gdk_pango_context_get();