OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2009,2010 Red Hat, Inc. | 2 * Copyright © 2009,2010 Red Hat, Inc. |
3 * Copyright © 2010,2011 Google, Inc. | 3 * Copyright © 2010,2011 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 for (; i < pause->num_lookups; i++) | 88 for (; i < pause->num_lookups; i++) |
89 apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, lo
okups[table_index][i].mask); | 89 apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, lo
okups[table_index][i].mask); |
90 | 90 |
91 pause->callback.func (this, face_or_font, buffer, pause->callback.user_data)
; | 91 pause->callback.func (this, face_or_font, buffer, pause->callback.user_data)
; |
92 } | 92 } |
93 | 93 |
94 for (; i < lookups[table_index].len; i++) | 94 for (; i < lookups[table_index].len; i++) |
95 apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, look
ups[table_index][i].mask); | 95 apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, look
ups[table_index][i].mask); |
96 } | 96 } |
97 | 97 |
| 98 void hb_ot_map_t::substitute_closure (hb_face_t *face, |
| 99 hb_set_t *glyphs) const |
| 100 { |
| 101 unsigned int table_index = 0; |
| 102 unsigned int i = 0; |
| 103 |
| 104 for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; paus
e_index++) { |
| 105 const pause_map_t *pause = &pauses[table_index][pause_index]; |
| 106 for (; i < pause->num_lookups; i++) |
| 107 hb_ot_layout_substitute_closure_lookup (face, glyphs, lookups[table_index]
[i].index); |
| 108 } |
| 109 |
| 110 for (; i < lookups[table_index].len; i++) |
| 111 hb_ot_layout_substitute_closure_lookup (face, glyphs, lookups[table_index][i
].index); |
| 112 } |
98 | 113 |
99 void hb_ot_map_builder_t::add_pause (unsigned int table_index, hb_ot_map_t::paus
e_func_t pause_func, void *user_data) | 114 void hb_ot_map_builder_t::add_pause (unsigned int table_index, hb_ot_map_t::paus
e_func_t pause_func, void *user_data) |
100 { | 115 { |
101 if (pause_func) { | 116 if (pause_func) { |
102 pause_info_t *p = pauses[table_index].push (); | 117 pause_info_t *p = pauses[table_index].push (); |
103 if (likely (p)) { | 118 if (likely (p)) { |
104 p->stage = current_stage[table_index]; | 119 p->stage = current_stage[table_index]; |
105 p->callback.func = pause_func; | 120 p->callback.func = pause_func; |
106 p->callback.user_data = user_data; | 121 p->callback.user_data = user_data; |
107 } | 122 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 pause_map->callback = pauses[table_index][pause_index].callback; | 280 pause_map->callback = pauses[table_index][pause_index].callback; |
266 } | 281 } |
267 | 282 |
268 pause_index++; | 283 pause_index++; |
269 } | 284 } |
270 } | 285 } |
271 } | 286 } |
272 } | 287 } |
273 | 288 |
274 | 289 |
OLD | NEW |