1/*
2 * Copyright © 2007,2008,2009 Red Hat, Inc.
3 * Copyright © 2012,2013 Google, Inc.
4 *
5 * This is part of HarfBuzz, a text shaping library.
6 *
7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in
11 * all copies of this software.
12 *
13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17 * DAMAGE.
18 *
19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 *
25 * Red Hat Author(s): Behdad Esfahbod
26 * Google Author(s): Behdad Esfahbod
27 */
28
29#ifndef HB_OT_FACE_HH
30#define HB_OT_FACE_HH
31
32#include "hb.hh"
33
34#include "hb-machinery.hh"
35
36
37/*
38 * hb_ot_face_t
39 */
40
41/* Declare tables. */
42#define HB_OT_TABLE(Namespace, Type) namespace Namespace { struct Type; }
43#define HB_OT_ACCELERATOR(Namespace, Type) HB_OT_TABLE (Namespace, Type##_accelerator_t)
44#include "hb-ot-face-table-list.hh"
45#undef HB_OT_ACCELERATOR
46#undef HB_OT_TABLE
47
48struct hb_ot_face_t
49{
50 HB_INTERNAL void init0 (hb_face_t *face);
51 HB_INTERNAL void fini ();
52
53#define HB_OT_TABLE_ORDER(Namespace, Type) \
54 HB_PASTE (ORDER_, HB_PASTE (Namespace, HB_PASTE (_, Type)))
55 enum order_t
56 {
57 ORDER_ZERO,
58#define HB_OT_TABLE(Namespace, Type) HB_OT_TABLE_ORDER (Namespace, Type),
59#include "hb-ot-face-table-list.hh"
60#undef HB_OT_TABLE
61 };
62
63 hb_face_t *face; /* MUST be JUST before the lazy loaders. */
64#define HB_OT_TABLE(Namespace, Type) \
65 hb_table_lazy_loader_t<Namespace::Type, HB_OT_TABLE_ORDER (Namespace, Type)> Type;
66#define HB_OT_ACCELERATOR(Namespace, Type) \
67 hb_face_lazy_loader_t<Namespace::Type##_accelerator_t, HB_OT_TABLE_ORDER (Namespace, Type)> Type;
68#include "hb-ot-face-table-list.hh"
69#undef HB_OT_ACCELERATOR
70#undef HB_OT_TABLE
71};
72
73
74#endif /* HB_OT_FACE_HH */
75