diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-13 08:15:12 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-11-13 08:53:48 -0500 |
commit | 60f8171f062b4653a41cce02a582caa25331c68f (patch) | |
tree | e19b8d96b8b86a99c3a08ba0a8907446f550abf4 /pango | |
parent | 6101f21df7e260e25a18bc8918a7429378cd85f3 (diff) | |
download | pango-60f8171f062b4653a41cce02a582caa25331c68f.tar.gz |
Fix a bug in Small Caps handling
We were not passing the correct split_offset to
pango_item_split().
Testcase included.
Fixes: #627
Diffstat (limited to 'pango')
-rw-r--r-- | pango/itemize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/itemize.c b/pango/itemize.c index 82c737cc..77e86507 100644 --- a/pango/itemize.c +++ b/pango/itemize.c @@ -1380,7 +1380,7 @@ split_item_for_variant (const char *text, /* p0 .. p is a lowercase segment */ if (p < end) { - new_item = pango_item_split (item, p - p0, g_utf8_strlen (p, p - p0)); + new_item = pango_item_split (item, p - p0, g_utf8_strlen (p0, p - p0)); list_item->data = new_item; list_item = g_list_insert_before (list_item, list_item->next, item); list_item = list_item->next; @@ -1429,7 +1429,7 @@ split_item_for_variant (const char *text, /* p0 .. p is a uppercase segment */ if (p < end) { - new_item = pango_item_split (item, p - p0, g_utf8_strlen (p, p - p0)); + new_item = pango_item_split (item, p - p0, g_utf8_strlen (p0, p - p0)); list_item->data = new_item; list_item = g_list_insert_before (list_item, list_item->next, item); list_item = list_item->next; |