[thai] Reword to include all relevant marks
This commit is contained in:
parent
2d4557fe04
commit
b2abd5c7e8
|
@ -279,7 +279,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
|
||||||
* to be what Uniscribe and other engines implement. According to Eric Muller:
|
* to be what Uniscribe and other engines implement. According to Eric Muller:
|
||||||
*
|
*
|
||||||
* When you have a SARA AM, decompose it in NIKHAHIT + SARA AA, *and* move the
|
* When you have a SARA AM, decompose it in NIKHAHIT + SARA AA, *and* move the
|
||||||
* NIKHAHIT backwards over any tone mark (0E48-0E4B).
|
* NIKHAHIT backwards over any above-base marks (0E31, 0E34-0E37, 0E47-0E4E).
|
||||||
*
|
*
|
||||||
* <0E14, 0E4B, 0E33> -> <0E14, 0E4D, 0E4B, 0E32>
|
* <0E14, 0E4B, 0E33> -> <0E14, 0E4D, 0E4B, 0E32>
|
||||||
*
|
*
|
||||||
|
@ -319,7 +319,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
|
||||||
#define IS_SARA_AM(x) (((x) & ~0x0080u) == 0x0E33u)
|
#define IS_SARA_AM(x) (((x) & ~0x0080u) == 0x0E33u)
|
||||||
#define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0x0E33u + 0x0E4Du)
|
#define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0x0E33u + 0x0E4Du)
|
||||||
#define SARA_AA_FROM_SARA_AM(x) ((x) - 1)
|
#define SARA_AA_FROM_SARA_AM(x) ((x) - 1)
|
||||||
#define IS_TONE_MARK(x) (hb_in_ranges<hb_codepoint_t> ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u))
|
#define IS_ABOVE_BASE_MARK(x) (hb_in_ranges<hb_codepoint_t> ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u))
|
||||||
|
|
||||||
buffer->clear_output ();
|
buffer->clear_output ();
|
||||||
unsigned int count = buffer->len;
|
unsigned int count = buffer->len;
|
||||||
|
@ -343,7 +343,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
|
||||||
|
|
||||||
/* Ok, let's see... */
|
/* Ok, let's see... */
|
||||||
unsigned int start = end - 2;
|
unsigned int start = end - 2;
|
||||||
while (start > 0 && IS_TONE_MARK (buffer->out_info[start - 1].codepoint))
|
while (start > 0 && IS_ABOVE_BASE_MARK (buffer->out_info[start - 1].codepoint))
|
||||||
start--;
|
start--;
|
||||||
|
|
||||||
if (start + 2 < end)
|
if (start + 2 < end)
|
||||||
|
|
Loading…
Reference in New Issue