1/*
2 * Copyright © 2019 Facebook, 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 * Facebook Author(s): Behdad Esfahbod
25 */
26
27#ifndef HB_CONFIG_HH
28#define HB_CONFIG_HH
29
30#if 0 /* Make test happy. */
31#include "hb.hh"
32#endif
33
34#ifdef HAVE_CONFIG_H
35#include "config.h"
36#endif
37
38#ifndef HB_EXPERIMENTAL_API
39#define HB_NO_BEYOND_64K
40#define HB_NO_CUBIC_GLYF
41#define HB_NO_VAR_COMPOSITES
42#endif
43
44#ifdef HB_TINY
45#define HB_LEAN
46#define HB_MINI
47#define HB_OPTIMIZE_SIZE
48#define HB_OPTIMIZE_SIZE_MORE
49#define HB_MINIMIZE_MEMORY_USAGE
50#define HB_NO_MT
51#define HB_NO_UCD_UNASSIGNED
52#ifndef NDEBUG
53#define NDEBUG
54#endif
55#endif
56
57#ifdef HB_LEAN
58#define HB_DISABLE_DEPRECATED
59#define HB_NDEBUG
60#define HB_NO_ATEXIT
61#define HB_NO_BUFFER_MESSAGE
62#define HB_NO_BUFFER_SERIALIZE
63#define HB_NO_BUFFER_VERIFY
64#define HB_NO_BITMAP
65#define HB_NO_CFF
66#define HB_NO_COLOR
67#define HB_NO_DRAW
68#define HB_NO_ERRNO
69#define HB_NO_FACE_COLLECT_UNICODES
70#define HB_NO_GETENV
71#define HB_NO_HINTING
72#define HB_NO_LANGUAGE_LONG
73#define HB_NO_LANGUAGE_PRIVATE_SUBTAG
74#define HB_NO_LAYOUT_FEATURE_PARAMS
75#define HB_NO_LAYOUT_COLLECT_GLYPHS
76#define HB_NO_LAYOUT_RARELY_USED
77#define HB_NO_LAYOUT_UNUSED
78#define HB_NO_MATH
79#define HB_NO_META
80#define HB_NO_METRICS
81#define HB_NO_MMAP
82#define HB_NO_NAME
83#define HB_NO_OPEN
84#define HB_NO_OT_FONT_GLYPH_NAMES
85#define HB_NO_OT_SHAPE_FRACTIONS
86#define HB_NO_PAINT
87#define HB_NO_SETLOCALE
88#define HB_NO_STYLE
89#define HB_NO_SUBSET_LAYOUT
90#define HB_NO_VERTICAL
91#define HB_NO_VAR
92#endif
93
94#ifdef HB_MINI
95#define HB_NO_AAT
96#define HB_NO_LEGACY
97#define HB_NO_BORING_EXPANSION
98#endif
99
100#ifdef __OPTIMIZE_SIZE__
101#ifndef HB_OPTIMIZE_SIZE
102#define HB_OPTIMIZE_SIZE
103#endif
104#endif
105
106#if defined(HAVE_CONFIG_OVERRIDE_H) || defined(HB_CONFIG_OVERRIDE_H)
107#ifndef HB_CONFIG_OVERRIDE_H
108#define HB_CONFIG_OVERRIDE_H "config-override.h"
109#endif
110#include HB_CONFIG_OVERRIDE_H
111#endif
112
113/* Closure of options. */
114
115#ifdef HB_NO_BORING_EXPANSION
116#define HB_NO_BEYOND_64K
117#define HB_NO_CUBIC_GLYF
118#define HB_NO_VAR_COMPOSITES
119#endif
120
121#ifdef HB_DISABLE_DEPRECATED
122#define HB_IF_NOT_DEPRECATED(x)
123#else
124#define HB_IF_NOT_DEPRECATED(x) x
125#endif
126
127#ifdef HB_NO_SHAPER
128#define HB_NO_OT_SHAPE
129#define HB_NO_AAT_SHAPE
130#endif
131
132#ifdef HB_NO_AAT
133#define HB_NO_OT_NAME_LANGUAGE_AAT
134#define HB_NO_AAT_SHAPE
135#endif
136
137#ifdef HB_NO_BITMAP
138#define HB_NO_OT_FONT_BITMAP
139#endif
140
141#ifdef HB_NO_CFF
142#define HB_NO_OT_FONT_CFF
143#define HB_NO_SUBSET_CFF
144#endif
145
146#ifdef HB_NO_DRAW
147#define HB_NO_OUTLINE
148#endif
149
150#ifdef HB_NO_GETENV
151#define HB_NO_UNISCRIBE_BUG_COMPATIBLE
152#endif
153
154#ifdef HB_NO_LEGACY
155#define HB_NO_CMAP_LEGACY_SUBTABLES
156#define HB_NO_FALLBACK_SHAPE
157#define HB_NO_OT_KERN
158#define HB_NO_OT_LAYOUT_BLOCKLIST
159#define HB_NO_OT_SHAPE_FALLBACK
160#endif
161
162#ifdef HB_NO_NAME
163#define HB_NO_OT_NAME_LANGUAGE
164#endif
165
166#ifdef HB_NO_OT
167#define HB_NO_OT_FONT
168#define HB_NO_OT_LAYOUT
169#define HB_NO_OT_TAG
170#define HB_NO_OT_SHAPE
171#endif
172
173#ifdef HB_NO_OT_SHAPE
174#define HB_NO_AAT_SHAPE
175#endif
176
177#ifdef HB_NO_OT_SHAPE_FALLBACK
178#define HB_NO_OT_SHAPER_ARABIC_FALLBACK
179#define HB_NO_OT_SHAPER_HEBREW_FALLBACK
180#define HB_NO_OT_SHAPER_THAI_FALLBACK
181#define HB_NO_OT_SHAPER_VOWEL_CONSTRAINTS
182#define HB_NO_OT_SHAPER_MYANMAR_ZAWGYI
183#endif
184
185#ifdef HB_OPTIMIZE_SIZE_MORE
186#define HB_NO_OT_RULESETS_FAST_PATH
187#endif
188
189#ifdef HB_MINIMIZE_MEMORY_USAGE
190#define HB_NO_GDEF_CACHE
191#define HB_NO_OT_LAYOUT_LOOKUP_CACHE
192#define HB_NO_OT_FONT_ADVANCE_CACHE
193#define HB_NO_OT_FONT_CMAP_CACHE
194#endif
195
196#ifdef HB_OPTIMIZE_SIZE
197#define HB_OPTIMIZE_SIZE_VAL 1
198#else
199#define HB_OPTIMIZE_SIZE_VAL 0
200#endif
201
202#ifdef HB_MINIMIZE_MEMORY_USAGE
203#define HB_MINIMIZE_MEMORY_USAGE_VAL 1
204#else
205#define HB_MINIMIZE_MEMORY_USAGE_VAL 0
206#endif
207
208#endif /* HB_CONFIG_HH */
209