OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2011,2012 Google, Inc. | 2 * Copyright © 2011,2012 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 408 |
409 i = j - 1; | 409 i = j - 1; |
410 } | 410 } |
411 } | 411 } |
412 | 412 |
413 void | 413 void |
414 _hb_ot_shape_fallback_position (const hb_ot_shape_plan_t *plan, | 414 _hb_ot_shape_fallback_position (const hb_ot_shape_plan_t *plan, |
415 hb_font_t *font, | 415 hb_font_t *font, |
416 hb_buffer_t *buffer) | 416 hb_buffer_t *buffer) |
417 { | 417 { |
| 418 _hb_buffer_assert_gsubgpos_vars (buffer); |
| 419 |
418 unsigned int start = 0; | 420 unsigned int start = 0; |
419 unsigned int last_cluster = buffer->info[0].cluster; | 421 unsigned int last_cluster = buffer->info[0].cluster; |
420 unsigned int count = buffer->len; | 422 unsigned int count = buffer->len; |
421 for (unsigned int i = 1; i < count; i++) | 423 for (unsigned int i = 1; i < count; i++) |
422 if (buffer->info[i].cluster != last_cluster) { | 424 if (buffer->info[i].cluster != last_cluster) { |
423 position_cluster (plan, font, buffer, start, i); | 425 position_cluster (plan, font, buffer, start, i); |
424 start = i; | 426 start = i; |
425 last_cluster = buffer->info[i].cluster; | 427 last_cluster = buffer->info[i].cluster; |
426 } | 428 } |
427 position_cluster (plan, font, buffer, start, count); | 429 position_cluster (plan, font, buffer, start, count); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 hb_position_t kern1 = y_kern >> 1; | 474 hb_position_t kern1 = y_kern >> 1; |
473 hb_position_t kern2 = y_kern - kern1; | 475 hb_position_t kern2 = y_kern - kern1; |
474 pos[idx].y_advance += kern1; | 476 pos[idx].y_advance += kern1; |
475 pos[skippy_iter.idx].y_advance += kern2; | 477 pos[skippy_iter.idx].y_advance += kern2; |
476 pos[skippy_iter.idx].y_offset += kern2; | 478 pos[skippy_iter.idx].y_offset += kern2; |
477 } | 479 } |
478 | 480 |
479 idx = skippy_iter.idx; | 481 idx = skippy_iter.idx; |
480 } | 482 } |
481 } | 483 } |
OLD | NEW |