[pango/line-breaker: 5/9] item: Add line spacing to ItemProperties




commit 21324ac989b614bd2df8e5efd75acd0142337b9e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 23 22:43:24 2022 -0500

    item: Add line spacing to ItemProperties

 pango/pango-item-private.h | 1 +
 pango/pango-item.c         | 5 +++++
 2 files changed, 6 insertions(+)
---
diff --git a/pango/pango-item-private.h b/pango/pango-item-private.h
index 27e8dd8e..986f8623 100644
--- a/pango/pango-item-private.h
+++ b/pango/pango-item-private.h
@@ -128,6 +128,7 @@ struct _ItemProperties
   guint no_paragraph_break  : 1;
   guint shape_set           : 1;
   int letter_spacing;
+  int line_spacing;
   int absolute_line_height;
   double line_height;
   PangoRectangle *shape_ink_rect;
diff --git a/pango/pango-item.c b/pango/pango-item.c
index 3595be4f..4705ac4c 100644
--- a/pango/pango-item.c
+++ b/pango/pango-item.c
@@ -404,6 +404,7 @@ pango_item_get_properties (PangoItem      *item,
   properties->shape_logical_rect = NULL;
   properties->line_height = 0.0;
   properties->absolute_line_height = 0;
+  properties->line_spacing = 0;
 
   while (tmp_list)
     {
@@ -470,6 +471,10 @@ pango_item_get_properties (PangoItem      *item,
           properties->absolute_line_height = ((PangoAttrInt *)attr)->value;
           break;
 
+        case PANGO_ATTR_LINE_SPACING:
+          properties->line_spacing = ((PangoAttrInt *)attr)->value;
+          break;
+
         case PANGO_ATTR_SHOW:
           properties->showing_space = (((PangoAttrInt *)attr)->value & PANGO_SHOW_SPACES) != 0;
           break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]