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

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

Issue 12438036: Update harfbuzz-ng to 0.9.14 from 0.9.10 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright © 2011 Google, Inc. 2 * Copyright © 2011 Google, Inc.
3 * 3 *
4 * This is part of HarfBuzz, a text shaping library. 4 * This is part of HarfBuzz, a text shaping library.
5 * 5 *
6 * Permission is hereby granted, without written agreement and without 6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this 7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the 8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in 9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software. 10 * all copies of this software.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 hb_bool_t 91 hb_bool_t
92 _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED, 92 _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
93 hb_font_t *font, 93 hb_font_t *font,
94 hb_buffer_t *buffer, 94 hb_buffer_t *buffer,
95 const hb_feature_t *features HB_UNUSED, 95 const hb_feature_t *features HB_UNUSED,
96 unsigned int num_features HB_UNUSED) 96 unsigned int num_features HB_UNUSED)
97 { 97 {
98 hb_codepoint_t space; 98 hb_codepoint_t space;
99 font->get_glyph (' ', 0, &space); 99 font->get_glyph (' ', 0, &space);
100 100
101 buffer->guess_segment_properties ();
102 buffer->clear_positions (); 101 buffer->clear_positions ();
103 102
104 unsigned int count = buffer->len; 103 unsigned int count = buffer->len;
105 104
106 for (unsigned int i = 0; i < count; i++) 105 for (unsigned int i = 0; i < count; i++)
107 { 106 {
108 if (buffer->unicode->is_default_ignorable (buffer->info[i].codepoint)) { 107 if (buffer->unicode->is_default_ignorable (buffer->info[i].codepoint)) {
109 buffer->info[i].codepoint = space; 108 buffer->info[i].codepoint = space;
110 buffer->pos[i].x_advance = 0; 109 buffer->pos[i].x_advance = 0;
111 buffer->pos[i].y_advance = 0; 110 buffer->pos[i].y_advance = 0;
112 continue; 111 continue;
113 } 112 }
114 font->get_glyph (buffer->info[i].codepoint, 0, &buffer->info[i].codepoint); 113 font->get_glyph (buffer->info[i].codepoint, 0, &buffer->info[i].codepoint);
115 font->get_glyph_advance_for_direction (buffer->info[i].codepoint, 114 font->get_glyph_advance_for_direction (buffer->info[i].codepoint,
116 buffer->props.direction, 115 buffer->props.direction,
117 &buffer->pos[i].x_advance, 116 &buffer->pos[i].x_advance,
118 &buffer->pos[i].y_advance); 117 &buffer->pos[i].y_advance);
119 font->subtract_glyph_origin_for_direction (buffer->info[i].codepoint, 118 font->subtract_glyph_origin_for_direction (buffer->info[i].codepoint,
120 buffer->props.direction, 119 buffer->props.direction,
121 &buffer->pos[i].x_offset, 120 &buffer->pos[i].x_offset,
122 &buffer->pos[i].y_offset); 121 &buffer->pos[i].y_offset);
123 } 122 }
124 123
125 if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) 124 if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
126 hb_buffer_reverse (buffer); 125 hb_buffer_reverse (buffer);
127 126
128 return true; 127 return true;
129 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698