Treat HAMZA ABOVE similar to SHADD for sorting purposes

Part of https://github.com/behdad/harfbuzz/issues/509
This commit is contained in:
Behdad Esfahbod 2017-08-09 17:23:28 -07:00
parent 68af14d5cc
commit 5a33057576
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,10 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
inline unsigned int inline unsigned int
modified_combining_class (hb_codepoint_t unicode) modified_combining_class (hb_codepoint_t unicode)
{ {
/* XXX This hack belongs to the Arabic shaper:
* Put HAMZA ABOVE in the same class as SHADDA. */
if (unlikely (unicode == 0x0654u)) unicode = 0x0651u;
/* XXX This hack belongs to the Myanmar shaper. */ /* XXX This hack belongs to the Myanmar shaper. */
if (unlikely (unicode == 0x1037u)) unicode = 0x103Au; if (unlikely (unicode == 0x1037u)) unicode = 0x103Au;