From db089c2f5d2e14fbfa7aeed857b9fd7a70a1cc7e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 18 Nov 2022 14:02:17 -0500 Subject: Fix char offset calculations When dealing with multi-paragraph layouts, the char offsets of the items are expected to be relative to the beginning of the text, not relative to the beginning of the current paragraph. This error was introduced in a03bf5bc6b07ba6e. Fixes: #716 --- pango/pango-layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pango/pango-layout.c') diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 306741b5..54271387 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -4913,7 +4913,7 @@ pango_layout_check_lines (PangoLayout *layout) state.items = pango_itemize_post_process_items (layout->context, layout->text, - layout->log_attrs + start_offset, + layout->log_attrs, state.items); state.base_dir = base_dir; -- cgit v1.2.1