OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2007,2008,2009 Red Hat, Inc. | 2 * Copyright © 2007,2008,2009 Red Hat, Inc. |
3 * Copyright © 2012 Google, Inc. | 3 * Copyright © 2012 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+t
able[i]; } | 133 inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+t
able[i]; } |
134 | 134 |
135 inline bool sanitize (hb_sanitize_context_t *c) const | 135 inline bool sanitize (hb_sanitize_context_t *c) const |
136 { | 136 { |
137 TRACE_SANITIZE (this); | 137 TRACE_SANITIZE (this); |
138 return_trace (table.sanitize (c, this)); | 138 return_trace (table.sanitize (c, this)); |
139 } | 139 } |
140 | 140 |
141 protected: | 141 protected: |
142 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ | 142 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ |
143 FixedVersion» version;» /* Version of the TTC Header (1.0), | 143 FixedVersion<>version;» /* Version of the TTC Header (1.0), |
144 * 0x00010000u */ | 144 * 0x00010000u */ |
145 ArrayOf<OffsetTo<OffsetTable, ULONG>, ULONG> | 145 ArrayOf<OffsetTo<OffsetTable, ULONG>, ULONG> |
146 table; /* Array of offsets to the OffsetTable for each
font | 146 table; /* Array of offsets to the OffsetTable for each
font |
147 * from the beginning of the file */ | 147 * from the beginning of the file */ |
148 public: | 148 public: |
149 DEFINE_SIZE_ARRAY (12, table); | 149 DEFINE_SIZE_ARRAY (12, table); |
150 }; | 150 }; |
151 | 151 |
152 struct TTCHeader | 152 struct TTCHeader |
153 { | 153 { |
(...skipping 26 matching lines...) Expand all Loading... |
180 case 2: /* version 2 is compatible with version 1 */ | 180 case 2: /* version 2 is compatible with version 1 */ |
181 case 1: return_trace (u.version1.sanitize (c)); | 181 case 1: return_trace (u.version1.sanitize (c)); |
182 default:return_trace (true); | 182 default:return_trace (true); |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
186 protected: | 186 protected: |
187 union { | 187 union { |
188 struct { | 188 struct { |
189 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ | 189 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ |
190 FixedVersion» version;» /* Version of the TTC Header (1.0 or 2.0), | 190 FixedVersion<>version;» /* Version of the TTC Header (1.0 or 2.0), |
191 * 0x00010000u or 0x00020000u */ | 191 * 0x00010000u or 0x00020000u */ |
192 } header; | 192 } header; |
193 TTCHeaderVersion1 version1; | 193 TTCHeaderVersion1 version1; |
194 } u; | 194 } u; |
195 }; | 195 }; |
196 | 196 |
197 | 197 |
198 /* | 198 /* |
199 * OpenType Font File | 199 * OpenType Font File |
200 */ | 200 */ |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } u; | 259 } u; |
260 public: | 260 public: |
261 DEFINE_SIZE_UNION (4, tag); | 261 DEFINE_SIZE_UNION (4, tag); |
262 }; | 262 }; |
263 | 263 |
264 | 264 |
265 } /* namespace OT */ | 265 } /* namespace OT */ |
266 | 266 |
267 | 267 |
268 #endif /* HB_OPEN_FILE_PRIVATE_HH */ | 268 #endif /* HB_OPEN_FILE_PRIVATE_HH */ |
OLD | NEW |