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

Unified Diff: third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh

Issue 16053004: Update harfbuzz-ng to 0.9.17 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh ('k') | third_party/harfbuzz-ng/src/hb-ot-map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
===================================================================
--- third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh (리비전 201894)
+++ third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh (작업 사본)
@@ -275,11 +275,18 @@
unsigned int klass = c->buffer->cur().glyph_props() &
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE ? HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : 0;
unsigned int count = substitute.len;
- for (unsigned int i = 0; i < count; i++) {
- set_lig_props_for_component (c->buffer->cur(), i);
- c->output_glyph (substitute.array[i], klass);
+ if (count == 1) /* Special-case to make it in-place. */
+ {
+ c->replace_glyph (substitute.array[0]);
}
- c->buffer->skip_glyph ();
+ else
+ {
+ for (unsigned int i = 0; i < count; i++) {
+ set_lig_props_for_component (c->buffer->cur(), i);
+ c->output_glyph (substitute.array[i], klass);
+ }
+ c->buffer->skip_glyph ();
+ }
return TRACE_RETURN (true);
}
@@ -1196,38 +1203,38 @@
if (likely (!is_reverse ()))
{
- /* in/out forward substitution */
- c->buffer->clear_output ();
- c->buffer->idx = 0;
+ /* in/out forward substitution */
+ c->buffer->clear_output ();
+ c->buffer->idx = 0;
- while (c->buffer->idx < c->buffer->len)
- {
- if ((c->buffer->cur().mask & c->lookup_mask) &&
- digest->may_have (c->buffer->cur().codepoint) &&
- apply_once (c))
- ret = true;
- else
- c->buffer->next_glyph ();
- }
- if (ret)
- c->buffer->swap_buffers ();
+ while (c->buffer->idx < c->buffer->len)
+ {
+ if (digest->may_have (c->buffer->cur().codepoint) &&
+ (c->buffer->cur().mask & c->lookup_mask) &&
+ apply_once (c))
+ ret = true;
+ else
+ c->buffer->next_glyph ();
+ }
+ if (ret)
+ c->buffer->swap_buffers ();
}
else
{
- /* in-place backward substitution */
- c->buffer->remove_output ();
- c->buffer->idx = c->buffer->len - 1;
- do
- {
- if ((c->buffer->cur().mask & c->lookup_mask) &&
- digest->may_have (c->buffer->cur().codepoint) &&
- apply_once (c))
- ret = true;
- else
- c->buffer->idx--;
+ /* in-place backward substitution */
+ c->buffer->remove_output ();
+ c->buffer->idx = c->buffer->len - 1;
+ do
+ {
+ if (digest->may_have (c->buffer->cur().codepoint) &&
+ (c->buffer->cur().mask & c->lookup_mask) &&
+ apply_once (c))
+ ret = true;
+ else
+ c->buffer->idx--;
- }
- while ((int) c->buffer->idx >= 0);
+ }
+ while ((int) c->buffer->idx >= 0);
}
return ret;
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh ('k') | third_party/harfbuzz-ng/src/hb-ot-map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698