mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Merge branch '2564-zerowidth-jungseong' into 'main'
guniprop: Set jungseong and jongseong points to zero-width for Old Korean Closes #2564 See merge request GNOME/glib!2418
This commit is contained in:
commit
8ec5dca0fe
@ -421,7 +421,14 @@ g_unichar_iszerowidth (gunichar c)
|
||||
if (G_UNLIKELY (ISZEROWIDTHTYPE (TYPE (c))))
|
||||
return TRUE;
|
||||
|
||||
/* A few additional codepoints are zero-width:
|
||||
* - Part of the Hangul Jamo block covering medial/vowels/jungseong and
|
||||
* final/trailing_consonants/jongseong Jamo
|
||||
* - Jungseong and jongseong for Old Korean
|
||||
* - Zero-width space (U+200B)
|
||||
*/
|
||||
if (G_UNLIKELY ((c >= 0x1160 && c < 0x1200) ||
|
||||
(c >= 0xD7B0 && c < 0xD800) ||
|
||||
c == 0x200B))
|
||||
return TRUE;
|
||||
|
||||
|
@ -909,6 +909,11 @@ test_zerowidth (void)
|
||||
g_assert_false (g_unichar_iszerowidth (G_UNICODE_LAST_CHAR + 1));
|
||||
g_assert_false (g_unichar_iszerowidth (G_UNICODE_LAST_CHAR_PART1));
|
||||
g_assert_false (g_unichar_iszerowidth (G_UNICODE_LAST_CHAR_PART1 + 1));
|
||||
|
||||
/* Hangul Jamo Extended-B block, containing jungseong and jongseong for
|
||||
* Old Korean */
|
||||
g_assert_true (g_unichar_iszerowidth (0xD7B0));
|
||||
g_assert_true (g_unichar_iszerowidth (0xD7FB));
|
||||
}
|
||||
|
||||
/* Test that g_unichar_istitle() returns the correct value for various
|
||||
|
Loading…
Reference in New Issue
Block a user