summaryrefslogtreecommitdiff
path: root/pango/pango-layout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-07 11:11:45 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-08 08:38:06 -0500
commitb9b92e79da0e55acf0c13968ca699d4dd78fc614 (patch)
tree9f4f082957cb907927c22d241a51b2bf467dfbd3 /pango/pango-layout.c
parentcb6a93fb8ac99b155cf73ed0decd1c8a1230caa3 (diff)
downloadpango-b9b92e79da0e55acf0c13968ca699d4dd78fc614.tar.gz
Reshuffle itemize API
Split the post-processing off into a separate function that can take log attrs in addition. This will allow us to handle word starts when dealing with text transforms for emulated Small Caps. So far, this is all private API that is used from PangoLayout. Please file an issue if you want to access Small Caps emulation without PangoLayout.
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r--pango/pango-layout.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index ba81adf6..9e8ce248 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -4534,13 +4534,14 @@ pango_layout_check_lines (PangoLayout *layout)
g_assert (delim_len >= 0);
state.attrs = itemize_attrs;
- state.items = pango_itemize_with_base_dir (layout->context,
- base_dir,
- layout->text,
- start - layout->text,
- end - start,
- itemize_attrs,
- itemize_attrs ? &iter : NULL);
+ state.items = pango_itemize_with_font (layout->context,
+ base_dir,
+ layout->text,
+ start - layout->text,
+ end - start,
+ itemize_attrs,
+ itemize_attrs ? &iter : NULL,
+ NULL);
apply_attributes_to_items (state.items, shape_attrs);
@@ -4553,6 +4554,11 @@ pango_layout_check_lines (PangoLayout *layout)
layout->log_attrs + start_offset,
layout->n_chars + 1 - start_offset);
+ state.items = pango_itemize_post_process_items (layout->context,
+ layout->text,
+ layout->log_attrs + start_offset,
+ state.items);
+
state.base_dir = base_dir;
state.line_of_par = 1;
state.start_offset = start_offset;