| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2011 Martin Hosken | 2 * Copyright © 2011 Martin Hosken |
| 3 * Copyright © 2011 SIL International | 3 * Copyright © 2011 SIL International |
| 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 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #define HB_SHAPER graphite2 | 29 #define HB_SHAPER graphite2 |
| 30 #define hb_graphite2_shaper_font_data_t gr_font | 30 #define hb_graphite2_shaper_font_data_t gr_font |
| 31 #include "hb-shaper-impl-private.hh" | 31 #include "hb-shaper-impl-private.hh" |
| 32 | 32 |
| 33 #include "hb-graphite2.h" | 33 #include "hb-graphite2.h" |
| 34 | 34 |
| 35 #include <graphite2/Segment.h> | 35 #include <graphite2/Segment.h> |
| 36 | 36 |
| 37 #include "hb-ot-tag.h" | |
| 38 | |
| 39 | 37 |
| 40 HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, face) | 38 HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, face) |
| 41 HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, font) | 39 HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, font) |
| 42 | 40 |
| 43 | 41 |
| 44 /* | 42 /* |
| 45 * shaper face data | 43 * shaper face data |
| 46 */ | 44 */ |
| 47 | 45 |
| 48 typedef struct hb_graphite2_tablelist_t { | 46 typedef struct hb_graphite2_tablelist_t { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 * Maybe add better API for this? */ | 100 * Maybe add better API for this? */ |
| 103 if (!hb_blob_get_length (silf_blob)) | 101 if (!hb_blob_get_length (silf_blob)) |
| 104 { | 102 { |
| 105 hb_blob_destroy (silf_blob); | 103 hb_blob_destroy (silf_blob); |
| 106 return NULL; | 104 return NULL; |
| 107 } | 105 } |
| 108 hb_blob_destroy (silf_blob); | 106 hb_blob_destroy (silf_blob); |
| 109 | 107 |
| 110 hb_graphite2_shaper_face_data_t *data = (hb_graphite2_shaper_face_data_t *) ca
lloc (1, sizeof (hb_graphite2_shaper_face_data_t)); | 108 hb_graphite2_shaper_face_data_t *data = (hb_graphite2_shaper_face_data_t *) ca
lloc (1, sizeof (hb_graphite2_shaper_face_data_t)); |
| 111 if (unlikely (!data)) | 109 if (unlikely (!data)) |
| 112 hb_blob_destroy (silf_blob); | 110 return NULL; |
| 113 | 111 |
| 114 data->face = face; | 112 data->face = face; |
| 115 data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_preloadAll
); | 113 data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_preloadAll
); |
| 116 | 114 |
| 117 if (unlikely (!data->grface)) { | 115 if (unlikely (!data->grface)) { |
| 118 free (data); | 116 free (data); |
| 119 return NULL; | 117 return NULL; |
| 120 } | 118 } |
| 121 | 119 |
| 122 return data; | 120 return data; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 pPos[-1].x_advance += gr_seg_advance_X(seg) - curradvx; | 364 pPos[-1].x_advance += gr_seg_advance_X(seg) - curradvx; |
| 367 | 365 |
| 368 if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) | 366 if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) |
| 369 hb_buffer_reverse_clusters (buffer); | 367 hb_buffer_reverse_clusters (buffer); |
| 370 | 368 |
| 371 if (feats) gr_featureval_destroy (feats); | 369 if (feats) gr_featureval_destroy (feats); |
| 372 gr_seg_destroy (seg); | 370 gr_seg_destroy (seg); |
| 373 | 371 |
| 374 return true; | 372 return true; |
| 375 } | 373 } |
| OLD | NEW |