summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-13 08:15:12 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-13 08:53:48 -0500
commit60f8171f062b4653a41cce02a582caa25331c68f (patch)
treee19b8d96b8b86a99c3a08ba0a8907446f550abf4 /pango
parent6101f21df7e260e25a18bc8918a7429378cd85f3 (diff)
downloadpango-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.c4
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;