Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh

Issue 1580513002: Roll HarfBuzz to 1.1.3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc. 2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
3 * Copyright © 2010,2012 Google, Inc. 3 * Copyright © 2010,2012 Google, Inc.
4 * 4 *
5 * This is part of HarfBuzz, a text shaping library. 5 * This is part of HarfBuzz, a text shaping library.
6 * 6 *
7 * Permission is hereby granted, without written agreement and without 7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this 8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the 9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in 10 * above copyright notice and the following two paragraphs appear in
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 _hb_glyph_info_set_general_category (&buffer->cur(), HB_UNICODE_GENERAL_CA TEGORY_OTHER_LETTER); 838 _hb_glyph_info_set_general_category (&buffer->cur(), HB_UNICODE_GENERAL_CA TEGORY_OTHER_LETTER);
839 } 839 }
840 } 840 }
841 c->replace_glyph_with_ligature (lig_glyph, klass); 841 c->replace_glyph_with_ligature (lig_glyph, klass);
842 842
843 for (unsigned int i = 1; i < count; i++) 843 for (unsigned int i = 1; i < count; i++)
844 { 844 {
845 while (buffer->idx < match_positions[i] && !buffer->in_error) 845 while (buffer->idx < match_positions[i] && !buffer->in_error)
846 { 846 {
847 if (!is_mark_ligature) { 847 if (!is_mark_ligature) {
848 unsigned int this_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
849 if (this_comp == 0)
850 this_comp = last_num_components;
848 unsigned int new_lig_comp = components_so_far - last_num_components + 851 unsigned int new_lig_comp = components_so_far - last_num_components +
849 » » » » MIN (MAX (_hb_glyph_info_get_lig_comp (&buff er->cur()), 1u), last_num_components); 852 » » » » MIN (this_comp, last_num_components);
850 » _hb_glyph_info_set_lig_props_for_mark (&buffer->cur(), lig_id, new_lig_c omp); 853 » _hb_glyph_info_set_lig_props_for_mark (&buffer->cur(), lig_id, new_lig _comp);
851 } 854 }
852 buffer->next_glyph (); 855 buffer->next_glyph ();
853 } 856 }
854 857
855 last_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur()); 858 last_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur());
856 last_num_components = _hb_glyph_info_get_lig_num_comps (&buffer->cur()); 859 last_num_components = _hb_glyph_info_get_lig_num_comps (&buffer->cur());
857 components_so_far += last_num_components; 860 components_so_far += last_num_components;
858 861
859 /* Skip the base glyph */ 862 /* Skip the base glyph */
860 buffer->idx++; 863 buffer->idx++;
861 } 864 }
862 865
863 if (!is_mark_ligature && last_lig_id) { 866 if (!is_mark_ligature && last_lig_id) {
864 /* Re-adjust components for any marks following. */ 867 /* Re-adjust components for any marks following. */
865 for (unsigned int i = buffer->idx; i < buffer->len; i++) { 868 for (unsigned int i = buffer->idx; i < buffer->len; i++) {
866 if (last_lig_id == _hb_glyph_info_get_lig_id (&buffer->info[i])) { 869 if (last_lig_id == _hb_glyph_info_get_lig_id (&buffer->info[i])) {
870 unsigned int this_comp = _hb_glyph_info_get_lig_comp (&buffer->info[i]);
871 if (!this_comp)
872 break;
867 unsigned int new_lig_comp = components_so_far - last_num_components + 873 unsigned int new_lig_comp = components_so_far - last_num_components +
868 » » » » MIN (MAX (_hb_glyph_info_get_lig_comp (&buff er->info[i]), 1u), last_num_components); 874 » » » » MIN (this_comp, last_num_components);
869 _hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig _comp); 875 _hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig _comp);
870 } else 876 } else
871 break; 877 break;
872 } 878 }
873 } 879 }
874 return_trace (true); 880 return_trace (true);
875 } 881 }
876 882
877 static inline bool match_backtrack (hb_apply_context_t *c, 883 static inline bool match_backtrack (hb_apply_context_t *c,
878 unsigned int count, 884 unsigned int count,
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 lookupList; /* LookupList table */ 2287 lookupList; /* LookupList table */
2282 public: 2288 public:
2283 DEFINE_SIZE_STATIC (10); 2289 DEFINE_SIZE_STATIC (10);
2284 }; 2290 };
2285 2291
2286 2292
2287 } /* namespace OT */ 2293 } /* namespace OT */
2288 2294
2289 2295
2290 #endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */ 2296 #endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh ('k') | third_party/harfbuzz-ng/src/hb-ot-layout-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698