https://bugzilla.redhat.com/show_bug.cgi?id=1436077
--- Comment #14 from Mike FABIAN <mfabian(a)redhat.com> ---
Maybe it is even necessary to add 0x1f3f4 to the exceptions where
a break at a width change is prevented:
diff --git a/pango/pango-context.c b/pango/pango-context.c
index f0cea73..2739b2d 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -876,7 +876,18 @@ width_iter_next(PangoWidthIter* iter)
while (iter->end < iter->text_end)
{
gunichar ch = g_utf8_get_char (iter->end);
- if (width_iter_iswide (ch) != iter->wide)
+ if (ch == 0x200d || ch == 0x1f3f4 || (ch >= 0x1f3fb && ch <=
0x1f3ff))
+ {
+ /* do not break at a zero-width-joiner or skin tone modifiers*/
+ iter->end = g_utf8_next_char (iter->end);
+ if (iter-> end < iter->text_end)
+ {
+ ch = g_utf8_get_char (iter->end);
+ iter->wide = width_iter_iswide (ch);
+ }
+ continue;
+ }
+ else if (width_iter_iswide (ch) != iter->wide)
break;
iter->end = g_utf8_next_char (iter->end);
}
Because flag sequences like this one:
1F3F4 E0067 E0062 E0073 E0063 E0074 E007F; Emoji_Tag_Sequence; Scotland
start with U+1F3F4 WAVING BLACK FLAG, which is a wide character
and the rest of the sequence is narrow characters.
--
You are receiving this mail because:
You are on the CC list for the bug.