summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-07 20:31:54 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-07 20:42:29 -0400
commit21a90c02c40889e619c11101442d33ccf6f91e9a (patch)
treedba40945c71b083a96f23eaa3665020c11ecf452 /pango
parentcb409bc6a52bd30845bbef10e35aefa6e1d32a0d (diff)
downloadpango-21a90c02c40889e619c11101442d33ccf6f91e9a.tar.gz
break: Fix handling of tag sequencestests-and-fixes
Correctly classify tag characters as Grapheme_Extend, so that we don't end up putting grapheme boundaries in the middle of tag sequences. Includes a test.
Diffstat (limited to 'pango')
-rw-r--r--pango/break.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pango/break.c b/pango/break.c
index 7d204fa3..58e039e5 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -409,6 +409,12 @@ pango_default_break (const gchar *text,
GB_type = GB_Prepend;
break;
}
+ /* Tag chars */
+ if (wc >= 0xE0020 && wc <= 0xE00FF)
+ {
+ GB_type = GB_Extend;
+ break;
+ }
G_GNUC_FALLTHROUGH;
case G_UNICODE_CONTROL:
case G_UNICODE_LINE_SEPARATOR:
@@ -473,6 +479,7 @@ pango_default_break (const gchar *text,
break;
case G_UNICODE_MODIFIER_SYMBOL:
+ /* Fitzpatrick modifiers */
if (wc >= 0x1F3FB && wc <= 0x1F3FF)
GB_type = GB_Extend;
break;