[pango/better-hyphens: 59/66] Add an offset argument to pango_tailor_break
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/better-hyphens: 59/66] Add an offset argument to pango_tailor_break
- Date: Sat, 20 Jul 2019 18:59:39 +0000 (UTC)
commit e8f20b6116cca605115b42d5e0a15112193a3bad
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jul 20 10:02:05 2019 -0700
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(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]