[gtk/pango2: 86/91] Font features demo: Keep a single paragraph




commit c7bdd47266630f24ac1e3e594e20350f650bc795
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jul 3 11:28:27 2022 -0400

    Font features 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 420e95f848..3a4663753f 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -670,13 +670,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]