OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2009 Red Hat, Inc. | 2 * Copyright © 2009 Red Hat, Inc. |
3 * Copyright © 2011 Google, Inc. | 3 * Copyright © 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 hb_bool_t immutable; | 47 hb_bool_t immutable; |
48 | 48 |
49 hb_reference_table_func_t reference_table_func; | 49 hb_reference_table_func_t reference_table_func; |
50 void *user_data; | 50 void *user_data; |
51 hb_destroy_func_t destroy; | 51 hb_destroy_func_t destroy; |
52 | 52 |
53 unsigned int index; /* Face index in a collection, zero-base
d. */ | 53 unsigned int index; /* Face index in a collection, zero-base
d. */ |
54 mutable unsigned int upem; /* Units-per-EM. */ | 54 mutable unsigned int upem; /* Units-per-EM. */ |
55 mutable unsigned int num_glyphs; /* Number of glyphs. */ | 55 mutable unsigned int num_glyphs; /* Number of glyphs. */ |
56 | 56 |
| 57 enum dirty_t { |
| 58 NOTHING = 0x0000, |
| 59 INDEX = 0x0001, |
| 60 UPEM = 0x0002, |
| 61 NUM_GLYPHS = 0x0004, |
| 62 } dirty; |
| 63 |
57 struct hb_shaper_data_t shaper_data; /* Various shaper data. */ | 64 struct hb_shaper_data_t shaper_data; /* Various shaper data. */ |
58 | 65 |
59 /* Various non-shaping data. */ | 66 /* Various non-shaping data. */ |
60 /* ... */ | 67 /* ... */ |
61 | 68 |
62 /* Cache */ | 69 /* Cache */ |
63 struct plan_node_t { | 70 struct plan_node_t { |
64 hb_shape_plan_t *shape_plan; | 71 hb_shape_plan_t *shape_plan; |
65 plan_node_t *next; | 72 plan_node_t *next; |
66 } *shape_plans; | 73 } *shape_plans; |
(...skipping 25 matching lines...) Expand all Loading... |
92 if (unlikely (num_glyphs == (unsigned int) -1)) | 99 if (unlikely (num_glyphs == (unsigned int) -1)) |
93 load_num_glyphs (); | 100 load_num_glyphs (); |
94 return num_glyphs; | 101 return num_glyphs; |
95 } | 102 } |
96 | 103 |
97 private: | 104 private: |
98 HB_INTERNAL void load_upem (void) const; | 105 HB_INTERNAL void load_upem (void) const; |
99 HB_INTERNAL void load_num_glyphs (void) const; | 106 HB_INTERNAL void load_num_glyphs (void) const; |
100 }; | 107 }; |
101 | 108 |
| 109 HB_MARK_AS_FLAG_T (hb_face_t::dirty_t); |
| 110 |
102 extern HB_INTERNAL const hb_face_t _hb_face_nil; | 111 extern HB_INTERNAL const hb_face_t _hb_face_nil; |
103 | 112 |
104 #define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS | 113 #define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS |
105 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, face); | 114 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, face); |
106 #include "hb-shaper-list.hh" | 115 #include "hb-shaper-list.hh" |
107 #undef HB_SHAPER_IMPLEMENT | 116 #undef HB_SHAPER_IMPLEMENT |
108 #undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS | 117 #undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS |
109 | 118 |
110 | 119 |
111 #endif /* HB_FACE_PRIVATE_HH */ | 120 #endif /* HB_FACE_PRIVATE_HH */ |
OLD | NEW |