/src/harfbuzz/src/hb-ot-var-avar-table.hh
Line | Count | Source |
1 | | /* |
2 | | * Copyright © 2017 Google, Inc. |
3 | | * |
4 | | * This is part of HarfBuzz, a text shaping library. |
5 | | * |
6 | | * Permission is hereby granted, without written agreement and without |
7 | | * license or royalty fees, to use, copy, modify, and distribute this |
8 | | * software and its documentation for any purpose, provided that the |
9 | | * above copyright notice and the following two paragraphs appear in |
10 | | * all copies of this software. |
11 | | * |
12 | | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR |
13 | | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES |
14 | | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN |
15 | | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
16 | | * DAMAGE. |
17 | | * |
18 | | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
19 | | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
20 | | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
21 | | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO |
22 | | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
23 | | * |
24 | | * Google Author(s): Behdad Esfahbod |
25 | | */ |
26 | | |
27 | | #ifndef HB_OT_VAR_AVAR_TABLE_HH |
28 | | #define HB_OT_VAR_AVAR_TABLE_HH |
29 | | |
30 | | #include "hb-open-type.hh" |
31 | | #include "hb-ot-var-common.hh" |
32 | | |
33 | | |
34 | | /* |
35 | | * avar -- Axis Variations |
36 | | * https://docs.microsoft.com/en-us/typography/opentype/spec/avar |
37 | | */ |
38 | | |
39 | | #define HB_OT_TAG_avar HB_TAG('a','v','a','r') |
40 | | |
41 | | |
42 | | namespace OT { |
43 | | |
44 | | |
45 | | /* "Spec": https://github.com/be-fonts/boring-expansion-spec/issues/14 */ |
46 | | struct avarV2Tail |
47 | | { |
48 | | friend struct avar; |
49 | | |
50 | | bool sanitize (hb_sanitize_context_t *c, |
51 | | const void *base) const |
52 | 291 | { |
53 | 291 | TRACE_SANITIZE (this); |
54 | 291 | return_trace (varIdxMap.sanitize (c, base) && |
55 | 291 | varStore.sanitize (c, base)); |
56 | 291 | } |
57 | | |
58 | | protected: |
59 | | Offset32To<DeltaSetIndexMap> varIdxMap; /* Offset from the beginning of 'avar' table. */ |
60 | | Offset32To<ItemVariationStore> varStore; /* Offset from the beginning of 'avar' table. */ |
61 | | |
62 | | public: |
63 | | DEFINE_SIZE_STATIC (8); |
64 | | }; |
65 | | |
66 | | |
67 | | struct AxisValueMap |
68 | | { |
69 | | bool sanitize (hb_sanitize_context_t *c) const |
70 | 0 | { |
71 | 0 | TRACE_SANITIZE (this); |
72 | 0 | return_trace (c->check_struct (this)); |
73 | 0 | } |
74 | | |
75 | | void set_mapping (float from_coord, float to_coord) |
76 | 0 | { |
77 | 0 | coords[0].set_float (from_coord); |
78 | 0 | coords[1].set_float (to_coord); |
79 | 0 | } |
80 | | |
81 | | bool is_outside_axis_range (const Triple& axis_range) const |
82 | 0 | { |
83 | 0 | double from_coord = (double) coords[0].to_float (); |
84 | 0 | return !axis_range.contains (from_coord); |
85 | 0 | } |
86 | | |
87 | | bool must_include () const |
88 | 0 | { |
89 | 0 | float from_coord = coords[0].to_float (); |
90 | 0 | float to_coord = coords[1].to_float (); |
91 | 0 | return (from_coord == -1.f && to_coord == -1.f) || |
92 | 0 | (from_coord == 0.f && to_coord == 0.f) || |
93 | 0 | (from_coord == 1.f && to_coord == 1.f); |
94 | 0 | } |
95 | | |
96 | | void instantiate (const Triple& axis_range, |
97 | | const Triple& unmapped_range, |
98 | | const TripleDistances& triple_distances) |
99 | 0 | { |
100 | 0 | float from_coord = coords[0].to_float (); |
101 | 0 | float to_coord = coords[1].to_float (); |
102 | 0 |
|
103 | 0 | from_coord = renormalizeValue ((double) from_coord, unmapped_range, triple_distances); |
104 | 0 | to_coord = renormalizeValue ((double) to_coord, axis_range, triple_distances); |
105 | 0 |
|
106 | 0 | coords[0].set_float (from_coord); |
107 | 0 | coords[1].set_float (to_coord); |
108 | 0 | } |
109 | | |
110 | | HB_INTERNAL static int cmp (const void *pa, const void *pb) |
111 | 0 | { |
112 | 0 | const AxisValueMap *a = (const AxisValueMap *) pa; |
113 | 0 | const AxisValueMap *b = (const AxisValueMap *) pb; |
114 | 0 |
|
115 | 0 | int a_from = a->coords[0].to_int (); |
116 | 0 | int b_from = b->coords[0].to_int (); |
117 | 0 | if (a_from != b_from) |
118 | 0 | return a_from - b_from; |
119 | 0 |
|
120 | 0 | /* this should never be reached. according to the spec, all of the axis |
121 | 0 | * value map records for a given axis must have different fromCoord values |
122 | 0 | * */ |
123 | 0 | int a_to = a->coords[1].to_int (); |
124 | 0 | int b_to = b->coords[1].to_int (); |
125 | 0 | return a_to - b_to; |
126 | 0 | } |
127 | | |
128 | | bool serialize (hb_serialize_context_t *c) const |
129 | 0 | { |
130 | 0 | TRACE_SERIALIZE (this); |
131 | 0 | return_trace (c->embed (this)); |
132 | 0 | } Unexecuted instantiation: OT::AxisValueMap::serialize(hb_serialize_context_t*) const Unexecuted instantiation: OT::AxisValueMap::serialize(hb_serialize_context_t*) const |
133 | | |
134 | | public: |
135 | | F2DOT14 coords[2]; |
136 | | // F2DOT14 fromCoord; /* A normalized coordinate value obtained using |
137 | | // * default normalization. */ |
138 | | // F2DOT14 toCoord; /* The modified, normalized coordinate value. */ |
139 | | |
140 | | public: |
141 | | DEFINE_SIZE_STATIC (4); |
142 | | }; |
143 | | |
144 | | struct SegmentMaps : Array16Of<AxisValueMap> |
145 | | { |
146 | | float map_float (float value, unsigned int from_offset = 0, unsigned int to_offset = 1) const |
147 | 3.95k | { |
148 | 157k | #define fromCoord coords[from_offset].to_float () |
149 | 3.95k | #define toCoord coords[to_offset].to_float () |
150 | | |
151 | 3.95k | const auto *map = arrayZ; |
152 | | |
153 | | /* The following special-cases are not part of OpenType, which requires |
154 | | * that at least -1, 0, and +1 must be mapped. But we include these as |
155 | | * part of a better error recovery scheme. */ |
156 | 3.95k | if (len < 2) |
157 | 2.12k | { |
158 | 2.12k | if (!len) |
159 | 1.73k | return value; |
160 | 387 | else /* len == 1*/ |
161 | 387 | return value - map[0].fromCoord + map[0].toCoord; |
162 | 2.12k | } |
163 | | |
164 | | // At least two mappings now. |
165 | | |
166 | | /* CoreText is wild... |
167 | | * PingFangUI avar needs all this special-casing... |
168 | | * So we implement an extended version of the spec here, |
169 | | * which is more robust and more likely to be compatible with |
170 | | * the wild. */ |
171 | | |
172 | 1.83k | unsigned start = 0; |
173 | 1.83k | unsigned end = len; |
174 | 1.83k | if (map[start].fromCoord == -1 && map[start].toCoord == -1 && map[start+1].fromCoord == -1) |
175 | 2 | start++; |
176 | 1.83k | if (map[end-1].fromCoord == +1 && map[end-1].toCoord == +1 && map[end-2].fromCoord == +1) |
177 | 5 | end--; |
178 | | |
179 | | /* Look for exact match first, and do lots of special-casing. */ |
180 | 1.83k | unsigned i; |
181 | 145k | for (i = start; i < end; i++) |
182 | 144k | if (value == map[i].fromCoord) |
183 | 1.23k | break; |
184 | 1.83k | if (i < end) |
185 | 1.23k | { |
186 | | // There's at least one exact match. See if there are more. |
187 | 1.23k | unsigned j = i; |
188 | 5.87k | for (; j + 1 < end; j++) |
189 | 5.67k | if (value != map[j + 1].fromCoord) |
190 | 1.02k | break; |
191 | | |
192 | | // [i,j] inclusive are all exact matches: |
193 | | |
194 | | // If there's only one, return it. This is the only spec-compliant case. |
195 | 1.23k | if (i == j) |
196 | 874 | return map[i].toCoord; |
197 | | // If there's exactly three, return the middle one. |
198 | 357 | if (i + 2 == j) |
199 | 65 | return map[i + 1].toCoord; |
200 | | |
201 | | // Ignore the middle ones. Return the one mapping closer to 0. |
202 | 292 | if (value < 0) return map[j].toCoord; |
203 | 292 | if (value > 0) return map[i].toCoord; |
204 | | |
205 | | // Mapping 0? CoreText seems confused. It seems to prefer 0 here... |
206 | | // So we'll just return the smallest one. lol |
207 | 292 | return fabsf (map[i].toCoord) < fabsf (map[j].toCoord) ? map[i].toCoord : map[j].toCoord; |
208 | | |
209 | | // Mapping 0? Return one not mapping to 0. |
210 | 0 | if (map[i].toCoord == 0) |
211 | 0 | return map[j].toCoord; |
212 | 0 | else |
213 | 0 | return map[i].toCoord; |
214 | 0 | } |
215 | | |
216 | | /* There's at least two and we're not an exact match. Prepare to lerp. */ |
217 | | |
218 | | // Find the segment we're in. |
219 | 1.36k | for (i = start; i < end; i++) |
220 | 1.31k | if (value < map[i].fromCoord) |
221 | 550 | break; |
222 | | |
223 | 601 | if (i == 0) |
224 | 417 | { |
225 | | // Value before all segments; Shift. |
226 | 417 | return value - map[0].fromCoord + map[0].toCoord; |
227 | 417 | } |
228 | 184 | if (i == end) |
229 | 51 | { |
230 | | // Value after all segments; Shift. |
231 | 51 | return value - map[end - 1].fromCoord + map[end - 1].toCoord; |
232 | 51 | } |
233 | | |
234 | | // Actually interpolate. |
235 | 133 | auto &before = map[i-1]; |
236 | 133 | auto &after = map[i]; |
237 | 133 | float denom = after.fromCoord - before.fromCoord; // Can't be zero by now. |
238 | 133 | return before.toCoord + ((after.toCoord - before.toCoord) * (value - before.fromCoord)) / denom; |
239 | | |
240 | 184 | #undef toCoord |
241 | 184 | #undef fromCoord |
242 | 184 | } |
243 | | |
244 | 0 | float unmap_float (float value) const { return map_float (value, 1, 0); } |
245 | | |
246 | | |
247 | | // TODO Kill this. |
248 | | Triple unmap_axis_range (const Triple& axis_range) const |
249 | 0 | { |
250 | 0 | float unmapped_min = unmap_float (axis_range.minimum); |
251 | 0 | float unmapped_middle = unmap_float (axis_range.middle); |
252 | 0 | float unmapped_max = unmap_float (axis_range.maximum); |
253 | 0 |
|
254 | 0 | return Triple{(double) unmapped_min, (double) unmapped_middle, (double) unmapped_max}; |
255 | 0 | } |
256 | | |
257 | | bool subset (hb_subset_context_t *c, hb_tag_t axis_tag) const |
258 | 24 | { |
259 | 24 | TRACE_SUBSET (this); |
260 | | |
261 | | /* This function cannot work on avar2 table (and currently doesn't). |
262 | | * We should instead keep the design coords in the shape plan and use |
263 | | * those. unmap_axis_range needs to be killed. */ |
264 | | |
265 | | /* avar mapped normalized axis range*/ |
266 | 24 | Triple *axis_range; |
267 | 24 | if (!c->plan->axes_location.has (axis_tag, &axis_range)) |
268 | 24 | return c->serializer->embed (*this); |
269 | | |
270 | 0 | TripleDistances *axis_triple_distances; |
271 | 0 | if (!c->plan->axes_triple_distances.has (axis_tag, &axis_triple_distances)) |
272 | 0 | return_trace (false); |
273 | | |
274 | 0 | auto *out = c->serializer->start_embed (this); |
275 | 0 | if (unlikely (!c->serializer->extend_min (out))) return_trace (false); |
276 | | |
277 | 0 | Triple unmapped_range = unmap_axis_range (*axis_range); |
278 | | |
279 | | /* create a vector of retained mappings and sort */ |
280 | 0 | hb_vector_t<AxisValueMap> value_mappings; |
281 | 0 | for (const auto& _ : as_array ()) |
282 | 0 | { |
283 | 0 | if (_.is_outside_axis_range (unmapped_range)) |
284 | 0 | continue; |
285 | 0 | AxisValueMap mapping; |
286 | 0 | mapping = _; |
287 | 0 | mapping.instantiate (*axis_range, unmapped_range, *axis_triple_distances); |
288 | | /* (-1, -1), (0, 0), (1, 1) mappings will be added later, so avoid |
289 | | * duplicates here */ |
290 | 0 | if (mapping.must_include ()) |
291 | 0 | continue; |
292 | 0 | value_mappings.push (mapping); |
293 | 0 | } |
294 | |
|
295 | 0 | AxisValueMap m; |
296 | 0 | m.set_mapping (-1.f, -1.f); |
297 | 0 | value_mappings.push (m); |
298 | |
|
299 | 0 | m.set_mapping (0.f, 0.f); |
300 | 0 | value_mappings.push (m); |
301 | |
|
302 | 0 | m.set_mapping (1.f, 1.f); |
303 | 0 | value_mappings.push (m); |
304 | |
|
305 | 0 | value_mappings.qsort (); |
306 | |
|
307 | 0 | for (const auto& _ : value_mappings) |
308 | 0 | { |
309 | 0 | if (!_.serialize (c->serializer)) |
310 | 0 | return_trace (false); |
311 | 0 | } |
312 | 0 | return_trace (c->serializer->check_assign (out->len, value_mappings.length, HB_SERIALIZE_ERROR_INT_OVERFLOW)); |
313 | 0 | } Unexecuted instantiation: OT::SegmentMaps::subset(hb_subset_context_t*, unsigned int) const OT::SegmentMaps::subset(hb_subset_context_t*, unsigned int) const Line | Count | Source | 258 | 24 | { | 259 | 24 | TRACE_SUBSET (this); | 260 | | | 261 | | /* This function cannot work on avar2 table (and currently doesn't). | 262 | | * We should instead keep the design coords in the shape plan and use | 263 | | * those. unmap_axis_range needs to be killed. */ | 264 | | | 265 | | /* avar mapped normalized axis range*/ | 266 | 24 | Triple *axis_range; | 267 | 24 | if (!c->plan->axes_location.has (axis_tag, &axis_range)) | 268 | 24 | return c->serializer->embed (*this); | 269 | | | 270 | 0 | TripleDistances *axis_triple_distances; | 271 | 0 | if (!c->plan->axes_triple_distances.has (axis_tag, &axis_triple_distances)) | 272 | 0 | return_trace (false); | 273 | | | 274 | 0 | auto *out = c->serializer->start_embed (this); | 275 | 0 | if (unlikely (!c->serializer->extend_min (out))) return_trace (false); | 276 | | | 277 | 0 | Triple unmapped_range = unmap_axis_range (*axis_range); | 278 | | | 279 | | /* create a vector of retained mappings and sort */ | 280 | 0 | hb_vector_t<AxisValueMap> value_mappings; | 281 | 0 | for (const auto& _ : as_array ()) | 282 | 0 | { | 283 | 0 | if (_.is_outside_axis_range (unmapped_range)) | 284 | 0 | continue; | 285 | 0 | AxisValueMap mapping; | 286 | 0 | mapping = _; | 287 | 0 | mapping.instantiate (*axis_range, unmapped_range, *axis_triple_distances); | 288 | | /* (-1, -1), (0, 0), (1, 1) mappings will be added later, so avoid | 289 | | * duplicates here */ | 290 | 0 | if (mapping.must_include ()) | 291 | 0 | continue; | 292 | 0 | value_mappings.push (mapping); | 293 | 0 | } | 294 | |
| 295 | 0 | AxisValueMap m; | 296 | 0 | m.set_mapping (-1.f, -1.f); | 297 | 0 | value_mappings.push (m); | 298 | |
| 299 | 0 | m.set_mapping (0.f, 0.f); | 300 | 0 | value_mappings.push (m); | 301 | |
| 302 | 0 | m.set_mapping (1.f, 1.f); | 303 | 0 | value_mappings.push (m); | 304 | |
| 305 | 0 | value_mappings.qsort (); | 306 | |
| 307 | 0 | for (const auto& _ : value_mappings) | 308 | 0 | { | 309 | 0 | if (!_.serialize (c->serializer)) | 310 | 0 | return_trace (false); | 311 | 0 | } | 312 | 0 | return_trace (c->serializer->check_assign (out->len, value_mappings.length, HB_SERIALIZE_ERROR_INT_OVERFLOW)); | 313 | 0 | } |
|
314 | | |
315 | | public: |
316 | | DEFINE_SIZE_ARRAY (2, *this); |
317 | | }; |
318 | | |
319 | | struct avar |
320 | | { |
321 | | static constexpr hb_tag_t tableTag = HB_OT_TAG_avar; |
322 | | |
323 | 1.03k | bool has_data () const { return version.to_int (); } |
324 | | |
325 | | const SegmentMaps* get_segment_maps () const |
326 | 29 | { return &firstAxisSegmentMaps; } |
327 | | |
328 | | unsigned get_axis_count () const |
329 | 29 | { return axisCount; } |
330 | | |
331 | | bool sanitize (hb_sanitize_context_t *c) const |
332 | 1.63k | { |
333 | 1.63k | TRACE_SANITIZE (this); |
334 | 1.63k | if (!(version.sanitize (c) && |
335 | 1.63k | hb_barrier () && |
336 | 1.63k | (version.major == 1 |
337 | 934 | #ifndef HB_NO_AVAR2 |
338 | 934 | || version.major == 2 |
339 | 1.63k | #endif |
340 | 1.63k | ) && |
341 | 1.01k | c->check_struct (this))) |
342 | 620 | return_trace (false); |
343 | | |
344 | 1.01k | const SegmentMaps *map = &firstAxisSegmentMaps; |
345 | 1.01k | unsigned int count = axisCount; |
346 | 6.68k | for (unsigned int i = 0; i < count; i++) |
347 | 5.84k | { |
348 | 5.84k | if (unlikely (!map->sanitize (c))) |
349 | 173 | return_trace (false); |
350 | 5.66k | map = &StructAfter<SegmentMaps> (*map); |
351 | 5.66k | } |
352 | | |
353 | 843 | #ifndef HB_NO_AVAR2 |
354 | 843 | if (version.major < 2) |
355 | 552 | return_trace (true); |
356 | 291 | hb_barrier (); |
357 | | |
358 | 291 | const auto &v2 = * (const avarV2Tail *) map; |
359 | 291 | if (unlikely (!v2.sanitize (c, this))) |
360 | 191 | return_trace (false); |
361 | 100 | #endif |
362 | | |
363 | 291 | return_trace (true); |
364 | 291 | } |
365 | | |
366 | | void map_coords_16_16 (int *coords, unsigned int coords_length) const |
367 | 98.6k | { |
368 | 98.6k | unsigned int count = hb_min (coords_length, axisCount); |
369 | | |
370 | 98.6k | const SegmentMaps *map = &firstAxisSegmentMaps; |
371 | 102k | for (unsigned int i = 0; i < count; i++) |
372 | 3.87k | { |
373 | 3.87k | coords[i] = roundf (map->map_float (coords[i] / 65536.f) * 65536.f); |
374 | 3.87k | map = &StructAfter<SegmentMaps> (*map); |
375 | 3.87k | } |
376 | | |
377 | 98.6k | #ifndef HB_NO_AVAR2 |
378 | 98.6k | if (version.major < 2) |
379 | 98.4k | return; |
380 | 190 | hb_barrier (); |
381 | | |
382 | 1.39k | for (; count < axisCount; count++) |
383 | 1.20k | map = &StructAfter<SegmentMaps> (*map); |
384 | | |
385 | 190 | const auto &v2 = * (const avarV2Tail *) map; |
386 | | |
387 | 190 | const auto &varidx_map = this+v2.varIdxMap; |
388 | 190 | const auto &var_store = this+v2.varStore; |
389 | 190 | auto *var_store_cache = var_store.create_cache (); |
390 | | |
391 | 190 | hb_vector_t<int> coords_2_14; |
392 | 190 | coords_2_14.resize (coords_length); |
393 | 7.03k | for (unsigned i = 0; i < coords_length; i++) |
394 | 6.84k | coords_2_14[i] = roundf (coords[i] / 4.f); // 16.16 -> 2.14 |
395 | | |
396 | 190 | hb_vector_t<int> out; |
397 | 190 | out.alloc (coords_length); |
398 | 7.03k | for (unsigned i = 0; i < coords_length; i++) |
399 | 6.84k | { |
400 | 6.84k | int v = coords[i]; |
401 | 6.84k | uint32_t varidx = varidx_map.map (i); |
402 | 6.84k | float delta = var_store.get_delta (varidx, coords_2_14.arrayZ, coords_2_14.length, var_store_cache); |
403 | 6.84k | v += roundf (delta * 4); // 2.14 -> 16.16 |
404 | 6.84k | v = hb_clamp (v, -(1<<16), +(1<<16)); |
405 | 6.84k | out.push (v); |
406 | 6.84k | } |
407 | 7.03k | for (unsigned i = 0; i < coords_length; i++) |
408 | 6.84k | coords[i] = out[i]; |
409 | | |
410 | 190 | OT::ItemVariationStore::destroy_cache (var_store_cache); |
411 | 190 | #endif |
412 | 190 | } |
413 | | |
414 | | bool subset (hb_subset_context_t *c) const |
415 | 25 | { |
416 | 25 | TRACE_SUBSET (this); |
417 | 25 | unsigned retained_axis_count = c->plan->axes_index_map.get_population (); |
418 | 25 | if (!retained_axis_count) //all axes are pinned/dropped |
419 | 0 | return_trace (false); |
420 | | |
421 | 25 | avar *out = c->serializer->allocate_min<avar> (); |
422 | 25 | if (unlikely (!out)) return_trace (false); |
423 | | |
424 | 25 | out->version.major = 1; |
425 | 25 | out->version.minor = 0; |
426 | 25 | if (!c->serializer->check_assign (out->axisCount, retained_axis_count, HB_SERIALIZE_ERROR_INT_OVERFLOW)) |
427 | 0 | return_trace (false); |
428 | | |
429 | 25 | const hb_map_t& axes_index_map = c->plan->axes_index_map; |
430 | 25 | const SegmentMaps *map = &firstAxisSegmentMaps; |
431 | 25 | unsigned count = axisCount; |
432 | 74 | for (unsigned int i = 0; i < count; i++) |
433 | 49 | { |
434 | 49 | if (axes_index_map.has (i)) |
435 | 24 | { |
436 | 24 | hb_tag_t *axis_tag; |
437 | 24 | if (!c->plan->axes_old_index_tag_map.has (i, &axis_tag)) |
438 | 0 | return_trace (false); |
439 | 24 | if (!map->subset (c, *axis_tag)) |
440 | 0 | return_trace (false); |
441 | 24 | } |
442 | 49 | map = &StructAfter<SegmentMaps> (*map); |
443 | 49 | } |
444 | 25 | return_trace (true); |
445 | 25 | } |
446 | | |
447 | | protected: |
448 | | FixedVersion<>version; /* Version of the avar table |
449 | | * initially set to 0x00010000u */ |
450 | | HBUINT16 reserved; /* This field is permanently reserved. Set to 0. */ |
451 | | HBUINT16 axisCount; /* The number of variation axes in the font. This |
452 | | * must be the same number as axisCount in the |
453 | | * 'fvar' table. */ |
454 | | SegmentMaps firstAxisSegmentMaps; |
455 | | |
456 | | public: |
457 | | DEFINE_SIZE_MIN (8); |
458 | | }; |
459 | | |
460 | | } /* namespace OT */ |
461 | | |
462 | | |
463 | | #endif /* HB_OT_VAR_AVAR_TABLE_HH */ |