OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2012 Google, Inc. | 2 * Copyright © 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 static void | 321 static void |
322 arabic_fallback_plan_destroy (arabic_fallback_plan_t *fallback_plan) | 322 arabic_fallback_plan_destroy (arabic_fallback_plan_t *fallback_plan) |
323 { | 323 { |
324 if (!fallback_plan || fallback_plan == &arabic_fallback_plan_nil) | 324 if (!fallback_plan || fallback_plan == &arabic_fallback_plan_nil) |
325 return; | 325 return; |
326 | 326 |
327 for (unsigned int i = 0; i < fallback_plan->num_lookups; i++) | 327 for (unsigned int i = 0; i < fallback_plan->num_lookups; i++) |
328 if (fallback_plan->lookup_array[i]) | 328 if (fallback_plan->lookup_array[i]) |
329 { | 329 { |
330 fallback_plan->accel_array[i].fini (fallback_plan->lookup_array[i]); | 330 fallback_plan->accel_array[i].fini (); |
331 if (fallback_plan->free_lookups) | 331 if (fallback_plan->free_lookups) |
332 free (fallback_plan->lookup_array[i]); | 332 free (fallback_plan->lookup_array[i]); |
333 } | 333 } |
334 | 334 |
335 free (fallback_plan); | 335 free (fallback_plan); |
336 } | 336 } |
337 | 337 |
338 static void | 338 static void |
339 arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan, | 339 arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan, |
340 hb_font_t *font, | 340 hb_font_t *font, |
341 hb_buffer_t *buffer) | 341 hb_buffer_t *buffer) |
342 { | 342 { |
343 OT::hb_apply_context_t c (0, font, buffer); | 343 OT::hb_apply_context_t c (0, font, buffer); |
344 for (unsigned int i = 0; i < fallback_plan->num_lookups; i++) | 344 for (unsigned int i = 0; i < fallback_plan->num_lookups; i++) |
345 if (fallback_plan->lookup_array[i]) { | 345 if (fallback_plan->lookup_array[i]) { |
346 c.set_lookup_mask (fallback_plan->mask_array[i]); | 346 c.set_lookup_mask (fallback_plan->mask_array[i]); |
347 hb_ot_layout_substitute_lookup (&c, | 347 hb_ot_layout_substitute_lookup (&c, |
348 *fallback_plan->lookup_array[i], | 348 *fallback_plan->lookup_array[i], |
349 fallback_plan->accel_array[i]); | 349 fallback_plan->accel_array[i]); |
350 } | 350 } |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 #endif /* HB_OT_SHAPE_COMPLEX_ARABIC_FALLBACK_HH */ | 354 #endif /* HB_OT_SHAPE_COMPLEX_ARABIC_FALLBACK_HH */ |
OLD | NEW |