summaryrefslogtreecommitdiff
path: root/pango/pango-layout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-24 00:52:53 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-08-24 00:52:53 +0000
commit4740e552b3c8ca005beea88001a82ea6bb266076 (patch)
tree25a7c9825d322932b58038db4aac44ecf010dbc5 /pango/pango-layout.c
parent8cae1c0762fa35cbe41d35a34d8e048965d287ac (diff)
parent1349e9a424dc5425dd087b382d6042f5cba3b661 (diff)
downloadpango-4740e552b3c8ca005beea88001a82ea6bb266076.tar.gz
Merge branch 'log-attr-things' into 'main'
break-thai: Fix up word break handling See merge request GNOME/pango!434
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r--pango/pango-layout.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index f78d7daf..b6e0c217 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -4214,12 +4214,13 @@ process_line (PangoLayout *layout,
}
static void
-get_items_log_attrs (const char *text,
- int start,
- int length,
- GList *items,
- PangoLogAttr *log_attrs,
- int log_attrs_len)
+get_items_log_attrs (const char *text,
+ int start,
+ int length,
+ GList *items,
+ PangoAttrList *attrs,
+ PangoLogAttr *log_attrs,
+ int log_attrs_len)
{
int offset = 0;
GList *l;
@@ -4235,12 +4236,18 @@ get_items_log_attrs (const char *text,
pango_tailor_break (text + item->offset,
item->length,
&item->analysis,
- item->offset,
+ -1,
log_attrs + offset,
item->num_chars + 1);
offset += item->num_chars;
}
+
+ if (attrs && items)
+ {
+ PangoItem *item = items->data;
+ pango_attr_break (text + start, length, attrs, item->offset, log_attrs, log_attrs_len);
+ }
}
static PangoAttrList *
@@ -4517,6 +4524,7 @@ pango_layout_check_lines (PangoLayout *layout)
start - layout->text,
delimiter_index + delim_len,
state.items,
+ shape_attrs,
layout->log_attrs + start_offset,
layout->n_chars + 1 - start_offset);