OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc. | 2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc. |
3 * Copyright © 2010,2012,2013 Google, Inc. | 3 * Copyright © 2010,2012,2013 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 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 buffer->clear_positions (); | 1582 buffer->clear_positions (); |
1583 | 1583 |
1584 unsigned int count = buffer->len; | 1584 unsigned int count = buffer->len; |
1585 for (unsigned int i = 0; i < count; i++) | 1585 for (unsigned int i = 0; i < count; i++) |
1586 buffer->pos[i].attach_lookback() = buffer->pos[i].cursive_chain() = 0; | 1586 buffer->pos[i].attach_lookback() = buffer->pos[i].cursive_chain() = 0; |
1587 } | 1587 } |
1588 | 1588 |
1589 void | 1589 void |
1590 GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) | 1590 GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) |
1591 { | 1591 { |
| 1592 _hb_buffer_assert_gsubgpos_vars (buffer); |
| 1593 |
1592 unsigned int len; | 1594 unsigned int len; |
1593 hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, &len); | 1595 hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, &len); |
1594 hb_direction_t direction = buffer->props.direction; | 1596 hb_direction_t direction = buffer->props.direction; |
1595 | 1597 |
1596 /* Handle cursive connections */ | 1598 /* Handle cursive connections */ |
1597 for (unsigned int i = 0; i < len; i++) | 1599 for (unsigned int i = 0; i < len; i++) |
1598 fix_cursive_minor_offset (pos, i, direction); | 1600 fix_cursive_minor_offset (pos, i, direction); |
1599 | 1601 |
1600 /* Handle attachments */ | 1602 /* Handle attachments */ |
1601 for (unsigned int i = 0; i < len; i++) | 1603 for (unsigned int i = 0; i < len; i++) |
1602 fix_mark_attachment (pos, i, direction); | 1604 fix_mark_attachment (pos, i, direction); |
1603 | |
1604 _hb_buffer_deallocate_gsubgpos_vars (buffer); | |
1605 } | 1605 } |
1606 | 1606 |
1607 | 1607 |
1608 /* Out-of-class implementation for methods recursing */ | 1608 /* Out-of-class implementation for methods recursing */ |
1609 | 1609 |
1610 template <typename context_t> | 1610 template <typename context_t> |
1611 /*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func
(context_t *c, unsigned int lookup_index) | 1611 /*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func
(context_t *c, unsigned int lookup_index) |
1612 { | 1612 { |
1613 const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos); | 1613 const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos); |
1614 const PosLookup &l = gpos.get_lookup (lookup_index); | 1614 const PosLookup &l = gpos.get_lookup (lookup_index); |
(...skipping 13 matching lines...) Expand all Loading... |
1628 | 1628 |
1629 | 1629 |
1630 #undef attach_lookback | 1630 #undef attach_lookback |
1631 #undef cursive_chain | 1631 #undef cursive_chain |
1632 | 1632 |
1633 | 1633 |
1634 } /* namespace OT */ | 1634 } /* namespace OT */ |
1635 | 1635 |
1636 | 1636 |
1637 #endif /* HB_OT_LAYOUT_GPOS_TABLE_HH */ | 1637 #endif /* HB_OT_LAYOUT_GPOS_TABLE_HH */ |
OLD | NEW |