hb-ot-layout-gdef-table.hh 13.9 KB
Newer Older
B
Behdad Esfahbod 已提交
1
/*
B
Behdad Esfahbod 已提交
2
 * Copyright © 2007,2008,2009  Red Hat, Inc.
3
 * Copyright © 2010,2011,2012  Google, Inc.
B
Behdad Esfahbod 已提交
4
 *
B
Behdad Esfahbod 已提交
5
 *  This is part of HarfBuzz, a text shaping library.
B
Behdad Esfahbod 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and its documentation for any purpose, provided that the
 * above copyright notice and the following two paragraphs appear in
 * all copies of this software.
 *
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 *
 * Red Hat Author(s): Behdad Esfahbod
26
 * Google Author(s): Behdad Esfahbod
B
Behdad Esfahbod 已提交
27 28
 */

29 30
#ifndef HB_OT_LAYOUT_GDEF_TABLE_HH
#define HB_OT_LAYOUT_GDEF_TABLE_HH
B
Behdad Esfahbod 已提交
31

32
#include "hb-ot-layout-common-private.hh"
B
Behdad Esfahbod 已提交
33

34
#include "hb-font-private.hh"
35

B
Behdad Esfahbod 已提交
36

37 38
namespace OT {

39

40 41 42
/*
 * Attachment List Table
 */
B
Behdad Esfahbod 已提交
43

44
typedef ArrayOf<UINT16> AttachPoint;	/* Array of contour point indices--in
45
					 * increasing numerical order */
B
Behdad Esfahbod 已提交
46

B
Behdad Esfahbod 已提交
47 48
struct AttachList
{
B
Behdad Esfahbod 已提交
49 50 51 52
  inline unsigned int get_attach_points (hb_codepoint_t glyph_id,
					 unsigned int start_offset,
					 unsigned int *point_count /* IN/OUT */,
					 unsigned int *point_array /* OUT */) const
B
Behdad Esfahbod 已提交
53
  {
54
    unsigned int index = (this+coverage).get_coverage (glyph_id);
B
Behdad Esfahbod 已提交
55 56
    if (index == NOT_COVERED)
    {
B
Behdad Esfahbod 已提交
57 58 59
      if (point_count)
	*point_count = 0;
      return 0;
B
Behdad Esfahbod 已提交
60
    }
B
Behdad Esfahbod 已提交
61

B
Behdad Esfahbod 已提交
62 63
    const AttachPoint &points = this+attachPoint[index];

B
Behdad Esfahbod 已提交
64
    if (point_count) {
65
      const UINT16 *array = points.sub_array (start_offset, point_count);
B
Behdad Esfahbod 已提交
66
      unsigned int count = *point_count;
B
Behdad Esfahbod 已提交
67 68 69
      for (unsigned int i = 0; i < count; i++)
	point_array[i] = array[i];
    }
B
Behdad Esfahbod 已提交
70

B
Behdad Esfahbod 已提交
71
    return points.len;
B
Behdad Esfahbod 已提交
72
  }
B
Behdad Esfahbod 已提交
73

B
Behdad Esfahbod 已提交
74 75
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
76
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
77
    return_trace (coverage.sanitize (c, this) && attachPoint.sanitize (c, this));
B
Behdad Esfahbod 已提交
78 79
  }

80
  protected:
81 82
  OffsetTo<Coverage>
		coverage;		/* Offset to Coverage table -- from
B
Behdad Esfahbod 已提交
83
					 * beginning of AttachList table */
B
Behdad Esfahbod 已提交
84 85 86
  OffsetArrayOf<AttachPoint>
		attachPoint;		/* Array of AttachPoint tables
					 * in Coverage Index order */
87
  public:
88
  DEFINE_SIZE_ARRAY (4, attachPoint);
B
Behdad Esfahbod 已提交
89 90 91 92 93 94
};

/*
 * Ligature Caret Table
 */

B
Behdad Esfahbod 已提交
95 96
struct CaretValueFormat1
{
B
Minor  
Behdad Esfahbod 已提交
97 98 99
  friend struct CaretValue;

  private:
100
  inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction) const
B
Behdad Esfahbod 已提交
101
  {
B
Minor  
Behdad Esfahbod 已提交
102
    return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_x (coordinate) : font->em_scale_y (coordinate);
B
Behdad Esfahbod 已提交
103
  }
B
Behdad Esfahbod 已提交
104

B
Behdad Esfahbod 已提交
105 106
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
107
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
108
    return_trace (c->check_struct (this));
B
Behdad Esfahbod 已提交
109 110
  }

111
  protected:
112 113
  UINT16	caretValueFormat;	/* Format identifier--format = 1 */
  INT16		coordinate;		/* X or Y value, in design units */
114 115
  public:
  DEFINE_SIZE_STATIC (4);
B
Behdad Esfahbod 已提交
116 117
};

B
Behdad Esfahbod 已提交
118 119
struct CaretValueFormat2
{
B
Minor  
Behdad Esfahbod 已提交
120 121 122
  friend struct CaretValue;

  private:
123
  inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
B
Behdad Esfahbod 已提交
124
  {
B
Behdad Esfahbod 已提交
125
    hb_position_t x, y;
B
Behdad Esfahbod 已提交
126
    if (font->get_glyph_contour_point_for_origin (glyph_id, caretValuePoint, direction, &x, &y))
127
      return HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y;
B
Behdad Esfahbod 已提交
128 129
    else
      return 0;
B
Behdad Esfahbod 已提交
130
  }
B
Behdad Esfahbod 已提交
131

B
Behdad Esfahbod 已提交
132 133
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
134
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
135
    return_trace (c->check_struct (this));
B
Behdad Esfahbod 已提交
136 137
  }

138
  protected:
139 140
  UINT16	caretValueFormat;	/* Format identifier--format = 2 */
  UINT16	caretValuePoint;	/* Contour point index on glyph */
141 142
  public:
  DEFINE_SIZE_STATIC (4);
B
Behdad Esfahbod 已提交
143 144
};

B
Behdad Esfahbod 已提交
145 146
struct CaretValueFormat3
{
B
Minor  
Behdad Esfahbod 已提交
147 148
  friend struct CaretValue;

149
  inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, const VariationStore &var_store) const
B
Behdad Esfahbod 已提交
150
  {
151
    return HB_DIRECTION_IS_HORIZONTAL (direction) ?
152 153
           font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font, var_store) :
           font->em_scale_y (coordinate) + (this+deviceTable).get_y_delta (font, var_store);
B
Behdad Esfahbod 已提交
154 155
  }

B
Behdad Esfahbod 已提交
156 157
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
158
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
159
    return_trace (c->check_struct (this) && deviceTable.sanitize (c, this));
B
Behdad Esfahbod 已提交
160 161
  }

162
  protected:
163 164
  UINT16	caretValueFormat;	/* Format identifier--format = 3 */
  INT16		coordinate;		/* X or Y value, in design units */
B
Behdad Esfahbod 已提交
165 166
  OffsetTo<Device>
		deviceTable;		/* Offset to Device table for X or Y
B
Behdad Esfahbod 已提交
167 168
					 * value--from beginning of CaretValue
					 * table */
169 170
  public:
  DEFINE_SIZE_STATIC (6);
B
Behdad Esfahbod 已提交
171 172
};

B
Behdad Esfahbod 已提交
173 174
struct CaretValue
{
175 176 177
  inline hb_position_t get_caret_value (hb_font_t *font,
					hb_direction_t direction,
					hb_codepoint_t glyph_id,
178
					const VariationStore &var_store) const
B
Behdad Esfahbod 已提交
179
  {
B
Behdad Esfahbod 已提交
180
    switch (u.format) {
181
    case 1: return u.format1.get_caret_value (font, direction);
182
    case 2: return u.format2.get_caret_value (font, direction, glyph_id);
183
    case 3: return u.format3.get_caret_value (font, direction, var_store);
B
Behdad Esfahbod 已提交
184 185 186 187
    default:return 0;
    }
  }

B
Behdad Esfahbod 已提交
188 189
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
190
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
191
    if (!u.format.sanitize (c)) return_trace (false);
B
Behdad Esfahbod 已提交
192
    switch (u.format) {
B
Behdad Esfahbod 已提交
193 194 195 196
    case 1: return_trace (u.format1.sanitize (c));
    case 2: return_trace (u.format2.sanitize (c));
    case 3: return_trace (u.format3.sanitize (c));
    default:return_trace (true);
B
Behdad Esfahbod 已提交
197 198 199
    }
  }

200
  protected:
B
Behdad Esfahbod 已提交
201
  union {
202
  UINT16		format;		/* Format identifier */
B
Behdad Esfahbod 已提交
203 204 205
  CaretValueFormat1	format1;
  CaretValueFormat2	format2;
  CaretValueFormat3	format3;
B
Behdad Esfahbod 已提交
206
  } u;
B
Behdad Esfahbod 已提交
207
  public:
B
Behdad Esfahbod 已提交
208
  DEFINE_SIZE_UNION (2, format);
B
Behdad Esfahbod 已提交
209
};
210

B
Behdad Esfahbod 已提交
211 212
struct LigGlyph
{
213
  inline unsigned int get_lig_carets (hb_font_t *font,
214
				      hb_direction_t direction,
B
Behdad Esfahbod 已提交
215
				      hb_codepoint_t glyph_id,
216
				      const VariationStore &var_store,
B
Behdad Esfahbod 已提交
217 218
				      unsigned int start_offset,
				      unsigned int *caret_count /* IN/OUT */,
219
				      hb_position_t *caret_array /* OUT */) const
B
Behdad Esfahbod 已提交
220
  {
B
Behdad Esfahbod 已提交
221
    if (caret_count) {
222
      const OffsetTo<CaretValue> *array = carets.sub_array (start_offset, caret_count);
B
Behdad Esfahbod 已提交
223
      unsigned int count = *caret_count;
B
Behdad Esfahbod 已提交
224
      for (unsigned int i = 0; i < count; i++)
225
	caret_array[i] = (this+array[i]).get_caret_value (font, direction, glyph_id, var_store);
B
Behdad Esfahbod 已提交
226
    }
B
Behdad Esfahbod 已提交
227

B
Behdad Esfahbod 已提交
228
    return carets.len;
B
Behdad Esfahbod 已提交
229
  }
B
Minor  
Behdad Esfahbod 已提交
230

B
Behdad Esfahbod 已提交
231 232
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
233
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
234
    return_trace (carets.sanitize (c, this));
B
Behdad Esfahbod 已提交
235 236
  }

237
  protected:
B
Behdad Esfahbod 已提交
238
  OffsetArrayOf<CaretValue>
239
		carets;			/* Offset array of CaretValue tables
240 241
					 * --from beginning of LigGlyph table
					 * --in increasing coordinate order */
242
  public:
243
  DEFINE_SIZE_ARRAY (2, carets);
244
};
B
Behdad Esfahbod 已提交
245

B
Behdad Esfahbod 已提交
246 247
struct LigCaretList
{
248
  inline unsigned int get_lig_carets (hb_font_t *font,
249
				      hb_direction_t direction,
B
Behdad Esfahbod 已提交
250
				      hb_codepoint_t glyph_id,
251
				      const VariationStore &var_store,
B
Behdad Esfahbod 已提交
252 253
				      unsigned int start_offset,
				      unsigned int *caret_count /* IN/OUT */,
254
				      hb_position_t *caret_array /* OUT */) const
B
Behdad Esfahbod 已提交
255
  {
256
    unsigned int index = (this+coverage).get_coverage (glyph_id);
B
Behdad Esfahbod 已提交
257 258
    if (index == NOT_COVERED)
    {
B
Behdad Esfahbod 已提交
259 260 261
      if (caret_count)
	*caret_count = 0;
      return 0;
B
Behdad Esfahbod 已提交
262 263
    }
    const LigGlyph &lig_glyph = this+ligGlyph[index];
264
    return lig_glyph.get_lig_carets (font, direction, glyph_id, var_store, start_offset, caret_count, caret_array);
B
Behdad Esfahbod 已提交
265
  }
266

B
Behdad Esfahbod 已提交
267 268
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
269
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
270
    return_trace (coverage.sanitize (c, this) && ligGlyph.sanitize (c, this));
B
Behdad Esfahbod 已提交
271 272
  }

273
  protected:
274 275
  OffsetTo<Coverage>
		coverage;		/* Offset to Coverage table--from
276
					 * beginning of LigCaretList table */
B
Behdad Esfahbod 已提交
277 278 279
  OffsetArrayOf<LigGlyph>
		ligGlyph;		/* Array of LigGlyph tables
					 * in Coverage Index order */
280
  public:
281
  DEFINE_SIZE_ARRAY (4, ligGlyph);
282 283
};

284 285 286 287 288 289

struct MarkGlyphSetsFormat1
{
  inline bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const
  { return (this+coverage[set_index]).get_coverage (glyph_id) != NOT_COVERED; }

B
Behdad Esfahbod 已提交
290 291
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
292
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
293
    return_trace (coverage.sanitize (c, this));
B
Behdad Esfahbod 已提交
294 295
  }

296
  protected:
297
  UINT16	format;			/* Format identifier--format = 1 */
B
Behdad Esfahbod 已提交
298
  ArrayOf<LOffsetTo<Coverage> >
299 300
		coverage;		/* Array of long offsets to mark set
					 * coverage tables */
301
  public:
302
  DEFINE_SIZE_ARRAY (4, coverage);
303 304 305 306 307 308 309
};

struct MarkGlyphSets
{
  inline bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const
  {
    switch (u.format) {
B
Behdad Esfahbod 已提交
310
    case 1: return u.format1.covers (set_index, glyph_id);
311 312 313 314
    default:return false;
    }
  }

B
Behdad Esfahbod 已提交
315 316
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
317
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
318
    if (!u.format.sanitize (c)) return_trace (false);
B
Behdad Esfahbod 已提交
319
    switch (u.format) {
B
Behdad Esfahbod 已提交
320 321
    case 1: return_trace (u.format1.sanitize (c));
    default:return_trace (true);
B
Behdad Esfahbod 已提交
322 323 324
    }
  }

325
  protected:
326
  union {
327
  UINT16		format;		/* Format identifier */
B
Behdad Esfahbod 已提交
328
  MarkGlyphSetsFormat1	format1;
329
  } u;
B
Behdad Esfahbod 已提交
330
  public:
B
Behdad Esfahbod 已提交
331
  DEFINE_SIZE_UNION (2, format);
332 333 334
};


335
/*
B
Behdad Esfahbod 已提交
336
 * GDEF -- The Glyph Definition Table
337
 */
B
Behdad Esfahbod 已提交
338

B
Behdad Esfahbod 已提交
339 340
struct GDEF
{
341
  static const hb_tag_t tableTag	= HB_OT_TAG_GDEF;
342

B
Behdad Esfahbod 已提交
343
  enum GlyphClasses {
B
Behdad Esfahbod 已提交
344 345 346 347
    UnclassifiedGlyph	= 0,
    BaseGlyph		= 1,
    LigatureGlyph	= 2,
    MarkGlyph		= 3,
348
    ComponentGlyph	= 4
B
Behdad Esfahbod 已提交
349
  };
B
Behdad Esfahbod 已提交
350

B
Behdad Esfahbod 已提交
351
  inline bool has_glyph_classes (void) const { return glyphClassDef != 0; }
352
  inline unsigned int get_glyph_class (hb_codepoint_t glyph) const
B
Behdad Esfahbod 已提交
353
  { return (this+glyphClassDef).get_class (glyph); }
354
  inline void get_glyphs_in_class (unsigned int klass, hb_set_t *glyphs) const
355
  { (this+glyphClassDef).add_class (glyphs, klass); }
B
Behdad Esfahbod 已提交
356

B
Behdad Esfahbod 已提交
357
  inline bool has_mark_attachment_types (void) const { return markAttachClassDef != 0; }
358
  inline unsigned int get_mark_attachment_type (hb_codepoint_t glyph) const
B
Behdad Esfahbod 已提交
359 360
  { return (this+markAttachClassDef).get_class (glyph); }

B
Behdad Esfahbod 已提交
361
  inline bool has_attach_points (void) const { return attachList != 0; }
B
Behdad Esfahbod 已提交
362 363 364 365 366
  inline unsigned int get_attach_points (hb_codepoint_t glyph_id,
					 unsigned int start_offset,
					 unsigned int *point_count /* IN/OUT */,
					 unsigned int *point_array /* OUT */) const
  { return (this+attachList).get_attach_points (glyph_id, start_offset, point_count, point_array); }
B
Behdad Esfahbod 已提交
367

B
Behdad Esfahbod 已提交
368
  inline bool has_lig_carets (void) const { return ligCaretList != 0; }
369
  inline unsigned int get_lig_carets (hb_font_t *font,
370
				      hb_direction_t direction,
B
Behdad Esfahbod 已提交
371 372 373
				      hb_codepoint_t glyph_id,
				      unsigned int start_offset,
				      unsigned int *caret_count /* IN/OUT */,
374
				      hb_position_t *caret_array /* OUT */) const
375 376 377
  { return (this+ligCaretList).get_lig_carets (font,
					       direction, glyph_id, get_var_store(),
					       start_offset, caret_count, caret_array); }
B
Behdad Esfahbod 已提交
378

379
  inline bool has_mark_sets (void) const { return version.to_int () >= 0x00010002u && markGlyphSetsDef != 0; }
380
  inline bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const
381
  { return version.to_int () >= 0x00010002u && (this+markGlyphSetsDef).covers (set_index, glyph_id); }
382

B
Behdad Esfahbod 已提交
383
  inline bool has_var_store (void) const { return version.to_int () >= 0x00010003u && varStore != 0; }
384 385
  inline const VariationStore &get_var_store (void) const
  { return version.to_int () >= 0x00010003u ? this+varStore : Null(VariationStore); }
B
Behdad Esfahbod 已提交
386

B
Behdad Esfahbod 已提交
387 388
  inline bool sanitize (hb_sanitize_context_t *c) const
  {
B
Behdad Esfahbod 已提交
389
    TRACE_SANITIZE (this);
B
Behdad Esfahbod 已提交
390 391 392 393 394 395
    return_trace (version.sanitize (c) &&
		  likely (version.major == 1) &&
		  glyphClassDef.sanitize (c, this) &&
		  attachList.sanitize (c, this) &&
		  ligCaretList.sanitize (c, this) &&
		  markAttachClassDef.sanitize (c, this) &&
B
Behdad Esfahbod 已提交
396 397
		  (version.to_int () < 0x00010002u || markGlyphSetsDef.sanitize (c, this)) &&
		  (version.to_int () < 0x00010003u || varStore.sanitize (c, this)));
B
Behdad Esfahbod 已提交
398 399
  }

B
Behdad Esfahbod 已提交
400 401 402 403 404 405 406
  /* glyph_props is a 16-bit integer where the lower 8-bit have bits representing
   * glyph class and other bits, and high 8-bit gthe mark attachment type (if any).
   * Not to be confused with lookup_props which is very similar. */
  inline unsigned int get_glyph_props (hb_codepoint_t glyph) const
  {
    unsigned int klass = get_glyph_class (glyph);

407 408 409
    static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH == (unsigned int) LookupFlag::IgnoreBaseGlyphs), "");
    static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE == (unsigned int) LookupFlag::IgnoreLigatures), "");
    static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_MARK == (unsigned int) LookupFlag::IgnoreMarks), "");
410

B
Behdad Esfahbod 已提交
411
    switch (klass) {
412
    default:			return 0;
413 414
    case BaseGlyph:		return HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH;
    case LigatureGlyph:		return HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE;
B
Behdad Esfahbod 已提交
415 416
    case MarkGlyph:
	  klass = get_mark_attachment_type (glyph);
417
	  return HB_OT_LAYOUT_GLYPH_PROPS_MARK | (klass << 8);
B
Behdad Esfahbod 已提交
418 419 420 421
    }
  }


422
  protected:
B
Behdad Esfahbod 已提交
423
  FixedVersion<>version;		/* Version of the GDEF table--currently
B
Behdad Esfahbod 已提交
424
					 * 0x00010003u */
B
Behdad Esfahbod 已提交
425 426
  OffsetTo<ClassDef>
		glyphClassDef;		/* Offset to class definition table
B
Behdad Esfahbod 已提交
427
					 * for glyph type--from beginning of
428
					 * GDEF header (may be Null) */
B
Behdad Esfahbod 已提交
429 430
  OffsetTo<AttachList>
		attachList;		/* Offset to list of glyphs with
B
Behdad Esfahbod 已提交
431
					 * attachment points--from beginning
432
					 * of GDEF header (may be Null) */
B
Behdad Esfahbod 已提交
433 434
  OffsetTo<LigCaretList>
		ligCaretList;		/* Offset to list of positioning points
B
Behdad Esfahbod 已提交
435
					 * for ligature carets--from beginning
436
					 * of GDEF header (may be Null) */
B
Behdad Esfahbod 已提交
437 438
  OffsetTo<ClassDef>
		markAttachClassDef;	/* Offset to class definition table for
B
Behdad Esfahbod 已提交
439
					 * mark attachment type--from beginning
440
					 * of GDEF header (may be Null) */
441
  OffsetTo<MarkGlyphSets>
442
		markGlyphSetsDef;	/* Offset to the table of mark set
443 444
					 * definitions--from beginning of GDEF
					 * header (may be NULL).  Introduced
B
Behdad Esfahbod 已提交
445
					 * in version 0x00010002. */
B
Behdad Esfahbod 已提交
446
  LOffsetTo<VariationStore>
B
Behdad Esfahbod 已提交
447 448 449 450
		varStore;		/* Offset to the table of Item Variation
					 * Store--from beginning of GDEF
					 * header (may be NULL).  Introduced
					 * in version 0x00010003. */
B
Behdad Esfahbod 已提交
451
  public:
452
  DEFINE_SIZE_MIN (12);
B
Behdad Esfahbod 已提交
453 454
};

455

B
Behdad Esfahbod 已提交
456
} /* namespace OT */
457

B
Behdad Esfahbod 已提交
458

459
#endif /* HB_OT_LAYOUT_GDEF_TABLE_HH */