src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-use.cc
changeset 50826 f5b95be8b6e2
parent 50352 25db2c8f3cf8
child 54232 7c11a7cc7c1d
equal deleted inserted replaced
50825:aa0a35b071fb 50826:f5b95be8b6e2
    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);