summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-20 10:02:05 -0700
committerMatthias Clasen <mclasen@redhat.com>2019-07-20 11:56:18 -0700
commite8f20b6116cca605115b42d5e0a15112193a3bad (patch)
tree5e919440c09e87e2a02f53b40d619b5d4efb318c /pango
parenteb4882cada397268948ec24da046ff75615dfb9e (diff)
downloadpango-e8f20b6116cca605115b42d5e0a15112193a3bad.tar.gz
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.
Diffstat (limited to 'pango')
-rw-r--r--pango/break.c2
-rw-r--r--pango/pango-break.h5
2 files changed, 5 insertions, 2 deletions
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);