diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-11 20:13:17 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-11-11 20:23:47 -0500 |
commit | 6082a2eab8b8368cd167f8cc61c0df84d28a98ba (patch) | |
tree | 94b69a1e5fd78af4d63993dccbb39b55adfaaa28 /utils/viewer-render.c | |
parent | 7b688167a30fe9861bd896c8ab317483daf8286b (diff) | |
download | pango-6082a2eab8b8368cd167f8cc61c0df84d28a98ba.tar.gz |
pango-view: Accept width 0
GTK frequently uses this width during measuring,
so it is good if we can reproduce what happens
in this case.
Diffstat (limited to 'utils/viewer-render.c')
-rw-r--r-- | utils/viewer-render.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/viewer-render.c b/utils/viewer-render.c index ab0da2dd..d4b3f0f4 100644 --- a/utils/viewer-render.c +++ b/utils/viewer-render.c @@ -120,7 +120,7 @@ make_layout(PangoContext *context, if (size > 0) pango_font_description_set_size (font_description, size * PANGO_SCALE); - if (opt_width > 0) + if (opt_width >= 0) { if (opt_pango_units) pango_layout_set_width (layout, opt_width); @@ -128,7 +128,7 @@ make_layout(PangoContext *context, pango_layout_set_width (layout, (opt_width * opt_dpi * PANGO_SCALE + 36) / 72); } - if (opt_height > 0) + if (opt_height >= 0) { if (opt_pango_units) pango_layout_set_width (layout, opt_height); |