diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-07-09 12:10:37 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-07-09 12:16:14 -0400 |
commit | cba71eea549a65aa229559206f9204665510d0aa (patch) | |
tree | 655bdf9275c22807dc33ab0366bc8efc6d1fb6de /pango/pango-utils.c | |
parent | 77146b66f2307180934ef8d327aaab0bfe69bb35 (diff) | |
download | pango-cba71eea549a65aa229559206f9204665510d0aa.tar.gz |
Add a few missing chars to pango_is_zero_widthmissing-zerowidth-chars
The documentation for this function states that all
bidi control chars are zero width, but it was missing
the Isolate ones. Add them.
Updated tests included.
Diffstat (limited to 'pango/pango-utils.c')
-rw-r--r-- | pango/pango-utils.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pango/pango-utils.c b/pango/pango-utils.c index c90b4c86..894935e7 100644 --- a/pango/pango-utils.c +++ b/pango/pango-utils.c @@ -920,23 +920,29 @@ pango_is_zero_width (gunichar ch) * * 2028 LINE SEPARATOR * + * 2060 WORD JOINER + * 2061 FUNCTION APPLICATION + * 2062 INVISIBLE TIMES + * 2063 INVISIBLE SEPARATOR + * + * 2066 LEFT-TO-RIGHT ISOLATE + * 2067 RIGHT-TO-LEFT ISOLATE + * 2068 FIRST STRONG ISOLATE + * 2069 POP DIRECTIONAL ISOLATE + * * 202A LEFT-TO-RIGHT EMBEDDING * 202B RIGHT-TO-LEFT EMBEDDING * 202C POP DIRECTIONAL FORMATTING * 202D LEFT-TO-RIGHT OVERRIDE * 202E RIGHT-TO-LEFT OVERRIDE * - * 2060 WORD JOINER - * 2061 FUNCTION APPLICATION - * 2062 INVISIBLE TIMES - * 2063 INVISIBLE SEPARATOR - * * FEFF ZERO WIDTH NO-BREAK SPACE */ return ((ch & ~(gunichar)0x007F) == 0x2000 && ( (ch >= 0x200B && ch <= 0x200F) || (ch >= 0x202A && ch <= 0x202E) || (ch >= 0x2060 && ch <= 0x2063) || + (ch >= 0x2066 && ch <= 0x2069) || (ch == 0x2028) )) || G_UNLIKELY (ch == 0x00AD || ch == 0x034F |