summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-01-21 23:28:57 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-01-24 07:46:42 -0500
commit9104931d9ca842954fad96c6ff30b55e4b44ed55 (patch)
tree8dcf87bfdc11b2142efcef74a66287d1ba6ff333
parent8277d6c8789f6902149a373097dd7c9248386438 (diff)
downloadpango-9104931d9ca842954fad96c6ff30b55e4b44ed55.tar.gz
Add single-paragraph mode to ItemProperties
The line breaking code will pick it up there later.
-rw-r--r--pango/pango-item-private.h23
-rw-r--r--pango/pango-item.c7
2 files changed, 18 insertions, 12 deletions
diff --git a/pango/pango-item-private.h b/pango/pango-item-private.h
index db0e7932..27e8dd8e 100644
--- a/pango/pango-item-private.h
+++ b/pango/pango-item-private.h
@@ -118,19 +118,20 @@ void pango_item_unsplit (PangoItem *orig,
typedef struct _ItemProperties ItemProperties;
struct _ItemProperties
{
- guint uline_single : 1;
- guint uline_double : 1;
- guint uline_low : 1;
- guint uline_error : 1;
- guint strikethrough : 1;
- guint oline_single : 1;
- guint showing_space : 1;
- int letter_spacing;
- gboolean shape_set;
+ guint uline_single : 1;
+ guint uline_double : 1;
+ guint uline_low : 1;
+ guint uline_error : 1;
+ guint strikethrough : 1;
+ guint oline_single : 1;
+ guint showing_space : 1;
+ guint no_paragraph_break : 1;
+ guint shape_set : 1;
+ int letter_spacing;
+ int absolute_line_height;
+ double line_height;
PangoRectangle *shape_ink_rect;
PangoRectangle *shape_logical_rect;
- double line_height;
- int absolute_line_height;
};
void pango_item_get_properties (PangoItem *item,
diff --git a/pango/pango-item.c b/pango/pango-item.c
index cd046199..3595be4f 100644
--- a/pango/pango-item.c
+++ b/pango/pango-item.c
@@ -397,8 +397,9 @@ pango_item_get_properties (PangoItem *item,
properties->oline_single = FALSE;
properties->strikethrough = FALSE;
properties->showing_space = FALSE;
- properties->letter_spacing = 0;
+ properties->no_paragraph_break = FALSE;
properties->shape_set = FALSE;
+ properties->letter_spacing = 0;
properties->shape_ink_rect = NULL;
properties->shape_logical_rect = NULL;
properties->line_height = 0.0;
@@ -473,6 +474,10 @@ pango_item_get_properties (PangoItem *item,
properties->showing_space = (((PangoAttrInt *)attr)->value & PANGO_SHOW_SPACES) != 0;
break;
+ case PANGO_ATTR_PARAGRAPH:
+ properties->no_paragraph_break = TRUE;
+ break;
+
default:
break;
}