| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 1998-2004 David Turner and Werner Lemberg | 2 * Copyright © 1998-2004 David Turner and Werner Lemberg |
| 3 * Copyright © 2004,2007,2009,2010 Red Hat, Inc. | 3 * Copyright © 2004,2007,2009,2010 Red Hat, Inc. |
| 4 * Copyright © 2011,2012 Google, Inc. | 4 * Copyright © 2011,2012 Google, Inc. |
| 5 * | 5 * |
| 6 * This is part of HarfBuzz, a text shaping library. | 6 * This is part of HarfBuzz, a text shaping library. |
| 7 * | 7 * |
| 8 * Permission is hereby granted, without written agreement and without | 8 * Permission is hereby granted, without written agreement and without |
| 9 * license or royalty fees, to use, copy, modify, and distribute this | 9 * license or royalty fees, to use, copy, modify, and distribute this |
| 10 * software and its documentation for any purpose, provided that the | 10 * software and its documentation for any purpose, provided that the |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 /* HarfBuzz-Internal API */ | 171 /* HarfBuzz-Internal API */ |
| 172 | 172 |
| 173 void | 173 void |
| 174 hb_buffer_t::reset (void) | 174 hb_buffer_t::reset (void) |
| 175 { | 175 { |
| 176 if (unlikely (hb_object_is_inert (this))) | 176 if (unlikely (hb_object_is_inert (this))) |
| 177 return; | 177 return; |
| 178 | 178 |
| 179 hb_unicode_funcs_destroy (unicode); | 179 hb_unicode_funcs_destroy (unicode); |
| 180 unicode = hb_unicode_funcs_get_default (); | 180 unicode = hb_unicode_funcs_get_default (); |
| 181 flags = HB_BUFFER_FLAG_DEFAULT; |
| 181 replacement = HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT; | 182 replacement = HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT; |
| 182 | 183 |
| 183 clear (); | 184 clear (); |
| 184 } | 185 } |
| 185 | 186 |
| 186 void | 187 void |
| 187 hb_buffer_t::clear (void) | 188 hb_buffer_t::clear (void) |
| 188 { | 189 { |
| 189 if (unlikely (hb_object_is_inert (this))) | 190 if (unlikely (hb_object_is_inert (this))) |
| 190 return; | 191 return; |
| 191 | 192 |
| 192 hb_segment_properties_t default_props = HB_SEGMENT_PROPERTIES_DEFAULT; | 193 hb_segment_properties_t default_props = HB_SEGMENT_PROPERTIES_DEFAULT; |
| 193 props = default_props; | 194 props = default_props; |
| 194 flags = HB_BUFFER_FLAG_DEFAULT; | |
| 195 | 195 |
| 196 content_type = HB_BUFFER_CONTENT_TYPE_INVALID; | 196 content_type = HB_BUFFER_CONTENT_TYPE_INVALID; |
| 197 in_error = false; | 197 in_error = false; |
| 198 have_output = false; | 198 have_output = false; |
| 199 have_positions = false; | 199 have_positions = false; |
| 200 | 200 |
| 201 idx = 0; | 201 idx = 0; |
| 202 len = 0; | 202 len = 0; |
| 203 out_len = 0; | 203 out_len = 0; |
| 204 out_info = info; | 204 out_info = info; |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 * | 695 * |
| 696 * Since: 1.0 | 696 * Since: 1.0 |
| 697 **/ | 697 **/ |
| 698 hb_buffer_t * | 698 hb_buffer_t * |
| 699 hb_buffer_get_empty (void) | 699 hb_buffer_get_empty (void) |
| 700 { | 700 { |
| 701 static const hb_buffer_t _hb_buffer_nil = { | 701 static const hb_buffer_t _hb_buffer_nil = { |
| 702 HB_OBJECT_HEADER_STATIC, | 702 HB_OBJECT_HEADER_STATIC, |
| 703 | 703 |
| 704 const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_nil), | 704 const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_nil), |
| 705 HB_SEGMENT_PROPERTIES_DEFAULT, | |
| 706 HB_BUFFER_FLAG_DEFAULT, | 705 HB_BUFFER_FLAG_DEFAULT, |
| 707 HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT, | 706 HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT, |
| 708 | 707 |
| 709 HB_BUFFER_CONTENT_TYPE_INVALID, | 708 HB_BUFFER_CONTENT_TYPE_INVALID, |
| 709 HB_SEGMENT_PROPERTIES_DEFAULT, |
| 710 true, /* in_error */ | 710 true, /* in_error */ |
| 711 true, /* have_output */ | 711 true, /* have_output */ |
| 712 true /* have_positions */ | 712 true /* have_positions */ |
| 713 | 713 |
| 714 /* Zero is good enough for everything else. */ | 714 /* Zero is good enough for everything else. */ |
| 715 }; | 715 }; |
| 716 | 716 |
| 717 return const_cast<hb_buffer_t *> (&_hb_buffer_nil); | 717 return const_cast<hb_buffer_t *> (&_hb_buffer_nil); |
| 718 } | 718 } |
| 719 | 719 |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 | 1563 |
| 1564 unsigned int start = 0; | 1564 unsigned int start = 0; |
| 1565 unsigned int end; | 1565 unsigned int end; |
| 1566 for (end = start + 1; end < count; end++) | 1566 for (end = start + 1; end < count; end++) |
| 1567 if (info[start].cluster != info[end].cluster) { | 1567 if (info[start].cluster != info[end].cluster) { |
| 1568 normalize_glyphs_cluster (buffer, start, end, backward); | 1568 normalize_glyphs_cluster (buffer, start, end, backward); |
| 1569 start = end; | 1569 start = end; |
| 1570 } | 1570 } |
| 1571 normalize_glyphs_cluster (buffer, start, end, backward); | 1571 normalize_glyphs_cluster (buffer, start, end, backward); |
| 1572 } | 1572 } |
| OLD | NEW |