We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch and test:
diff --git a/src/hb-ucdn/ucdn.c b/src/hb-ucdn/ucdn.c index 30747fea..f7b33d64 100644 --- a/src/hb-ucdn/ucdn.c +++ b/src/hb-ucdn/ucdn.c @@ -163,7 +163,8 @@ static int hangul_pair_decompose(uint32_t code, uint32_t *a, uint32_t *b) static int hangul_pair_compose(uint32_t *code, uint32_t a, uint32_t b) { - if (a >= SBASE && a < (SBASE + SCOUNT) && b >= TBASE && b < (TBASE + TCOUNT)) { + if (a >= SBASE && a < (SBASE + SCOUNT) && b > TBASE && b < (TBASE + TCOUNT) && + !((a - SBASE) % TCOUNT)) { /* LV,T */ *code = a + (b - TBASE); return 3; diff --git a/test/api/test-unicode.c b/test/api/test-unicode.c index 6195bb28..0587c6e7 100644 --- a/test/api/test-unicode.c +++ b/test/api/test-unicode.c @@ -755,6 +755,10 @@ test_unicode_normalization (gconstpointer user_data) g_assert (hb_unicode_compose (uf, 0xCE20, 0x11B8, &ab) && ab == 0xCE31); g_assert (hb_unicode_compose (uf, 0x110E, 0x1173, &ab) && ab == 0xCE20); + g_assert (!hb_unicode_compose (uf, 0xAC00, 0x11A7, &ab)); + g_assert (hb_unicode_compose (uf, 0xAC00, 0x11A8, &ab) && ab == 0xAC01); + g_assert (!hb_unicode_compose (uf, 0xAC01, 0x11A8, &ab)); + /* Test decompose() */
The text was updated successfully, but these errors were encountered:
[ucdn] Fix Hangul composition
f399349
grigorig/ucdn#23
No branches or pull requests
Patch and test:
The text was updated successfully, but these errors were encountered: