equal
deleted
inserted
replaced
33 #define use_category() complex_var_u8_0() |
33 #define use_category() complex_var_u8_0() |
34 |
34 |
35 |
35 |
36 /* |
36 /* |
37 * Universal Shaping Engine. |
37 * Universal Shaping Engine. |
38 * https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm |
38 * https://docs.microsoft.com/en-us/typography/script-development/use |
39 */ |
39 */ |
40 |
40 |
41 static const hb_tag_t |
41 static const hb_tag_t |
42 basic_features[] = |
42 basic_features[] = |
43 { |
43 { |
509 |
509 |
510 buffer->clear_output (); |
510 buffer->clear_output (); |
511 |
511 |
512 buffer->idx = 0; |
512 buffer->idx = 0; |
513 unsigned int last_syllable = 0; |
513 unsigned int last_syllable = 0; |
514 while (buffer->idx < buffer->len && !buffer->in_error) |
514 while (buffer->idx < buffer->len && buffer->successful) |
515 { |
515 { |
516 unsigned int syllable = buffer->cur().syllable(); |
516 unsigned int syllable = buffer->cur().syllable(); |
517 syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F); |
517 syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F); |
518 if (unlikely (last_syllable != syllable && syllable_type == broken_cluster)) |
518 if (unlikely (last_syllable != syllable && syllable_type == broken_cluster)) |
519 { |
519 { |
524 ginfo.mask = buffer->cur().mask; |
524 ginfo.mask = buffer->cur().mask; |
525 ginfo.syllable() = buffer->cur().syllable(); |
525 ginfo.syllable() = buffer->cur().syllable(); |
526 /* TODO Set glyph_props? */ |
526 /* TODO Set glyph_props? */ |
527 |
527 |
528 /* Insert dottedcircle after possible Repha. */ |
528 /* Insert dottedcircle after possible Repha. */ |
529 while (buffer->idx < buffer->len && !buffer->in_error && |
529 while (buffer->idx < buffer->len && buffer->successful && |
530 last_syllable == buffer->cur().syllable() && |
530 last_syllable == buffer->cur().syllable() && |
531 buffer->cur().use_category() == USE_R) |
531 buffer->cur().use_category() == USE_R) |
532 buffer->next_glyph (); |
532 buffer->next_glyph (); |
533 |
533 |
534 buffer->output_info (ginfo); |
534 buffer->output_info (ginfo); |