[pango/avoid-overlong-lines: 3/6] pango-view: Accept width 0
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/avoid-overlong-lines: 3/6] pango-view: Accept width 0
- Date: Fri, 12 Nov 2021 01:23:58 +0000 (UTC)
commit 6082a2eab8b8368cd167f8cc61c0df84d28a98ba
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 11 20:13:17 2021 -0500
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.
utils/viewer-render.c | 4 ++--
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]