| 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 | |
| 39 | #ifdef HB_TINY |
| 40 | #define HB_LEAN |
| 41 | #define HB_MINI |
| 42 | #define HB_NO_MT |
| 43 | #define HB_NO_UCD_UNASSIGNED |
| 44 | #ifndef NDEBUG |
| 45 | #define NDEBUG |
| 46 | #endif |
| 47 | #ifndef __OPTIMIZE_SIZE__ |
| 48 | #define __OPTIMIZE_SIZE__ |
| 49 | #endif |
| 50 | #endif |
| 51 | |
| 52 | #ifdef HB_LEAN |
| 53 | #define HB_DISABLE_DEPRECATED |
| 54 | #define HB_NDEBUG |
| 55 | #define HB_NO_ATEXIT |
| 56 | #define HB_NO_BUFFER_MESSAGE |
| 57 | #define HB_NO_BUFFER_SERIALIZE |
| 58 | #define HB_NO_BITMAP |
| 59 | #define HB_NO_CFF |
| 60 | #define HB_NO_COLOR |
| 61 | #define HB_NO_DRAW |
| 62 | #define HB_NO_ERRNO |
| 63 | #define HB_NO_FACE_COLLECT_UNICODES |
| 64 | #define HB_NO_GETENV |
| 65 | #define HB_NO_HINTING |
| 66 | #define HB_NO_LANGUAGE_PRIVATE_SUBTAG |
| 67 | #define HB_NO_LAYOUT_FEATURE_PARAMS |
| 68 | #define HB_NO_LAYOUT_COLLECT_GLYPHS |
| 69 | #define HB_NO_LAYOUT_UNUSED |
| 70 | #define HB_NO_MATH |
| 71 | #define HB_NO_META |
| 72 | #define HB_NO_METRICS |
| 73 | #define HB_NO_MMAP |
| 74 | #define HB_NO_NAME |
| 75 | #define HB_NO_OPEN |
| 76 | #define HB_NO_SETLOCALE |
| 77 | #define HB_NO_OT_FONT_GLYPH_NAMES |
| 78 | #define HB_NO_OT_SHAPE_FRACTIONS |
| 79 | #define HB_NO_STYLE |
| 80 | #define HB_NO_SUBSET_LAYOUT |
| 81 | #define HB_NO_VAR |
| 82 | #endif |
| 83 | |
| 84 | #ifdef HB_MINI |
| 85 | #define HB_NO_AAT |
| 86 | #define HB_NO_LEGACY |
| 87 | #endif |
| 88 | |
| 89 | |
| 90 | /* Closure of options. */ |
| 91 | |
| 92 | #ifdef HB_DISABLE_DEPRECATED |
| 93 | #define HB_IF_NOT_DEPRECATED(x) |
| 94 | #else |
| 95 | #define HB_IF_NOT_DEPRECATED(x) x |
| 96 | #endif |
| 97 | |
| 98 | #ifdef HB_NO_AAT |
| 99 | #define HB_NO_OT_NAME_LANGUAGE_AAT |
| 100 | #define HB_NO_AAT_SHAPE |
| 101 | #endif |
| 102 | |
| 103 | #ifdef HB_NO_BITMAP |
| 104 | #define HB_NO_OT_FONT_BITMAP |
| 105 | #endif |
| 106 | |
| 107 | #ifdef HB_NO_CFF |
| 108 | #define HB_NO_OT_FONT_CFF |
| 109 | #define HB_NO_SUBSET_CFF |
| 110 | #endif |
| 111 | |
| 112 | #ifdef HB_NO_GETENV |
| 113 | #define HB_NO_UNISCRIBE_BUG_COMPATIBLE |
| 114 | #endif |
| 115 | |
| 116 | #ifdef HB_NO_LEGACY |
| 117 | #define HB_NO_CMAP_LEGACY_SUBTABLES |
| 118 | #define HB_NO_FALLBACK_SHAPE |
| 119 | #define HB_NO_OT_KERN |
| 120 | #define HB_NO_OT_LAYOUT_BLACKLIST |
| 121 | #define HB_NO_OT_SHAPE_FALLBACK |
| 122 | #endif |
| 123 | |
| 124 | #ifdef HB_NO_NAME |
| 125 | #define HB_NO_OT_NAME_LANGUAGE |
| 126 | #endif |
| 127 | |
| 128 | #ifdef HB_NO_OT |
| 129 | #define HB_NO_OT_FONT |
| 130 | #define HB_NO_OT_LAYOUT |
| 131 | #define HB_NO_OT_TAG |
| 132 | #define HB_NO_OT_SHAPE |
| 133 | #endif |
| 134 | |
| 135 | #ifdef HB_NO_OT_SHAPE |
| 136 | #define HB_NO_AAT_SHAPE |
| 137 | #endif |
| 138 | |
| 139 | #ifdef HB_NO_OT_SHAPE_FALLBACK |
| 140 | #define HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK |
| 141 | #define HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK |
| 142 | #define HB_NO_OT_SHAPE_COMPLEX_THAI_FALLBACK |
| 143 | #define HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS |
| 144 | #endif |
| 145 | |
| 146 | #ifdef NDEBUG |
| 147 | #ifndef HB_NDEBUG |
| 148 | #define HB_NDEBUG |
| 149 | #endif |
| 150 | #endif |
| 151 | |
| 152 | #ifdef __OPTIMIZE_SIZE__ |
| 153 | #ifndef HB_OPTIMIZE_SIZE |
| 154 | #define HB_OPTIMIZE_SIZE |
| 155 | #endif |
| 156 | #endif |
| 157 | |
| 158 | #ifdef HAVE_CONFIG_OVERRIDE_H |
| 159 | #include "config-override.h" |
| 160 | #endif |
| 161 | |
| 162 | |
| 163 | #endif /* HB_CONFIG_HH */ |
| 164 | |