OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 1998-2004 David Turner and Werner Lemberg | 2 * Copyright © 1998-2004 David Turner and Werner Lemberg |
3 * Copyright © 2006 Behdad Esfahbod | 3 * Copyright © 2006 Behdad Esfahbod |
4 * Copyright © 2007,2008,2009 Red Hat, Inc. | 4 * Copyright © 2007,2008,2009 Red Hat, Inc. |
5 * Copyright © 2012 Google, Inc. | 5 * Copyright © 2012 Google, Inc. |
6 * | 6 * |
7 * This is part of HarfBuzz, a text shaping library. | 7 * This is part of HarfBuzz, a text shaping library. |
8 * | 8 * |
9 * Permission is hereby granted, without written agreement and without | 9 * Permission is hereby granted, without written agreement and without |
10 * license or royalty fees, to use, copy, modify, and distribute this | 10 * license or royalty fees, to use, copy, modify, and distribute this |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 layout->gpos_digests = (hb_set_digest_t *) calloc (layout->gpos->get_lookup_co
unt (), sizeof (hb_set_digest_t)); | 63 layout->gpos_digests = (hb_set_digest_t *) calloc (layout->gpos->get_lookup_co
unt (), sizeof (hb_set_digest_t)); |
64 | 64 |
65 if (unlikely ((layout->gsub_lookup_count && !layout->gsub_digests) || | 65 if (unlikely ((layout->gsub_lookup_count && !layout->gsub_digests) || |
66 (layout->gpos_lookup_count && !layout->gpos_digests))) | 66 (layout->gpos_lookup_count && !layout->gpos_digests))) |
67 { | 67 { |
68 _hb_ot_layout_destroy (layout); | 68 _hb_ot_layout_destroy (layout); |
69 return NULL; | 69 return NULL; |
70 } | 70 } |
71 | 71 |
72 for (unsigned int i = 0; i < layout->gsub_lookup_count; i++) | 72 for (unsigned int i = 0; i < layout->gsub_lookup_count; i++) |
| 73 { |
| 74 layout->gsub_digests[i].init (); |
73 layout->gsub->get_lookup (i).add_coverage (&layout->gsub_digests[i]); | 75 layout->gsub->get_lookup (i).add_coverage (&layout->gsub_digests[i]); |
| 76 } |
74 for (unsigned int i = 0; i < layout->gpos_lookup_count; i++) | 77 for (unsigned int i = 0; i < layout->gpos_lookup_count; i++) |
| 78 { |
| 79 layout->gpos_digests[i].init (); |
75 layout->gpos->get_lookup (i).add_coverage (&layout->gpos_digests[i]); | 80 layout->gpos->get_lookup (i).add_coverage (&layout->gpos_digests[i]); |
| 81 } |
76 | 82 |
77 return layout; | 83 return layout; |
78 } | 84 } |
79 | 85 |
80 void | 86 void |
81 _hb_ot_layout_destroy (hb_ot_layout_t *layout) | 87 _hb_ot_layout_destroy (hb_ot_layout_t *layout) |
82 { | 88 { |
83 hb_blob_destroy (layout->gdef_blob); | 89 hb_blob_destroy (layout->gdef_blob); |
84 hb_blob_destroy (layout->gsub_blob); | 90 hb_blob_destroy (layout->gsub_blob); |
85 hb_blob_destroy (layout->gpos_blob); | 91 hb_blob_destroy (layout->gpos_blob); |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 #define PARAM(a, A) if (a) *a = 0 | 777 #define PARAM(a, A) if (a) *a = 0 |
772 PARAM (design_size, designSize); | 778 PARAM (design_size, designSize); |
773 PARAM (subfamily_id, subfamilyID); | 779 PARAM (subfamily_id, subfamilyID); |
774 PARAM (subfamily_name_id, subfamilyNameID); | 780 PARAM (subfamily_name_id, subfamilyNameID); |
775 PARAM (range_start, rangeStart); | 781 PARAM (range_start, rangeStart); |
776 PARAM (range_end, rangeEnd); | 782 PARAM (range_end, rangeEnd); |
777 #undef PARAM | 783 #undef PARAM |
778 | 784 |
779 return false; | 785 return false; |
780 } | 786 } |
OLD | NEW |