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

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-shape.cc

Issue 1408003004: Roll harfbuzz-ng to 1.0.5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years, 2 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 © 2009,2010 Red Hat, Inc. 2 * Copyright © 2009,2010 Red Hat, Inc.
3 * Copyright © 2010,2011,2012 Google, Inc. 3 * Copyright © 2010,2011,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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 { 295 {
296 /* Same loop as hb_form_clusters(). 296 /* Same loop as hb_form_clusters().
297 * Since form_clusters() merged clusters already, we don't merge. */ 297 * Since form_clusters() merged clusters already, we don't merge. */
298 unsigned int base = 0; 298 unsigned int base = 0;
299 unsigned int count = buffer->len; 299 unsigned int count = buffer->len;
300 hb_glyph_info_t *info = buffer->info; 300 hb_glyph_info_t *info = buffer->info;
301 for (unsigned int i = 1; i < count; i++) 301 for (unsigned int i = 1; i < count; i++)
302 { 302 {
303 if (likely (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_gener al_category (&info[i])))) 303 if (likely (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_gener al_category (&info[i]))))
304 { 304 {
305 buffer->reverse_range (base, i);
306 if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS ) 305 if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS )
307 buffer->merge_clusters (base, i); 306 buffer->merge_clusters (base, i);
307 buffer->reverse_range (base, i);
308
308 base = i; 309 base = i;
309 } 310 }
310 } 311 }
311 buffer->reverse_range (base, count);
312 if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS) 312 if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS)
313 buffer->merge_clusters (base, count); 313 buffer->merge_clusters (base, count);
314 buffer->reverse_range (base, count);
314 315
315 buffer->reverse (); 316 buffer->reverse ();
316 317
317 buffer->props.direction = HB_DIRECTION_REVERSE (buffer->props.direction); 318 buffer->props.direction = HB_DIRECTION_REVERSE (buffer->props.direction);
318 } 319 }
319 } 320 }
320 321
321 322
322 /* Substitute */ 323 /* Substitute */
323 324
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 hb_set_t copy; 883 hb_set_t copy;
883 copy.init (); 884 copy.init ();
884 do { 885 do {
885 copy.set (glyphs); 886 copy.set (glyphs);
886 for (hb_codepoint_t lookup_index = -1; hb_set_next (&lookups, &lookup_index) ;) 887 for (hb_codepoint_t lookup_index = -1; hb_set_next (&lookups, &lookup_index) ;)
887 hb_ot_layout_lookup_substitute_closure (font->face, lookup_index, glyphs); 888 hb_ot_layout_lookup_substitute_closure (font->face, lookup_index, glyphs);
888 } while (!copy.is_equal (glyphs)); 889 } while (!copy.is_equal (glyphs));
889 890
890 hb_shape_plan_destroy (shape_plan); 891 hb_shape_plan_destroy (shape_plan);
891 } 892 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-name-table.hh ('k') | third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698