[gtk/pango2: 6/8] Font demo: Keep a single paragraph
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/pango2: 6/8] Font demo: Keep a single paragraph
- Date: Mon, 4 Jul 2022 14:40:16 +0000 (UTC)
commit 5b92bf51a057827f56a183769835064a2f1dbc51
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 3 11:28:27 2022 -0400
Font demo: Keep a single paragraph
This is currently required for line height to
take effect (we may want to make the leading-trim
changeable).
demos/gtk-demo/font_features.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index fba1f8c344..a281c1690e 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -682,13 +682,13 @@ update_display (void)
for (int i = 0; i < G_N_ELEMENTS (sizes); i++)
{
g_string_append (waterfall, text);
- g_string_append_c (waterfall, '\n');
+ g_string_append (waterfall, "
"); /* Unicode line separator */
attr = pango2_attr_size_new (sizes[i] * PANGO2_SCALE);
pango2_attribute_set_range (attr, start, start + text_len);
pango2_attr_list_insert (attrs, attr);
- start += text_len + 1;
+ start += text_len + strlen ("
");
}
gtk_label_set_text (GTK_LABEL (demo->the_label), waterfall->str);
g_string_free (waterfall, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]