From e8f20b6116cca605115b42d5e0a15112193a3bad Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 20 Jul 2019 10:02:05 -0700 Subject: Add an offset argument to pango_tailor_break Without this, it is not possible to interpret attributes, whose offsets are relative to the beginning of the paragraph. --- pango/break.c | 2 ++ pango/pango-break.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'pango') diff --git a/pango/break.c b/pango/break.c index 8ed8e8c1..d25d2616 100644 --- a/pango/break.c +++ b/pango/break.c @@ -1726,6 +1726,7 @@ pango_find_paragraph_boundary (const gchar *text, * @text: text to process. Must be valid UTF-8 * @length: length in bytes of @text * @analysis: #PangoAnalysis structure from pango_itemize() for @text + * @offset: byte offset of @text in paragraph, or -1 * @log_attrs: (array length=attrs_len): array with one #PangoLogAttr * per character in @text, plus one extra, to be filled in * @attrs_len: length of @log_attrs array @@ -1738,6 +1739,7 @@ void pango_tailor_break (const char *text, int length, PangoAnalysis *analysis, + int offset, PangoLogAttr *log_attrs, int log_attrs_len) { diff --git a/pango/pango-break.h b/pango/pango-break.h index 4e1db0bc..19698db1 100644 --- a/pango/pango-break.h +++ b/pango/pango-break.h @@ -134,9 +134,10 @@ void pango_default_break (const gchar *text, int attrs_len); PANGO_AVAILABLE_IN_1_44 -void pango_tailor_break (const gchar *text, - int length, +void pango_tailor_break (const char *text, + int length, PangoAnalysis *analysis, + int offset, PangoLogAttr *attrs, int attrs_len); -- cgit v1.2.1