| 1 |
new file mode 100644 |
| 2 |
index 0000000..fffffff |
| 3 |
--- /dev/null |
| 4 |
+++ builds/android-ftmodule.h |
| 5 |
@@ -0,0 +1,35 @@ |
| 6 |
+/* |
| 7 |
+ * This file registers the FreeType modules compiled into the library. |
| 8 |
+ * |
| 9 |
+ * If you use GNU make, this file IS NOT USED! Instead, it is created in |
| 10 |
+ * the objects directory (normally `<topdir>/objs/`) based on information |
| 11 |
+ * from `<topdir>/modules.cfg`. |
| 12 |
+ * |
| 13 |
+ * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile |
| 14 |
+ * FreeType without GNU make. |
| 15 |
+ * |
| 16 |
+ */ |
| 17 |
+ |
| 18 |
+FT_USE_MODULE( FT_Module_Class, autofit_module_class ) |
| 19 |
+FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) |
| 20 |
+FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) |
| 21 |
+FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) |
| 22 |
+FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) |
| 23 |
+//FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) |
| 24 |
+//FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) |
| 25 |
+//FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) |
| 26 |
+//FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) |
| 27 |
+//FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) |
| 28 |
+FT_USE_MODULE( FT_Module_Class, psaux_module_class ) |
| 29 |
+FT_USE_MODULE( FT_Module_Class, psnames_module_class ) |
| 30 |
+FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) |
| 31 |
+FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) |
| 32 |
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) |
| 33 |
+FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) |
| 34 |
+//FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class ) |
| 35 |
+//FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class ) |
| 36 |
+#if defined(FT_CONFIG_OPTION_SVG) |
| 37 |
+FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class ) |
| 38 |
+#endif |
| 39 |
+ |
| 40 |
+/* EOF */ |
| 41 |
new file mode 100644 |
| 42 |
index 0000000..fffffff |
| 43 |
--- /dev/null |
| 44 |
+++ builds/android-ftoption.h |
| 45 |
@@ -0,0 +1,1080 @@ |
| 46 |
+/**************************************************************************** |
| 47 |
+ * |
| 48 |
+ * ftoption.h |
| 49 |
+ * |
| 50 |
+ * User-selectable configuration macros (specification only). |
| 51 |
+ * |
| 52 |
+ * Copyright (C) 1996-2025 by |
| 53 |
+ * David Turner, Robert Wilhelm, and Werner Lemberg. |
| 54 |
+ * |
| 55 |
+ * This file is part of the FreeType project, and may only be used, |
| 56 |
+ * modified, and distributed under the terms of the FreeType project |
| 57 |
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute |
| 58 |
+ * this file you indicate that you have read the license and |
| 59 |
+ * understand and accept it fully. |
| 60 |
+ * |
| 61 |
+ */ |
| 62 |
+ |
| 63 |
+ |
| 64 |
+#ifndef FTOPTION_H_ |
| 65 |
+#define FTOPTION_H_ |
| 66 |
+ |
| 67 |
+ |
| 68 |
+#include <ft2build.h> |
| 69 |
+ |
| 70 |
+ |
| 71 |
+FT_BEGIN_HEADER |
| 72 |
+ |
| 73 |
+ /************************************************************************** |
| 74 |
+ * |
| 75 |
+ * USER-SELECTABLE CONFIGURATION MACROS |
| 76 |
+ * |
| 77 |
+ * This file contains the default configuration macro definitions for a |
| 78 |
+ * standard build of the FreeType library. There are three ways to use |
| 79 |
+ * this file to build project-specific versions of the library: |
| 80 |
+ * |
| 81 |
+ * - You can modify this file by hand, but this is not recommended in |
| 82 |
+ * cases where you would like to build several versions of the library |
| 83 |
+ * from a single source directory. |
| 84 |
+ * |
| 85 |
+ * - You can put a copy of this file in your build directory, more |
| 86 |
+ * precisely in `$BUILD/freetype/config/ftoption.h`, where `$BUILD` is |
| 87 |
+ * the name of a directory that is included _before_ the FreeType include |
| 88 |
+ * path during compilation. |
| 89 |
+ * |
| 90 |
+ * The default FreeType Makefiles use the build directory |
| 91 |
+ * `builds/<system>` by default, but you can easily change that for your |
| 92 |
+ * own projects. |
| 93 |
+ * |
| 94 |
+ * - Copy the file <ft2build.h> to `$BUILD/ft2build.h` and modify it |
| 95 |
+ * slightly to pre-define the macro `FT_CONFIG_OPTIONS_H` used to locate |
| 96 |
+ * this file during the build. For example, |
| 97 |
+ * |
| 98 |
+ * ``` |
| 99 |
+ * #define FT_CONFIG_OPTIONS_H <myftoptions.h> |
| 100 |
+ * #include <freetype/config/ftheader.h> |
| 101 |
+ * ``` |
| 102 |
+ * |
| 103 |
+ * will use `$BUILD/myftoptions.h` instead of this file for macro |
| 104 |
+ * definitions. |
| 105 |
+ * |
| 106 |
+ * Note also that you can similarly pre-define the macro |
| 107 |
+ * `FT_CONFIG_MODULES_H` used to locate the file listing of the modules |
| 108 |
+ * that are statically linked to the library at compile time. By |
| 109 |
+ * default, this file is `<freetype/config/ftmodule.h>`. |
| 110 |
+ * |
| 111 |
+ * We highly recommend using the third method whenever possible. |
| 112 |
+ * |
| 113 |
+ */ |
| 114 |
+ |
| 115 |
+ |
| 116 |
+ /*************************************************************************/ |
| 117 |
+ /*************************************************************************/ |
| 118 |
+ /**** ****/ |
| 119 |
+ /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ |
| 120 |
+ /**** ****/ |
| 121 |
+ /*************************************************************************/ |
| 122 |
+ /*************************************************************************/ |
| 123 |
+ |
| 124 |
+ |
| 125 |
+ /*#************************************************************************ |
| 126 |
+ * |
| 127 |
+ * If you enable this configuration option, FreeType recognizes an |
| 128 |
+ * environment variable called `FREETYPE_PROPERTIES`, which can be used to |
| 129 |
+ * control the various font drivers and modules. The controllable |
| 130 |
+ * properties are listed in the section @properties. |
| 131 |
+ * |
| 132 |
+ * You have to undefine this configuration option on platforms that lack |
| 133 |
+ * the concept of environment variables (and thus don't have the `getenv` |
| 134 |
+ * function), for example Windows CE. |
| 135 |
+ * |
| 136 |
+ * `FREETYPE_PROPERTIES` has the following syntax form (broken here into |
| 137 |
+ * multiple lines for better readability). |
| 138 |
+ * |
| 139 |
+ * ``` |
| 140 |
+ * <optional whitespace> |
| 141 |
+ * <module-name1> ':' |
| 142 |
+ * <property-name1> '=' <property-value1> |
| 143 |
+ * <whitespace> |
| 144 |
+ * <module-name2> ':' |
| 145 |
+ * <property-name2> '=' <property-value2> |
| 146 |
+ * ... |
| 147 |
+ * ``` |
| 148 |
+ * |
| 149 |
+ * Example: |
| 150 |
+ * |
| 151 |
+ * ``` |
| 152 |
+ * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ |
| 153 |
+ * cff:no-stem-darkening=1 \ |
| 154 |
+ * autofitter:warping=1 |
| 155 |
+ * ``` |
| 156 |
+ * |
| 157 |
+ */ |
| 158 |
+#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES |
| 159 |
+ |
| 160 |
+ |
| 161 |
+ /************************************************************************** |
| 162 |
+ * |
| 163 |
+ * Uncomment the line below if you want to activate LCD rendering |
| 164 |
+ * technology similar to ClearType in this build of the library. This |
| 165 |
+ * technology triples the resolution in the direction color subpixels. To |
| 166 |
+ * mitigate color fringes inherent to this technology, you also need to |
| 167 |
+ * explicitly set up LCD filtering. |
| 168 |
+ * |
| 169 |
+ * When this macro is not defined, FreeType offers alternative LCD |
| 170 |
+ * rendering technology that produces excellent output. |
| 171 |
+ */ |
| 172 |
+/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ |
| 173 |
+ |
| 174 |
+ |
| 175 |
+ /************************************************************************** |
| 176 |
+ * |
| 177 |
+ * Many compilers provide a non-ANSI 64-bit data type that can be used by |
| 178 |
+ * FreeType to speed up some computations. However, this will create some |
| 179 |
+ * problems when compiling the library in strict ANSI mode. |
| 180 |
+ * |
| 181 |
+ * For this reason, the use of 64-bit integers is normally disabled when |
| 182 |
+ * the `__STDC__` macro is defined. You can however disable this by |
| 183 |
+ * defining the macro `FT_CONFIG_OPTION_FORCE_INT64` here. |
| 184 |
+ * |
| 185 |
+ * For most compilers, this will only create compilation warnings when |
| 186 |
+ * building the library. |
| 187 |
+ * |
| 188 |
+ * ObNote: The compiler-specific 64-bit integers are detected in the |
| 189 |
+ * file `ftconfig.h` either statically or through the `configure` |
| 190 |
+ * script on supported platforms. |
| 191 |
+ */ |
| 192 |
+#undef FT_CONFIG_OPTION_FORCE_INT64 |
| 193 |
+ |
| 194 |
+ |
| 195 |
+ /************************************************************************** |
| 196 |
+ * |
| 197 |
+ * If this macro is defined, do not try to use an assembler version of |
| 198 |
+ * performance-critical functions (e.g., @FT_MulFix). You should only do |
| 199 |
+ * that to verify that the assembler function works properly, or to execute |
| 200 |
+ * benchmark tests of the various implementations. |
| 201 |
+ */ |
| 202 |
+/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ |
| 203 |
+ |
| 204 |
+ |
| 205 |
+ /************************************************************************** |
| 206 |
+ * |
| 207 |
+ * If this macro is defined, try to use an inlined 64-bit or assembler |
| 208 |
+ * version of the @FT_MulFix function, which is a 'hotspot' when loading |
| 209 |
+ * and hinting glyphs, and which should be executed as fast as possible. |
| 210 |
+ * |
| 211 |
+ * If your compiler is not C99-compliant or CPU assembly is not supported, |
| 212 |
+ * you can disable this option. |
| 213 |
+ */ |
| 214 |
+#define FT_CONFIG_OPTION_INLINE_MULFIX |
| 215 |
+ |
| 216 |
+ |
| 217 |
+ /************************************************************************** |
| 218 |
+ * |
| 219 |
+ * LZW-compressed file support. |
| 220 |
+ * |
| 221 |
+ * FreeType now handles font files that have been compressed with the |
| 222 |
+ * `compress` program. This is mostly used to parse many of the PCF |
| 223 |
+ * files that come with various X11 distributions. The implementation |
| 224 |
+ * uses NetBSD's `zopen` to partially uncompress the file on the fly (see |
| 225 |
+ * `src/lzw/ftgzip.c`). |
| 226 |
+ * |
| 227 |
+ * Define this macro if you want to enable this 'feature'. |
| 228 |
+ */ |
| 229 |
+#define FT_CONFIG_OPTION_USE_LZW |
| 230 |
+ |
| 231 |
+ |
| 232 |
+ /************************************************************************** |
| 233 |
+ * |
| 234 |
+ * Gzip-compressed file support. |
| 235 |
+ * |
| 236 |
+ * FreeType now handles font files that have been compressed with the |
| 237 |
+ * `gzip` program. This is mostly used to parse many of the PCF files |
| 238 |
+ * that come with XFree86. The implementation uses 'zlib' to partially |
| 239 |
+ * uncompress the file on the fly (see `src/gzip/ftgzip.c`). |
| 240 |
+ * |
| 241 |
+ * Define this macro if you want to enable this 'feature'. See also the |
| 242 |
+ * macro `FT_CONFIG_OPTION_SYSTEM_ZLIB` below. |
| 243 |
+ */ |
| 244 |
+/* #define FT_CONFIG_OPTION_USE_ZLIB */ |
| 245 |
+ |
| 246 |
+ |
| 247 |
+ /************************************************************************** |
| 248 |
+ * |
| 249 |
+ * ZLib library selection |
| 250 |
+ * |
| 251 |
+ * This macro is only used when `FT_CONFIG_OPTION_USE_ZLIB` is defined. |
| 252 |
+ * It allows FreeType's 'ftgzip' component to link to the system's |
| 253 |
+ * installation of the ZLib library. This is useful on systems like |
| 254 |
+ * Unix or VMS where it generally is already available. |
| 255 |
+ * |
| 256 |
+ * If you let it undefined, the component will use its own copy of the |
| 257 |
+ * zlib sources instead. These have been modified to be included |
| 258 |
+ * directly within the component and **not** export external function |
| 259 |
+ * names. This allows you to link any program with FreeType _and_ ZLib |
| 260 |
+ * without linking conflicts. |
| 261 |
+ * |
| 262 |
+ * Do not `#undef` this macro here since the build system might define |
| 263 |
+ * it for certain configurations only. |
| 264 |
+ * |
| 265 |
+ * If you use a build system like cmake or the `configure` script, |
| 266 |
+ * options set by those programs have precedence, overwriting the value |
| 267 |
+ * here with the configured one. |
| 268 |
+ * |
| 269 |
+ * If you use the GNU make build system directly (that is, without the |
| 270 |
+ * `configure` script) and you define this macro, you also have to pass |
| 271 |
+ * `SYSTEM_ZLIB=yes` as an argument to make. |
| 272 |
+ */ |
| 273 |
+/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ |
| 274 |
+ |
| 275 |
+ |
| 276 |
+ /************************************************************************** |
| 277 |
+ * |
| 278 |
+ * Bzip2-compressed file support. |
| 279 |
+ * |
| 280 |
+ * FreeType now handles font files that have been compressed with the |
| 281 |
+ * `bzip2` program. This is mostly used to parse many of the PCF files |
| 282 |
+ * that come with XFree86. The implementation uses `libbz2` to partially |
| 283 |
+ * uncompress the file on the fly (see `src/bzip2/ftbzip2.c`). Contrary |
| 284 |
+ * to gzip, bzip2 currently is not included and need to use the system |
| 285 |
+ * available bzip2 implementation. |
| 286 |
+ * |
| 287 |
+ * Define this macro if you want to enable this 'feature'. |
| 288 |
+ * |
| 289 |
+ * If you use a build system like cmake or the `configure` script, |
| 290 |
+ * options set by those programs have precedence, overwriting the value |
| 291 |
+ * here with the configured one. |
| 292 |
+ */ |
| 293 |
+/* #define FT_CONFIG_OPTION_USE_BZIP2 */ |
| 294 |
+ |
| 295 |
+ |
| 296 |
+ /************************************************************************** |
| 297 |
+ * |
| 298 |
+ * Define to disable the use of file stream functions and types, `FILE`, |
| 299 |
+ * `fopen`, etc. Enables the use of smaller system libraries on embedded |
| 300 |
+ * systems that have multiple system libraries, some with or without file |
| 301 |
+ * stream support, in the cases where file stream support is not necessary |
| 302 |
+ * such as memory loading of font files. |
| 303 |
+ */ |
| 304 |
+/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ |
| 305 |
+ |
| 306 |
+ |
| 307 |
+ /************************************************************************** |
| 308 |
+ * |
| 309 |
+ * PNG bitmap support. |
| 310 |
+ * |
| 311 |
+ * FreeType now handles loading color bitmap glyphs in the PNG format. |
| 312 |
+ * This requires help from the external libpng library. Uncompressed |
| 313 |
+ * color bitmaps do not need any external libraries and will be supported |
| 314 |
+ * regardless of this configuration. |
| 315 |
+ * |
| 316 |
+ * Define this macro if you want to enable this 'feature'. |
| 317 |
+ * |
| 318 |
+ * If you use a build system like cmake or the `configure` script, |
| 319 |
+ * options set by those programs have precedence, overwriting the value |
| 320 |
+ * here with the configured one. |
| 321 |
+ */ |
| 322 |
+#define FT_CONFIG_OPTION_USE_PNG |
| 323 |
+ |
| 324 |
+ |
| 325 |
+ /************************************************************************** |
| 326 |
+ * |
| 327 |
+ * HarfBuzz support. |
| 328 |
+ * |
| 329 |
+ * FreeType uses the HarfBuzz library to improve auto-hinting of OpenType |
| 330 |
+ * fonts. If available, many glyphs not directly addressable by a font's |
| 331 |
+ * character map will be hinted also. |
| 332 |
+ * |
| 333 |
+ * Define this macro if you want to enable this 'feature'. |
| 334 |
+ * |
| 335 |
+ * If you use a build system like cmake or the `configure` script, |
| 336 |
+ * options set by those programs have precedence, overwriting the value |
| 337 |
+ * here with the configured one. |
| 338 |
+ */ |
| 339 |
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */ |
| 340 |
+ |
| 341 |
+ |
| 342 |
+ /************************************************************************** |
| 343 |
+ * |
| 344 |
+ * HarfBuzz dynamic support. |
| 345 |
+ * |
| 346 |
+ * Define this macro if you want the HarfBuzz library to be loaded at |
| 347 |
+ * runtime instead of being linked to FreeType. |
| 348 |
+ * |
| 349 |
+ * This option has no effect if `FT_CONFIG_OPTION_USE_HARFBUZZ` is not |
| 350 |
+ * defined. |
| 351 |
+ * |
| 352 |
+ * When this option is enabled, FreeType will try to load the HarfBuzz |
| 353 |
+ * library at runtime, using `dlopen` or `LoadLibrary`, depending on the |
| 354 |
+ * platform. On Microsoft platforms, the library name looked up is |
| 355 |
+ * `libharfbuzz-0.dll`. On Apple platforms, the library name looked up |
| 356 |
+ * is `libharfbuzz.0.dylib`. On all other platforms, the library name |
| 357 |
+ * looked up is `libharfbuzz.so.0`. This name can be overridden by |
| 358 |
+ * defining the macro `FT_LIBHARFBUZZ` at FreeType compilation time. |
| 359 |
+ * |
| 360 |
+ * If you use a build system like cmake or the `configure` script, |
| 361 |
+ * options set by those programs have precedence, overwriting the value |
| 362 |
+ * here with the configured one. |
| 363 |
+ */ |
| 364 |
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */ |
| 365 |
+ |
| 366 |
+ |
| 367 |
+ /************************************************************************** |
| 368 |
+ * |
| 369 |
+ * Brotli support. |
| 370 |
+ * |
| 371 |
+ * FreeType uses the Brotli library to provide support for decompressing |
| 372 |
+ * WOFF2 streams. |
| 373 |
+ * |
| 374 |
+ * Define this macro if you want to enable this 'feature'. |
| 375 |
+ * |
| 376 |
+ * If you use a build system like cmake or the `configure` script, |
| 377 |
+ * options set by those programs have precedence, overwriting the value |
| 378 |
+ * here with the configured one. |
| 379 |
+ */ |
| 380 |
+/* #define FT_CONFIG_OPTION_USE_BROTLI */ |
| 381 |
+ |
| 382 |
+ |
| 383 |
+ /************************************************************************** |
| 384 |
+ * |
| 385 |
+ * Glyph Postscript Names handling |
| 386 |
+ * |
| 387 |
+ * By default, FreeType 2 is compiled with the 'psnames' module. This |
| 388 |
+ * module is in charge of converting a glyph name string into a Unicode |
| 389 |
+ * value, or return a Macintosh standard glyph name for the use with the |
| 390 |
+ * TrueType 'post' table. |
| 391 |
+ * |
| 392 |
+ * Undefine this macro if you do not want 'psnames' compiled in your |
| 393 |
+ * build of FreeType. This has the following effects: |
| 394 |
+ * |
| 395 |
+ * - The TrueType driver will provide its own set of glyph names, if you |
| 396 |
+ * build it to support postscript names in the TrueType 'post' table, |
| 397 |
+ * but will not synthesize a missing Unicode charmap. |
| 398 |
+ * |
| 399 |
+ * - The Type~1 driver will not be able to synthesize a Unicode charmap |
| 400 |
+ * out of the glyphs found in the fonts. |
| 401 |
+ * |
| 402 |
+ * You would normally undefine this configuration macro when building a |
| 403 |
+ * version of FreeType that doesn't contain a Type~1 or CFF driver. |
| 404 |
+ */ |
| 405 |
+#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES |
| 406 |
+ |
| 407 |
+ |
| 408 |
+ /************************************************************************** |
| 409 |
+ * |
| 410 |
+ * Postscript Names to Unicode Values support |
| 411 |
+ * |
| 412 |
+ * By default, FreeType~2 is built with the 'psnames' module compiled in. |
| 413 |
+ * Among other things, the module is used to convert a glyph name into a |
| 414 |
+ * Unicode value. This is especially useful in order to synthesize on |
| 415 |
+ * the fly a Unicode charmap from the CFF/Type~1 driver through a big |
| 416 |
+ * table named the 'Adobe Glyph List' (AGL). |
| 417 |
+ * |
| 418 |
+ * Undefine this macro if you do not want the Adobe Glyph List compiled |
| 419 |
+ * in your 'psnames' module. The Type~1 driver will not be able to |
| 420 |
+ * synthesize a Unicode charmap out of the glyphs found in the fonts. |
| 421 |
+ */ |
| 422 |
+#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST |
| 423 |
+ |
| 424 |
+ |
| 425 |
+ /************************************************************************** |
| 426 |
+ * |
| 427 |
+ * Support for Mac fonts |
| 428 |
+ * |
| 429 |
+ * Define this macro if you want support for outline fonts in Mac format |
| 430 |
+ * (mac dfont, mac resource, macbinary containing a mac resource) on |
| 431 |
+ * non-Mac platforms. |
| 432 |
+ * |
| 433 |
+ * Note that the 'FOND' resource isn't checked. |
| 434 |
+ */ |
| 435 |
+#define FT_CONFIG_OPTION_MAC_FONTS |
| 436 |
+ |
| 437 |
+ |
| 438 |
+ /************************************************************************** |
| 439 |
+ * |
| 440 |
+ * Guessing methods to access embedded resource forks |
| 441 |
+ * |
| 442 |
+ * Enable extra Mac fonts support on non-Mac platforms (e.g., GNU/Linux). |
| 443 |
+ * |
| 444 |
+ * Resource forks which include fonts data are stored sometimes in |
| 445 |
+ * locations which users or developers don't expected. In some cases, |
| 446 |
+ * resource forks start with some offset from the head of a file. In |
| 447 |
+ * other cases, the actual resource fork is stored in file different from |
| 448 |
+ * what the user specifies. If this option is activated, FreeType tries |
| 449 |
+ * to guess whether such offsets or different file names must be used. |
| 450 |
+ * |
| 451 |
+ * Note that normal, direct access of resource forks is controlled via |
| 452 |
+ * the `FT_CONFIG_OPTION_MAC_FONTS` option. |
| 453 |
+ */ |
| 454 |
+#ifdef FT_CONFIG_OPTION_MAC_FONTS |
| 455 |
+#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK |
| 456 |
+#endif |
| 457 |
+ |
| 458 |
+ |
| 459 |
+ /************************************************************************** |
| 460 |
+ * |
| 461 |
+ * Allow the use of `FT_Incremental_Interface` to load typefaces that |
| 462 |
+ * contain no glyph data, but supply it via a callback function. This is |
| 463 |
+ * required by clients supporting document formats which supply font data |
| 464 |
+ * incrementally as the document is parsed, such as the Ghostscript |
| 465 |
+ * interpreter for the PostScript language. |
| 466 |
+ */ |
| 467 |
+#define FT_CONFIG_OPTION_INCREMENTAL |
| 468 |
+ |
| 469 |
+ |
| 470 |
+ /************************************************************************** |
| 471 |
+ * |
| 472 |
+ * The size in bytes of the render pool used by the scan-line converter to |
| 473 |
+ * do all of its work. |
| 474 |
+ */ |
| 475 |
+#define FT_RENDER_POOL_SIZE 16384L |
| 476 |
+ |
| 477 |
+ |
| 478 |
+ /************************************************************************** |
| 479 |
+ * |
| 480 |
+ * FT_MAX_MODULES |
| 481 |
+ * |
| 482 |
+ * The maximum number of modules that can be registered in a single |
| 483 |
+ * FreeType library object. 32~is the default. |
| 484 |
+ */ |
| 485 |
+#define FT_MAX_MODULES 32 |
| 486 |
+ |
| 487 |
+ |
| 488 |
+ /************************************************************************** |
| 489 |
+ * |
| 490 |
+ * Debug level |
| 491 |
+ * |
| 492 |
+ * FreeType can be compiled in debug or trace mode. In debug mode, |
| 493 |
+ * errors are reported through the 'ftdebug' component. In trace mode, |
| 494 |
+ * additional messages are sent to the standard output during execution. |
| 495 |
+ * |
| 496 |
+ * Define `FT_DEBUG_LEVEL_ERROR` to build the library in debug mode. |
| 497 |
+ * Define `FT_DEBUG_LEVEL_TRACE` to build it in trace mode. |
| 498 |
+ * |
| 499 |
+ * Don't define any of these macros to compile in 'release' mode! |
| 500 |
+ * |
| 501 |
+ * Do not `#undef` these macros here since the build system might define |
| 502 |
+ * them for certain configurations only. |
| 503 |
+ */ |
| 504 |
+/* #define FT_DEBUG_LEVEL_ERROR */ |
| 505 |
+/* #define FT_DEBUG_LEVEL_TRACE */ |
| 506 |
+ |
| 507 |
+ |
| 508 |
+ /************************************************************************** |
| 509 |
+ * |
| 510 |
+ * Logging |
| 511 |
+ * |
| 512 |
+ * Compiling FreeType in debug or trace mode makes FreeType write error |
| 513 |
+ * and trace log messages to `stderr`. Enabling this macro |
| 514 |
+ * automatically forces the `FT_DEBUG_LEVEL_ERROR` and |
| 515 |
+ * `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and |
| 516 |
+ * trace log messages to a file instead of `stderr`. For writing logs |
| 517 |
+ * to a file, FreeType uses an the external `dlg` library (the source |
| 518 |
+ * code is in `src/dlg`). |
| 519 |
+ * |
| 520 |
+ * This option needs a C99 compiler. |
| 521 |
+ */ |
| 522 |
+/* #define FT_DEBUG_LOGGING */ |
| 523 |
+ |
| 524 |
+ |
| 525 |
+ /************************************************************************** |
| 526 |
+ * |
| 527 |
+ * Autofitter debugging |
| 528 |
+ * |
| 529 |
+ * If `FT_DEBUG_AUTOFIT` is defined, FreeType provides some means to |
| 530 |
+ * control the autofitter behaviour for debugging purposes with global |
| 531 |
+ * boolean variables (consequently, you should **never** enable this |
| 532 |
+ * while compiling in 'release' mode): |
| 533 |
+ * |
| 534 |
+ * ``` |
| 535 |
+ * af_debug_disable_horz_hints_ |
| 536 |
+ * af_debug_disable_vert_hints_ |
| 537 |
+ * af_debug_disable_blue_hints_ |
| 538 |
+ * ``` |
| 539 |
+ * |
| 540 |
+ * Additionally, the following functions provide dumps of various |
| 541 |
+ * internal autofit structures to stdout (using `printf`): |
| 542 |
+ * |
| 543 |
+ * ``` |
| 544 |
+ * af_glyph_hints_dump_points |
| 545 |
+ * af_glyph_hints_dump_segments |
| 546 |
+ * af_glyph_hints_dump_edges |
| 547 |
+ * af_glyph_hints_get_num_segments |
| 548 |
+ * af_glyph_hints_get_segment_offset |
| 549 |
+ * ``` |
| 550 |
+ * |
| 551 |
+ * As an argument, they use another global variable: |
| 552 |
+ * |
| 553 |
+ * ``` |
| 554 |
+ * af_debug_hints_ |
| 555 |
+ * ``` |
| 556 |
+ * |
| 557 |
+ * Please have a look at the `ftgrid` demo program to see how those |
| 558 |
+ * variables and macros should be used. |
| 559 |
+ * |
| 560 |
+ * Do not `#undef` these macros here since the build system might define |
| 561 |
+ * them for certain configurations only. |
| 562 |
+ */ |
| 563 |
+/* #define FT_DEBUG_AUTOFIT */ |
| 564 |
+ |
| 565 |
+ |
| 566 |
+ /************************************************************************** |
| 567 |
+ * |
| 568 |
+ * Memory Debugging |
| 569 |
+ * |
| 570 |
+ * FreeType now comes with an integrated memory debugger that is capable |
| 571 |
+ * of detecting simple errors like memory leaks or double deletes. To |
| 572 |
+ * compile it within your build of the library, you should define |
| 573 |
+ * `FT_DEBUG_MEMORY` here. |
| 574 |
+ * |
| 575 |
+ * Note that the memory debugger is only activated at runtime when when |
| 576 |
+ * the _environment_ variable `FT2_DEBUG_MEMORY` is defined also! |
| 577 |
+ * |
| 578 |
+ * Do not `#undef` this macro here since the build system might define it |
| 579 |
+ * for certain configurations only. |
| 580 |
+ */ |
| 581 |
+/* #define FT_DEBUG_MEMORY */ |
| 582 |
+ |
| 583 |
+ |
| 584 |
+ /************************************************************************** |
| 585 |
+ * |
| 586 |
+ * Module errors |
| 587 |
+ * |
| 588 |
+ * If this macro is set (which is _not_ the default), the higher byte of |
| 589 |
+ * an error code gives the module in which the error has occurred, while |
| 590 |
+ * the lower byte is the real error code. |
| 591 |
+ * |
| 592 |
+ * Setting this macro makes sense for debugging purposes only, since it |
| 593 |
+ * would break source compatibility of certain programs that use |
| 594 |
+ * FreeType~2. |
| 595 |
+ * |
| 596 |
+ * More details can be found in the files `ftmoderr.h` and `fterrors.h`. |
| 597 |
+ */ |
| 598 |
+#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS |
| 599 |
+ |
| 600 |
+ |
| 601 |
+ /************************************************************************** |
| 602 |
+ * |
| 603 |
+ * OpenType SVG Glyph Support |
| 604 |
+ * |
| 605 |
+ * Setting this macro enables support for OpenType SVG glyphs. By |
| 606 |
+ * default, FreeType can only fetch SVG documents. However, it can also |
| 607 |
+ * render them if external rendering hook functions are plugged in at |
| 608 |
+ * runtime. |
| 609 |
+ * |
| 610 |
+ * More details on the hooks can be found in file `otsvg.h`. |
| 611 |
+ */ |
| 612 |
+/* #define FT_CONFIG_OPTION_SVG */ |
| 613 |
+ |
| 614 |
+ |
| 615 |
+ /************************************************************************** |
| 616 |
+ * |
| 617 |
+ * Error Strings |
| 618 |
+ * |
| 619 |
+ * If this macro is set, `FT_Error_String` will return meaningful |
| 620 |
+ * descriptions. This is not enabled by default to reduce the overall |
| 621 |
+ * size of FreeType. |
| 622 |
+ * |
| 623 |
+ * More details can be found in the file `fterrors.h`. |
| 624 |
+ */ |
| 625 |
+/* #define FT_CONFIG_OPTION_ERROR_STRINGS */ |
| 626 |
+ |
| 627 |
+ |
| 628 |
+ /*************************************************************************/ |
| 629 |
+ /*************************************************************************/ |
| 630 |
+ /**** ****/ |
| 631 |
+ /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ |
| 632 |
+ /**** ****/ |
| 633 |
+ /*************************************************************************/ |
| 634 |
+ /*************************************************************************/ |
| 635 |
+ |
| 636 |
+ |
| 637 |
+ /************************************************************************** |
| 638 |
+ * |
| 639 |
+ * Define `TT_CONFIG_OPTION_EMBEDDED_BITMAPS` if you want to support |
| 640 |
+ * embedded bitmaps in all formats using the 'sfnt' module (namely |
| 641 |
+ * TrueType~& OpenType). |
| 642 |
+ */ |
| 643 |
+#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS |
| 644 |
+ |
| 645 |
+ |
| 646 |
+ /************************************************************************** |
| 647 |
+ * |
| 648 |
+ * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored |
| 649 |
+ * outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt' |
| 650 |
+ * module (namely TrueType~& OpenType). |
| 651 |
+ */ |
| 652 |
+#define TT_CONFIG_OPTION_COLOR_LAYERS |
| 653 |
+ |
| 654 |
+ |
| 655 |
+ /************************************************************************** |
| 656 |
+ * |
| 657 |
+ * Define `TT_CONFIG_OPTION_POSTSCRIPT_NAMES` if you want to be able to |
| 658 |
+ * load and enumerate Postscript names of glyphs in a TrueType or OpenType |
| 659 |
+ * file. |
| 660 |
+ * |
| 661 |
+ * Note that if you do not compile the 'psnames' module by undefining the |
| 662 |
+ * above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` macro, the 'sfnt' module will |
| 663 |
+ * contain additional code to read the PostScript name table from a font. |
| 664 |
+ * |
| 665 |
+ * (By default, the module uses 'psnames' to extract glyph names.) |
| 666 |
+ */ |
| 667 |
+#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES |
| 668 |
+ |
| 669 |
+ |
| 670 |
+ /************************************************************************** |
| 671 |
+ * |
| 672 |
+ * Define `TT_CONFIG_OPTION_SFNT_NAMES` if your applications need to access |
| 673 |
+ * the internal name table in a SFNT-based format like TrueType or |
| 674 |
+ * OpenType. The name table contains various strings used to describe the |
| 675 |
+ * font, like family name, copyright, version, etc. It does not contain |
| 676 |
+ * any glyph name though. |
| 677 |
+ * |
| 678 |
+ * Accessing SFNT names is done through the functions declared in |
| 679 |
+ * `ftsnames.h`. |
| 680 |
+ */ |
| 681 |
+#define TT_CONFIG_OPTION_SFNT_NAMES |
| 682 |
+ |
| 683 |
+ |
| 684 |
+ /************************************************************************** |
| 685 |
+ * |
| 686 |
+ * TrueType CMap support |
| 687 |
+ * |
| 688 |
+ * Here you can fine-tune which TrueType CMap table format shall be |
| 689 |
+ * supported. |
| 690 |
+ */ |
| 691 |
+#define TT_CONFIG_CMAP_FORMAT_0 |
| 692 |
+#define TT_CONFIG_CMAP_FORMAT_2 |
| 693 |
+#define TT_CONFIG_CMAP_FORMAT_4 |
| 694 |
+#define TT_CONFIG_CMAP_FORMAT_6 |
| 695 |
+#define TT_CONFIG_CMAP_FORMAT_8 |
| 696 |
+#define TT_CONFIG_CMAP_FORMAT_10 |
| 697 |
+#define TT_CONFIG_CMAP_FORMAT_12 |
| 698 |
+#define TT_CONFIG_CMAP_FORMAT_13 |
| 699 |
+#define TT_CONFIG_CMAP_FORMAT_14 |
| 700 |
+ |
| 701 |
+ |
| 702 |
+ /*************************************************************************/ |
| 703 |
+ /*************************************************************************/ |
| 704 |
+ /**** ****/ |
| 705 |
+ /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ |
| 706 |
+ /**** ****/ |
| 707 |
+ /*************************************************************************/ |
| 708 |
+ /*************************************************************************/ |
| 709 |
+ |
| 710 |
+ /************************************************************************** |
| 711 |
+ * |
| 712 |
+ * Define `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` if you want to compile a |
| 713 |
+ * bytecode interpreter in the TrueType driver. |
| 714 |
+ * |
| 715 |
+ * By undefining this, you will only compile the code necessary to load |
| 716 |
+ * TrueType glyphs without hinting. |
| 717 |
+ * |
| 718 |
+ * Do not `#undef` this macro here, since the build system might define it |
| 719 |
+ * for certain configurations only. |
| 720 |
+ */ |
| 721 |
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER |
| 722 |
+ |
| 723 |
+ |
| 724 |
+ /************************************************************************** |
| 725 |
+ * |
| 726 |
+ * Define `TT_CONFIG_OPTION_SUBPIXEL_HINTING` if you want to compile |
| 727 |
+ * subpixel hinting support into the TrueType driver. This modifies the |
| 728 |
+ * TrueType hinting mechanism when anything but `FT_RENDER_MODE_MONO` is |
| 729 |
+ * requested. |
| 730 |
+ * |
| 731 |
+ * In particular, it modifies the bytecode interpreter to interpret (or |
| 732 |
+ * not) instructions in a certain way so that all TrueType fonts look like |
| 733 |
+ * they do in a Windows ClearType (DirectWrite) environment. See [1] for a |
| 734 |
+ * technical overview on what this means. See `ttinterp.h` for more |
| 735 |
+ * details on this option. |
| 736 |
+ * |
| 737 |
+ * The new default mode focuses on applying a minimal set of rules to all |
| 738 |
+ * fonts indiscriminately so that modern and web fonts render well while |
| 739 |
+ * legacy fonts render okay. The corresponding interpreter version is v40. |
| 740 |
+ * The so-called Infinality mode (v38) is no longer available in FreeType. |
| 741 |
+ * |
| 742 |
+ * By undefining these, you get rendering behavior like on Windows without |
| 743 |
+ * ClearType, i.e., Windows XP without ClearType enabled and Win9x |
| 744 |
+ * (interpreter version v35). Or not, depending on how much hinting blood |
| 745 |
+ * and testing tears the font designer put into a given font. If you |
| 746 |
+ * define one or both subpixel hinting options, you can switch between |
| 747 |
+ * between v35 and the ones you define (using `FT_Property_Set`). |
| 748 |
+ * |
| 749 |
+ * This option requires `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` to be |
| 750 |
+ * defined. |
| 751 |
+ * |
| 752 |
+ * [1] |
| 753 |
+ * https://learn.microsoft.com/typography/cleartype/truetypecleartype |
| 754 |
+ */ |
| 755 |
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING |
| 756 |
+ |
| 757 |
+ |
| 758 |
+ /************************************************************************** |
| 759 |
+ * |
| 760 |
+ * Define `TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED` to compile the |
| 761 |
+ * TrueType glyph loader to use Apple's definition of how to handle |
| 762 |
+ * component offsets in composite glyphs. |
| 763 |
+ * |
| 764 |
+ * Apple and MS disagree on the default behavior of component offsets in |
| 765 |
+ * composites. Apple says that they should be scaled by the scaling |
| 766 |
+ * factors in the transformation matrix (roughly, it's more complex) while |
| 767 |
+ * MS says they should not. OpenType defines two bits in the composite |
| 768 |
+ * flags array which can be used to disambiguate, but old fonts will not |
| 769 |
+ * have them. |
| 770 |
+ * |
| 771 |
+ * https://learn.microsoft.com/typography/opentype/spec/glyf |
| 772 |
+ * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html |
| 773 |
+ */ |
| 774 |
+#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED |
| 775 |
+ |
| 776 |
+ |
| 777 |
+ /************************************************************************** |
| 778 |
+ * |
| 779 |
+ * Define `TT_CONFIG_OPTION_GX_VAR_SUPPORT` if you want to include support |
| 780 |
+ * for Apple's distortable font technology ('fvar', 'gvar', 'cvar', and |
| 781 |
+ * 'avar' tables). Tagged 'Font Variations', this is now part of OpenType |
| 782 |
+ * also. This has many similarities to Type~1 Multiple Masters support. |
| 783 |
+ */ |
| 784 |
+#define TT_CONFIG_OPTION_GX_VAR_SUPPORT |
| 785 |
+ |
| 786 |
+ |
| 787 |
+ /************************************************************************** |
| 788 |
+ * |
| 789 |
+ * Define `TT_CONFIG_OPTION_NO_BORING_EXPANSION` if you want to exclude |
| 790 |
+ * support for 'boring' OpenType specification expansions. |
| 791 |
+ * |
| 792 |
+ * https://github.com/harfbuzz/boring-expansion-spec |
| 793 |
+ * |
| 794 |
+ * Right now, the following features are covered: |
| 795 |
+ * |
| 796 |
+ * - 'avar' version 2.0 |
| 797 |
+ * |
| 798 |
+ * Most likely, this is a temporary configuration option to be removed in |
| 799 |
+ * the near future, since it is assumed that eventually those features are |
| 800 |
+ * added to the OpenType standard. |
| 801 |
+ */ |
| 802 |
+#define TT_CONFIG_OPTION_NO_BORING_EXPANSION |
| 803 |
+ |
| 804 |
+ |
| 805 |
+ /************************************************************************** |
| 806 |
+ * |
| 807 |
+ * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an |
| 808 |
+ * embedded 'BDF~' table within an SFNT-based `.otb` font file. This table |
| 809 |
+ * is an extension used by X11 to preserve BDF properties after conversion |
| 810 |
+ * to SFNT containers. See |
| 811 |
+ * |
| 812 |
+ * https://fontforge.org/docs/techref/non-standard.html#non-standard-bdf |
| 813 |
+ * |
| 814 |
+ * for more details. |
| 815 |
+ */ |
| 816 |
+#define TT_CONFIG_OPTION_BDF |
| 817 |
+ |
| 818 |
+ |
| 819 |
+ /************************************************************************** |
| 820 |
+ * |
| 821 |
+ * Option `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES` controls the maximum |
| 822 |
+ * number of bytecode instructions executed for a single run of the |
| 823 |
+ * bytecode interpreter, needed to prevent infinite loops. You don't want |
| 824 |
+ * to change this except for very special situations (e.g., making a |
| 825 |
+ * library fuzzer spend less time to handle broken fonts). |
| 826 |
+ * |
| 827 |
+ * It is not expected that this value is ever modified by a configuring |
| 828 |
+ * script; instead, it gets surrounded with `#ifndef ... #endif` so that |
| 829 |
+ * the value can be set as a preprocessor option on the compiler's command |
| 830 |
+ * line. |
| 831 |
+ */ |
| 832 |
+#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES |
| 833 |
+#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L |
| 834 |
+#endif |
| 835 |
+ |
| 836 |
+ |
| 837 |
+ /************************************************************************** |
| 838 |
+ * |
| 839 |
+ * Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning |
| 840 |
+ * implementation (for TrueType and OpenType fonts only). With this |
| 841 |
+ * defined, FreeType is able to get kerning pair data from the GPOS 'kern' |
| 842 |
+ * feature as well as legacy 'kern' tables; without this defined, FreeType |
| 843 |
+ * will only be able to use legacy 'kern' tables. |
| 844 |
+ * |
| 845 |
+ * Note that FreeType does not support more advanced GPOS layout features; |
| 846 |
+ * even the 'kern' feature implemented here doesn't handle more |
| 847 |
+ * sophisticated kerning variants. Use a higher-level library like |
| 848 |
+ * HarfBuzz instead for that. |
| 849 |
+ */ |
| 850 |
+/* #define TT_CONFIG_OPTION_GPOS_KERNING */ |
| 851 |
+ |
| 852 |
+ |
| 853 |
+ /*************************************************************************/ |
| 854 |
+ /*************************************************************************/ |
| 855 |
+ /**** ****/ |
| 856 |
+ /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ |
| 857 |
+ /**** ****/ |
| 858 |
+ /*************************************************************************/ |
| 859 |
+ /*************************************************************************/ |
| 860 |
+ |
| 861 |
+ |
| 862 |
+ /************************************************************************** |
| 863 |
+ * |
| 864 |
+ * `T1_MAX_DICT_DEPTH` is the maximum depth of nest dictionaries and arrays |
| 865 |
+ * in the Type~1 stream (see `t1load.c`). A minimum of~4 is required. |
| 866 |
+ */ |
| 867 |
+#define T1_MAX_DICT_DEPTH 5 |
| 868 |
+ |
| 869 |
+ |
| 870 |
+ /************************************************************************** |
| 871 |
+ * |
| 872 |
+ * `T1_MAX_SUBRS_CALLS` details the maximum number of nested sub-routine |
| 873 |
+ * calls during glyph loading. |
| 874 |
+ */ |
| 875 |
+#define T1_MAX_SUBRS_CALLS 16 |
| 876 |
+ |
| 877 |
+ |
| 878 |
+ /************************************************************************** |
| 879 |
+ * |
| 880 |
+ * `T1_MAX_CHARSTRING_OPERANDS` is the charstring stack's capacity. A |
| 881 |
+ * minimum of~16 is required. |
| 882 |
+ * |
| 883 |
+ * The Chinese font 'MingTiEG-Medium' (covering the CNS 11643 character |
| 884 |
+ * set) needs 256. |
| 885 |
+ */ |
| 886 |
+#define T1_MAX_CHARSTRINGS_OPERANDS 256 |
| 887 |
+ |
| 888 |
+ |
| 889 |
+ /************************************************************************** |
| 890 |
+ * |
| 891 |
+ * Define this configuration macro if you want to prevent the compilation |
| 892 |
+ * of the 't1afm' module, which is in charge of reading Type~1 AFM files |
| 893 |
+ * into an existing face. Note that if set, the Type~1 driver will be |
| 894 |
+ * unable to produce kerning distances. |
| 895 |
+ */ |
| 896 |
+#undef T1_CONFIG_OPTION_NO_AFM |
| 897 |
+ |
| 898 |
+ |
| 899 |
+ /************************************************************************** |
| 900 |
+ * |
| 901 |
+ * Define this configuration macro if you want to prevent the compilation |
| 902 |
+ * of the Multiple Masters font support in the Type~1 driver. |
| 903 |
+ */ |
| 904 |
+#undef T1_CONFIG_OPTION_NO_MM_SUPPORT |
| 905 |
+ |
| 906 |
+ |
| 907 |
+ /************************************************************************** |
| 908 |
+ * |
| 909 |
+ * `T1_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe Type~1 |
| 910 |
+ * engine gets compiled into FreeType. If defined, it is possible to |
| 911 |
+ * switch between the two engines using the `hinting-engine` property of |
| 912 |
+ * the 'type1' driver module. |
| 913 |
+ */ |
| 914 |
+/* #define T1_CONFIG_OPTION_OLD_ENGINE */ |
| 915 |
+ |
| 916 |
+ |
| 917 |
+ /*************************************************************************/ |
| 918 |
+ /*************************************************************************/ |
| 919 |
+ /**** ****/ |
| 920 |
+ /**** C F F D R I V E R C O N F I G U R A T I O N ****/ |
| 921 |
+ /**** ****/ |
| 922 |
+ /*************************************************************************/ |
| 923 |
+ /*************************************************************************/ |
| 924 |
+ |
| 925 |
+ |
| 926 |
+ /************************************************************************** |
| 927 |
+ * |
| 928 |
+ * Using `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}` it is |
| 929 |
+ * possible to set up the default values of the four control points that |
| 930 |
+ * define the stem darkening behaviour of the (new) CFF engine. For more |
| 931 |
+ * details please read the documentation of the `darkening-parameters` |
| 932 |
+ * property (file `ftdriver.h`), which allows the control at run-time. |
| 933 |
+ * |
| 934 |
+ * Do **not** undefine these macros! |
| 935 |
+ */ |
| 936 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 |
| 937 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 |
| 938 |
+ |
| 939 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 |
| 940 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 |
| 941 |
+ |
| 942 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 |
| 943 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 |
| 944 |
+ |
| 945 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 |
| 946 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 |
| 947 |
+ |
| 948 |
+ |
| 949 |
+ /************************************************************************** |
| 950 |
+ * |
| 951 |
+ * `CFF_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe CFF engine |
| 952 |
+ * gets compiled into FreeType. If defined, it is possible to switch |
| 953 |
+ * between the two engines using the `hinting-engine` property of the 'cff' |
| 954 |
+ * driver module. |
| 955 |
+ */ |
| 956 |
+/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ |
| 957 |
+ |
| 958 |
+ |
| 959 |
+ /*************************************************************************/ |
| 960 |
+ /*************************************************************************/ |
| 961 |
+ /**** ****/ |
| 962 |
+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/ |
| 963 |
+ /**** ****/ |
| 964 |
+ /*************************************************************************/ |
| 965 |
+ /*************************************************************************/ |
| 966 |
+ |
| 967 |
+ |
| 968 |
+ /************************************************************************** |
| 969 |
+ * |
| 970 |
+ * There are many PCF fonts just called 'Fixed' which look completely |
| 971 |
+ * different, and which have nothing to do with each other. When selecting |
| 972 |
+ * 'Fixed' in KDE or Gnome one gets results that appear rather random, the |
| 973 |
+ * style changes often if one changes the size and one cannot select some |
| 974 |
+ * fonts at all. This option makes the 'pcf' module prepend the foundry |
| 975 |
+ * name (plus a space) to the family name. |
| 976 |
+ * |
| 977 |
+ * We also check whether we have 'wide' characters; all put together, we |
| 978 |
+ * get family names like 'Sony Fixed' or 'Misc Fixed Wide'. |
| 979 |
+ * |
| 980 |
+ * If this option is activated, it can be controlled with the |
| 981 |
+ * `no-long-family-names` property of the 'pcf' driver module. |
| 982 |
+ */ |
| 983 |
+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES |
| 984 |
+ |
| 985 |
+ |
| 986 |
+ /*************************************************************************/ |
| 987 |
+ /*************************************************************************/ |
| 988 |
+ /**** ****/ |
| 989 |
+ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ |
| 990 |
+ /**** ****/ |
| 991 |
+ /*************************************************************************/ |
| 992 |
+ /*************************************************************************/ |
| 993 |
+ |
| 994 |
+ |
| 995 |
+ /************************************************************************** |
| 996 |
+ * |
| 997 |
+ * Compile 'autofit' module with CJK (Chinese, Japanese, Korean) script |
| 998 |
+ * support. |
| 999 |
+ */ |
| 1000 |
+#define AF_CONFIG_OPTION_CJK |
| 1001 |
+ |
| 1002 |
+ |
| 1003 |
+ /************************************************************************** |
| 1004 |
+ * |
| 1005 |
+ * Compile 'autofit' module with fallback Indic script support, covering |
| 1006 |
+ * some scripts that the 'latin' submodule of the 'autofit' module doesn't |
| 1007 |
+ * (yet) handle. Currently, this needs option `AF_CONFIG_OPTION_CJK`. |
| 1008 |
+ */ |
| 1009 |
+#ifdef AF_CONFIG_OPTION_CJK |
| 1010 |
+#define AF_CONFIG_OPTION_INDIC |
| 1011 |
+#endif |
| 1012 |
+ |
| 1013 |
+ |
| 1014 |
+ /************************************************************************** |
| 1015 |
+ * |
| 1016 |
+ * Compile 'autofit' module with warp hinting. The idea of the warping |
| 1017 |
+ * code is to slightly scale and shift a glyph within a single dimension so |
| 1018 |
+ * that as much of its segments are aligned (more or less) on the grid. To |
| 1019 |
+ * find out the optimal scaling and shifting value, various parameter |
| 1020 |
+ * combinations are tried and scored. |
| 1021 |
+ * |
| 1022 |
+ * You can switch warping on and off with the `warping` property of the |
| 1023 |
+ * auto-hinter (see file `ftdriver.h` for more information; by default it |
| 1024 |
+ * is switched off). |
| 1025 |
+ * |
| 1026 |
+ * This experimental option is not active if the rendering mode is |
| 1027 |
+ * `FT_RENDER_MODE_LIGHT`. |
| 1028 |
+ */ |
| 1029 |
+/* #define AF_CONFIG_OPTION_USE_WARPER */ |
| 1030 |
+ |
| 1031 |
+ |
| 1032 |
+ /************************************************************************** |
| 1033 |
+ * |
| 1034 |
+ * Use TrueType-like size metrics for 'light' auto-hinting. |
| 1035 |
+ * |
| 1036 |
+ * It is strongly recommended to avoid this option, which exists only to |
| 1037 |
+ * help some legacy applications retain its appearance and behaviour with |
| 1038 |
+ * respect to auto-hinted TrueType fonts. |
| 1039 |
+ * |
| 1040 |
+ * The very reason this option exists at all are GNU/Linux distributions |
| 1041 |
+ * like Fedora that did not un-patch the following change (which was |
| 1042 |
+ * present in FreeType between versions 2.4.6 and 2.7.1, inclusive). |
| 1043 |
+ * |
| 1044 |
+ * ``` |
| 1045 |
+ * 2011-07-16 Steven Chu <[email protected]> |
| 1046 |
+ * |
| 1047 |
+ * [truetype] Fix metrics on size request for scalable fonts. |
| 1048 |
+ * ``` |
| 1049 |
+ * |
| 1050 |
+ * This problematic commit is now reverted (more or less). |
| 1051 |
+ */ |
| 1052 |
+/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */ |
| 1053 |
+ |
| 1054 |
+ /* */ |
| 1055 |
+ |
| 1056 |
+ |
| 1057 |
+ /* |
| 1058 |
+ * This macro is obsolete. Support has been removed in FreeType version |
| 1059 |
+ * 2.5. |
| 1060 |
+ */ |
| 1061 |
+/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ |
| 1062 |
+ |
| 1063 |
+ |
| 1064 |
+ /* |
| 1065 |
+ * The next two macros are defined if native TrueType hinting is |
| 1066 |
+ * requested by the definitions above. Don't change this. |
| 1067 |
+ */ |
| 1068 |
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER |
| 1069 |
+#define TT_USE_BYTECODE_INTERPRETER |
| 1070 |
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING |
| 1071 |
+#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL |
| 1072 |
+#endif |
| 1073 |
+#endif |
| 1074 |
+ |
| 1075 |
+ |
| 1076 |
+ /* |
| 1077 |
+ * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this |
| 1078 |
+ * version of FreeType has support for 'COLR' v1 API. This definition is |
| 1079 |
+ * useful to FreeType clients that want to build in support for 'COLR' v1 |
| 1080 |
+ * depending on a tip-of-tree checkout before it is officially released in |
| 1081 |
+ * FreeType, and while the feature cannot yet be tested against using |
| 1082 |
+ * version macros. Don't change this macro. This may be removed once the |
| 1083 |
+ * feature is in a FreeType release version and version macros can be used |
| 1084 |
+ * to test for availability. |
| 1085 |
+ */ |
| 1086 |
+#ifdef TT_CONFIG_OPTION_COLOR_LAYERS |
| 1087 |
+#define TT_SUPPORT_COLRV1 |
| 1088 |
+#endif |
| 1089 |
+ |
| 1090 |
+ |
| 1091 |
+ /* |
| 1092 |
+ * Check CFF darkening parameters. The checks are the same as in function |
| 1093 |
+ * `cff_property_set` in file `cffdrivr.c`. |
| 1094 |
+ */ |
| 1095 |
+#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ |
| 1096 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ |
| 1097 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ |
| 1098 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ |
| 1099 |
+ \ |
| 1100 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ |
| 1101 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ |
| 1102 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ |
| 1103 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ |
| 1104 |
+ \ |
| 1105 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ |
| 1106 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ |
| 1107 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ |
| 1108 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ |
| 1109 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ |
| 1110 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ |
| 1111 |
+ \ |
| 1112 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ |
| 1113 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ |
| 1114 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ |
| 1115 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 |
| 1116 |
+#error "Invalid CFF darkening parameters!" |
| 1117 |
+#endif |
| 1118 |
+ |
| 1119 |
+ |
| 1120 |
+FT_END_HEADER |
| 1121 |
+ |
| 1122 |
+#endif /* FTOPTION_H_ */ |
| 1123 |
+ |
| 1124 |
+ |
| 1125 |
+/* END */ |
| 1126 |
new file mode 100644 |
| 1127 |
index 0000000..fffffff |
| 1128 |
--- /dev/null |
| 1129 |
+++ builds/no-type1-ftmodule.h |
| 1130 |
@@ -0,0 +1,35 @@ |
| 1131 |
+/* |
| 1132 |
+ * This file registers the FreeType modules compiled into the library. |
| 1133 |
+ * |
| 1134 |
+ * If you use GNU make, this file IS NOT USED! Instead, it is created in |
| 1135 |
+ * the objects directory (normally `<topdir>/objs/`) based on information |
| 1136 |
+ * from `<topdir>/modules.cfg`. |
| 1137 |
+ * |
| 1138 |
+ * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile |
| 1139 |
+ * FreeType without GNU make. |
| 1140 |
+ * |
| 1141 |
+ */ |
| 1142 |
+ |
| 1143 |
+FT_USE_MODULE( FT_Module_Class, autofit_module_class ) |
| 1144 |
+FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) |
| 1145 |
+//FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) |
| 1146 |
+FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) |
| 1147 |
+//FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) |
| 1148 |
+//FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) |
| 1149 |
+//FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) |
| 1150 |
+//FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) |
| 1151 |
+//FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) |
| 1152 |
+//FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) |
| 1153 |
+FT_USE_MODULE( FT_Module_Class, psaux_module_class ) |
| 1154 |
+FT_USE_MODULE( FT_Module_Class, psnames_module_class ) |
| 1155 |
+FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) |
| 1156 |
+FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) |
| 1157 |
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) |
| 1158 |
+#ifndef CANVASKIT_NO_ALIAS_FONT |
| 1159 |
+FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) |
| 1160 |
+#endif |
| 1161 |
+//FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class ) |
| 1162 |
+//FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class ) |
| 1163 |
+//FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class ) |
| 1164 |
+ |
| 1165 |
+/* EOF */ |
| 1166 |
new file mode 100644 |
| 1167 |
index 0000000..fffffff |
| 1168 |
--- /dev/null |
| 1169 |
+++ builds/no-type1-ftoption.h |
| 1170 |
@@ -0,0 +1,1080 @@ |
| 1171 |
+/**************************************************************************** |
| 1172 |
+ * |
| 1173 |
+ * ftoption.h |
| 1174 |
+ * |
| 1175 |
+ * User-selectable configuration macros (specification only). |
| 1176 |
+ * |
| 1177 |
+ * Copyright (C) 1996-2025 by |
| 1178 |
+ * David Turner, Robert Wilhelm, and Werner Lemberg. |
| 1179 |
+ * |
| 1180 |
+ * This file is part of the FreeType project, and may only be used, |
| 1181 |
+ * modified, and distributed under the terms of the FreeType project |
| 1182 |
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute |
| 1183 |
+ * this file you indicate that you have read the license and |
| 1184 |
+ * understand and accept it fully. |
| 1185 |
+ * |
| 1186 |
+ */ |
| 1187 |
+ |
| 1188 |
+ |
| 1189 |
+#ifndef FTOPTION_H_ |
| 1190 |
+#define FTOPTION_H_ |
| 1191 |
+ |
| 1192 |
+ |
| 1193 |
+#include <ft2build.h> |
| 1194 |
+ |
| 1195 |
+ |
| 1196 |
+FT_BEGIN_HEADER |
| 1197 |
+ |
| 1198 |
+ /************************************************************************** |
| 1199 |
+ * |
| 1200 |
+ * USER-SELECTABLE CONFIGURATION MACROS |
| 1201 |
+ * |
| 1202 |
+ * This file contains the default configuration macro definitions for a |
| 1203 |
+ * standard build of the FreeType library. There are three ways to use |
| 1204 |
+ * this file to build project-specific versions of the library: |
| 1205 |
+ * |
| 1206 |
+ * - You can modify this file by hand, but this is not recommended in |
| 1207 |
+ * cases where you would like to build several versions of the library |
| 1208 |
+ * from a single source directory. |
| 1209 |
+ * |
| 1210 |
+ * - You can put a copy of this file in your build directory, more |
| 1211 |
+ * precisely in `$BUILD/freetype/config/ftoption.h`, where `$BUILD` is |
| 1212 |
+ * the name of a directory that is included _before_ the FreeType include |
| 1213 |
+ * path during compilation. |
| 1214 |
+ * |
| 1215 |
+ * The default FreeType Makefiles use the build directory |
| 1216 |
+ * `builds/<system>` by default, but you can easily change that for your |
| 1217 |
+ * own projects. |
| 1218 |
+ * |
| 1219 |
+ * - Copy the file <ft2build.h> to `$BUILD/ft2build.h` and modify it |
| 1220 |
+ * slightly to pre-define the macro `FT_CONFIG_OPTIONS_H` used to locate |
| 1221 |
+ * this file during the build. For example, |
| 1222 |
+ * |
| 1223 |
+ * ``` |
| 1224 |
+ * #define FT_CONFIG_OPTIONS_H <myftoptions.h> |
| 1225 |
+ * #include <freetype/config/ftheader.h> |
| 1226 |
+ * ``` |
| 1227 |
+ * |
| 1228 |
+ * will use `$BUILD/myftoptions.h` instead of this file for macro |
| 1229 |
+ * definitions. |
| 1230 |
+ * |
| 1231 |
+ * Note also that you can similarly pre-define the macro |
| 1232 |
+ * `FT_CONFIG_MODULES_H` used to locate the file listing of the modules |
| 1233 |
+ * that are statically linked to the library at compile time. By |
| 1234 |
+ * default, this file is `<freetype/config/ftmodule.h>`. |
| 1235 |
+ * |
| 1236 |
+ * We highly recommend using the third method whenever possible. |
| 1237 |
+ * |
| 1238 |
+ */ |
| 1239 |
+ |
| 1240 |
+ |
| 1241 |
+ /*************************************************************************/ |
| 1242 |
+ /*************************************************************************/ |
| 1243 |
+ /**** ****/ |
| 1244 |
+ /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ |
| 1245 |
+ /**** ****/ |
| 1246 |
+ /*************************************************************************/ |
| 1247 |
+ /*************************************************************************/ |
| 1248 |
+ |
| 1249 |
+ |
| 1250 |
+ /*#************************************************************************ |
| 1251 |
+ * |
| 1252 |
+ * If you enable this configuration option, FreeType recognizes an |
| 1253 |
+ * environment variable called `FREETYPE_PROPERTIES`, which can be used to |
| 1254 |
+ * control the various font drivers and modules. The controllable |
| 1255 |
+ * properties are listed in the section @properties. |
| 1256 |
+ * |
| 1257 |
+ * You have to undefine this configuration option on platforms that lack |
| 1258 |
+ * the concept of environment variables (and thus don't have the `getenv` |
| 1259 |
+ * function), for example Windows CE. |
| 1260 |
+ * |
| 1261 |
+ * `FREETYPE_PROPERTIES` has the following syntax form (broken here into |
| 1262 |
+ * multiple lines for better readability). |
| 1263 |
+ * |
| 1264 |
+ * ``` |
| 1265 |
+ * <optional whitespace> |
| 1266 |
+ * <module-name1> ':' |
| 1267 |
+ * <property-name1> '=' <property-value1> |
| 1268 |
+ * <whitespace> |
| 1269 |
+ * <module-name2> ':' |
| 1270 |
+ * <property-name2> '=' <property-value2> |
| 1271 |
+ * ... |
| 1272 |
+ * ``` |
| 1273 |
+ * |
| 1274 |
+ * Example: |
| 1275 |
+ * |
| 1276 |
+ * ``` |
| 1277 |
+ * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ |
| 1278 |
+ * cff:no-stem-darkening=1 \ |
| 1279 |
+ * autofitter:warping=1 |
| 1280 |
+ * ``` |
| 1281 |
+ * |
| 1282 |
+ */ |
| 1283 |
+#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES |
| 1284 |
+ |
| 1285 |
+ |
| 1286 |
+ /************************************************************************** |
| 1287 |
+ * |
| 1288 |
+ * Uncomment the line below if you want to activate LCD rendering |
| 1289 |
+ * technology similar to ClearType in this build of the library. This |
| 1290 |
+ * technology triples the resolution in the direction color subpixels. To |
| 1291 |
+ * mitigate color fringes inherent to this technology, you also need to |
| 1292 |
+ * explicitly set up LCD filtering. |
| 1293 |
+ * |
| 1294 |
+ * When this macro is not defined, FreeType offers alternative LCD |
| 1295 |
+ * rendering technology that produces excellent output. |
| 1296 |
+ */ |
| 1297 |
+/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ |
| 1298 |
+ |
| 1299 |
+ |
| 1300 |
+ /************************************************************************** |
| 1301 |
+ * |
| 1302 |
+ * Many compilers provide a non-ANSI 64-bit data type that can be used by |
| 1303 |
+ * FreeType to speed up some computations. However, this will create some |
| 1304 |
+ * problems when compiling the library in strict ANSI mode. |
| 1305 |
+ * |
| 1306 |
+ * For this reason, the use of 64-bit integers is normally disabled when |
| 1307 |
+ * the `__STDC__` macro is defined. You can however disable this by |
| 1308 |
+ * defining the macro `FT_CONFIG_OPTION_FORCE_INT64` here. |
| 1309 |
+ * |
| 1310 |
+ * For most compilers, this will only create compilation warnings when |
| 1311 |
+ * building the library. |
| 1312 |
+ * |
| 1313 |
+ * ObNote: The compiler-specific 64-bit integers are detected in the |
| 1314 |
+ * file `ftconfig.h` either statically or through the `configure` |
| 1315 |
+ * script on supported platforms. |
| 1316 |
+ */ |
| 1317 |
+#undef FT_CONFIG_OPTION_FORCE_INT64 |
| 1318 |
+ |
| 1319 |
+ |
| 1320 |
+ /************************************************************************** |
| 1321 |
+ * |
| 1322 |
+ * If this macro is defined, do not try to use an assembler version of |
| 1323 |
+ * performance-critical functions (e.g., @FT_MulFix). You should only do |
| 1324 |
+ * that to verify that the assembler function works properly, or to execute |
| 1325 |
+ * benchmark tests of the various implementations. |
| 1326 |
+ */ |
| 1327 |
+/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ |
| 1328 |
+ |
| 1329 |
+ |
| 1330 |
+ /************************************************************************** |
| 1331 |
+ * |
| 1332 |
+ * If this macro is defined, try to use an inlined 64-bit or assembler |
| 1333 |
+ * version of the @FT_MulFix function, which is a 'hotspot' when loading |
| 1334 |
+ * and hinting glyphs, and which should be executed as fast as possible. |
| 1335 |
+ * |
| 1336 |
+ * If your compiler is not C99-compliant or CPU assembly is not supported, |
| 1337 |
+ * you can disable this option. |
| 1338 |
+ */ |
| 1339 |
+#define FT_CONFIG_OPTION_INLINE_MULFIX |
| 1340 |
+ |
| 1341 |
+ |
| 1342 |
+ /************************************************************************** |
| 1343 |
+ * |
| 1344 |
+ * LZW-compressed file support. |
| 1345 |
+ * |
| 1346 |
+ * FreeType now handles font files that have been compressed with the |
| 1347 |
+ * `compress` program. This is mostly used to parse many of the PCF |
| 1348 |
+ * files that come with various X11 distributions. The implementation |
| 1349 |
+ * uses NetBSD's `zopen` to partially uncompress the file on the fly (see |
| 1350 |
+ * `src/lzw/ftgzip.c`). |
| 1351 |
+ * |
| 1352 |
+ * Define this macro if you want to enable this 'feature'. |
| 1353 |
+ */ |
| 1354 |
+#define FT_CONFIG_OPTION_USE_LZW |
| 1355 |
+ |
| 1356 |
+ |
| 1357 |
+ /************************************************************************** |
| 1358 |
+ * |
| 1359 |
+ * Gzip-compressed file support. |
| 1360 |
+ * |
| 1361 |
+ * FreeType now handles font files that have been compressed with the |
| 1362 |
+ * `gzip` program. This is mostly used to parse many of the PCF files |
| 1363 |
+ * that come with XFree86. The implementation uses 'zlib' to partially |
| 1364 |
+ * uncompress the file on the fly (see `src/gzip/ftgzip.c`). |
| 1365 |
+ * |
| 1366 |
+ * Define this macro if you want to enable this 'feature'. See also the |
| 1367 |
+ * macro `FT_CONFIG_OPTION_SYSTEM_ZLIB` below. |
| 1368 |
+ */ |
| 1369 |
+/* #define FT_CONFIG_OPTION_USE_ZLIB */ |
| 1370 |
+ |
| 1371 |
+ |
| 1372 |
+ /************************************************************************** |
| 1373 |
+ * |
| 1374 |
+ * ZLib library selection |
| 1375 |
+ * |
| 1376 |
+ * This macro is only used when `FT_CONFIG_OPTION_USE_ZLIB` is defined. |
| 1377 |
+ * It allows FreeType's 'ftgzip' component to link to the system's |
| 1378 |
+ * installation of the ZLib library. This is useful on systems like |
| 1379 |
+ * Unix or VMS where it generally is already available. |
| 1380 |
+ * |
| 1381 |
+ * If you let it undefined, the component will use its own copy of the |
| 1382 |
+ * zlib sources instead. These have been modified to be included |
| 1383 |
+ * directly within the component and **not** export external function |
| 1384 |
+ * names. This allows you to link any program with FreeType _and_ ZLib |
| 1385 |
+ * without linking conflicts. |
| 1386 |
+ * |
| 1387 |
+ * Do not `#undef` this macro here since the build system might define |
| 1388 |
+ * it for certain configurations only. |
| 1389 |
+ * |
| 1390 |
+ * If you use a build system like cmake or the `configure` script, |
| 1391 |
+ * options set by those programs have precedence, overwriting the value |
| 1392 |
+ * here with the configured one. |
| 1393 |
+ * |
| 1394 |
+ * If you use the GNU make build system directly (that is, without the |
| 1395 |
+ * `configure` script) and you define this macro, you also have to pass |
| 1396 |
+ * `SYSTEM_ZLIB=yes` as an argument to make. |
| 1397 |
+ */ |
| 1398 |
+/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ |
| 1399 |
+ |
| 1400 |
+ |
| 1401 |
+ /************************************************************************** |
| 1402 |
+ * |
| 1403 |
+ * Bzip2-compressed file support. |
| 1404 |
+ * |
| 1405 |
+ * FreeType now handles font files that have been compressed with the |
| 1406 |
+ * `bzip2` program. This is mostly used to parse many of the PCF files |
| 1407 |
+ * that come with XFree86. The implementation uses `libbz2` to partially |
| 1408 |
+ * uncompress the file on the fly (see `src/bzip2/ftbzip2.c`). Contrary |
| 1409 |
+ * to gzip, bzip2 currently is not included and need to use the system |
| 1410 |
+ * available bzip2 implementation. |
| 1411 |
+ * |
| 1412 |
+ * Define this macro if you want to enable this 'feature'. |
| 1413 |
+ * |
| 1414 |
+ * If you use a build system like cmake or the `configure` script, |
| 1415 |
+ * options set by those programs have precedence, overwriting the value |
| 1416 |
+ * here with the configured one. |
| 1417 |
+ */ |
| 1418 |
+/* #define FT_CONFIG_OPTION_USE_BZIP2 */ |
| 1419 |
+ |
| 1420 |
+ |
| 1421 |
+ /************************************************************************** |
| 1422 |
+ * |
| 1423 |
+ * Define to disable the use of file stream functions and types, `FILE`, |
| 1424 |
+ * `fopen`, etc. Enables the use of smaller system libraries on embedded |
| 1425 |
+ * systems that have multiple system libraries, some with or without file |
| 1426 |
+ * stream support, in the cases where file stream support is not necessary |
| 1427 |
+ * such as memory loading of font files. |
| 1428 |
+ */ |
| 1429 |
+/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ |
| 1430 |
+ |
| 1431 |
+ |
| 1432 |
+ /************************************************************************** |
| 1433 |
+ * |
| 1434 |
+ * PNG bitmap support. |
| 1435 |
+ * |
| 1436 |
+ * FreeType now handles loading color bitmap glyphs in the PNG format. |
| 1437 |
+ * This requires help from the external libpng library. Uncompressed |
| 1438 |
+ * color bitmaps do not need any external libraries and will be supported |
| 1439 |
+ * regardless of this configuration. |
| 1440 |
+ * |
| 1441 |
+ * Define this macro if you want to enable this 'feature'. |
| 1442 |
+ * |
| 1443 |
+ * If you use a build system like cmake or the `configure` script, |
| 1444 |
+ * options set by those programs have precedence, overwriting the value |
| 1445 |
+ * here with the configured one. |
| 1446 |
+ */ |
| 1447 |
+#define FT_CONFIG_OPTION_USE_PNG |
| 1448 |
+ |
| 1449 |
+ |
| 1450 |
+ /************************************************************************** |
| 1451 |
+ * |
| 1452 |
+ * HarfBuzz support. |
| 1453 |
+ * |
| 1454 |
+ * FreeType uses the HarfBuzz library to improve auto-hinting of OpenType |
| 1455 |
+ * fonts. If available, many glyphs not directly addressable by a font's |
| 1456 |
+ * character map will be hinted also. |
| 1457 |
+ * |
| 1458 |
+ * Define this macro if you want to enable this 'feature'. |
| 1459 |
+ * |
| 1460 |
+ * If you use a build system like cmake or the `configure` script, |
| 1461 |
+ * options set by those programs have precedence, overwriting the value |
| 1462 |
+ * here with the configured one. |
| 1463 |
+ */ |
| 1464 |
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */ |
| 1465 |
+ |
| 1466 |
+ |
| 1467 |
+ /************************************************************************** |
| 1468 |
+ * |
| 1469 |
+ * HarfBuzz dynamic support. |
| 1470 |
+ * |
| 1471 |
+ * Define this macro if you want the HarfBuzz library to be loaded at |
| 1472 |
+ * runtime instead of being linked to FreeType. |
| 1473 |
+ * |
| 1474 |
+ * This option has no effect if `FT_CONFIG_OPTION_USE_HARFBUZZ` is not |
| 1475 |
+ * defined. |
| 1476 |
+ * |
| 1477 |
+ * When this option is enabled, FreeType will try to load the HarfBuzz |
| 1478 |
+ * library at runtime, using `dlopen` or `LoadLibrary`, depending on the |
| 1479 |
+ * platform. On Microsoft platforms, the library name looked up is |
| 1480 |
+ * `libharfbuzz-0.dll`. On Apple platforms, the library name looked up |
| 1481 |
+ * is `libharfbuzz.0.dylib`. On all other platforms, the library name |
| 1482 |
+ * looked up is `libharfbuzz.so.0`. This name can be overridden by |
| 1483 |
+ * defining the macro `FT_LIBHARFBUZZ` at FreeType compilation time. |
| 1484 |
+ * |
| 1485 |
+ * If you use a build system like cmake or the `configure` script, |
| 1486 |
+ * options set by those programs have precedence, overwriting the value |
| 1487 |
+ * here with the configured one. |
| 1488 |
+ */ |
| 1489 |
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */ |
| 1490 |
+ |
| 1491 |
+ |
| 1492 |
+ /************************************************************************** |
| 1493 |
+ * |
| 1494 |
+ * Brotli support. |
| 1495 |
+ * |
| 1496 |
+ * FreeType uses the Brotli library to provide support for decompressing |
| 1497 |
+ * WOFF2 streams. |
| 1498 |
+ * |
| 1499 |
+ * Define this macro if you want to enable this 'feature'. |
| 1500 |
+ * |
| 1501 |
+ * If you use a build system like cmake or the `configure` script, |
| 1502 |
+ * options set by those programs have precedence, overwriting the value |
| 1503 |
+ * here with the configured one. |
| 1504 |
+ */ |
| 1505 |
+/* #define FT_CONFIG_OPTION_USE_BROTLI */ |
| 1506 |
+ |
| 1507 |
+ |
| 1508 |
+ /************************************************************************** |
| 1509 |
+ * |
| 1510 |
+ * Glyph Postscript Names handling |
| 1511 |
+ * |
| 1512 |
+ * By default, FreeType 2 is compiled with the 'psnames' module. This |
| 1513 |
+ * module is in charge of converting a glyph name string into a Unicode |
| 1514 |
+ * value, or return a Macintosh standard glyph name for the use with the |
| 1515 |
+ * TrueType 'post' table. |
| 1516 |
+ * |
| 1517 |
+ * Undefine this macro if you do not want 'psnames' compiled in your |
| 1518 |
+ * build of FreeType. This has the following effects: |
| 1519 |
+ * |
| 1520 |
+ * - The TrueType driver will provide its own set of glyph names, if you |
| 1521 |
+ * build it to support postscript names in the TrueType 'post' table, |
| 1522 |
+ * but will not synthesize a missing Unicode charmap. |
| 1523 |
+ * |
| 1524 |
+ * - The Type~1 driver will not be able to synthesize a Unicode charmap |
| 1525 |
+ * out of the glyphs found in the fonts. |
| 1526 |
+ * |
| 1527 |
+ * You would normally undefine this configuration macro when building a |
| 1528 |
+ * version of FreeType that doesn't contain a Type~1 or CFF driver. |
| 1529 |
+ */ |
| 1530 |
+#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES |
| 1531 |
+ |
| 1532 |
+ |
| 1533 |
+ /************************************************************************** |
| 1534 |
+ * |
| 1535 |
+ * Postscript Names to Unicode Values support |
| 1536 |
+ * |
| 1537 |
+ * By default, FreeType~2 is built with the 'psnames' module compiled in. |
| 1538 |
+ * Among other things, the module is used to convert a glyph name into a |
| 1539 |
+ * Unicode value. This is especially useful in order to synthesize on |
| 1540 |
+ * the fly a Unicode charmap from the CFF/Type~1 driver through a big |
| 1541 |
+ * table named the 'Adobe Glyph List' (AGL). |
| 1542 |
+ * |
| 1543 |
+ * Undefine this macro if you do not want the Adobe Glyph List compiled |
| 1544 |
+ * in your 'psnames' module. The Type~1 driver will not be able to |
| 1545 |
+ * synthesize a Unicode charmap out of the glyphs found in the fonts. |
| 1546 |
+ */ |
| 1547 |
+/* #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */ |
| 1548 |
+ |
| 1549 |
+ |
| 1550 |
+ /************************************************************************** |
| 1551 |
+ * |
| 1552 |
+ * Support for Mac fonts |
| 1553 |
+ * |
| 1554 |
+ * Define this macro if you want support for outline fonts in Mac format |
| 1555 |
+ * (mac dfont, mac resource, macbinary containing a mac resource) on |
| 1556 |
+ * non-Mac platforms. |
| 1557 |
+ * |
| 1558 |
+ * Note that the 'FOND' resource isn't checked. |
| 1559 |
+ */ |
| 1560 |
+#define FT_CONFIG_OPTION_MAC_FONTS |
| 1561 |
+ |
| 1562 |
+ |
| 1563 |
+ /************************************************************************** |
| 1564 |
+ * |
| 1565 |
+ * Guessing methods to access embedded resource forks |
| 1566 |
+ * |
| 1567 |
+ * Enable extra Mac fonts support on non-Mac platforms (e.g., GNU/Linux). |
| 1568 |
+ * |
| 1569 |
+ * Resource forks which include fonts data are stored sometimes in |
| 1570 |
+ * locations which users or developers don't expected. In some cases, |
| 1571 |
+ * resource forks start with some offset from the head of a file. In |
| 1572 |
+ * other cases, the actual resource fork is stored in file different from |
| 1573 |
+ * what the user specifies. If this option is activated, FreeType tries |
| 1574 |
+ * to guess whether such offsets or different file names must be used. |
| 1575 |
+ * |
| 1576 |
+ * Note that normal, direct access of resource forks is controlled via |
| 1577 |
+ * the `FT_CONFIG_OPTION_MAC_FONTS` option. |
| 1578 |
+ */ |
| 1579 |
+#ifdef FT_CONFIG_OPTION_MAC_FONTS |
| 1580 |
+#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK |
| 1581 |
+#endif |
| 1582 |
+ |
| 1583 |
+ |
| 1584 |
+ /************************************************************************** |
| 1585 |
+ * |
| 1586 |
+ * Allow the use of `FT_Incremental_Interface` to load typefaces that |
| 1587 |
+ * contain no glyph data, but supply it via a callback function. This is |
| 1588 |
+ * required by clients supporting document formats which supply font data |
| 1589 |
+ * incrementally as the document is parsed, such as the Ghostscript |
| 1590 |
+ * interpreter for the PostScript language. |
| 1591 |
+ */ |
| 1592 |
+#define FT_CONFIG_OPTION_INCREMENTAL |
| 1593 |
+ |
| 1594 |
+ |
| 1595 |
+ /************************************************************************** |
| 1596 |
+ * |
| 1597 |
+ * The size in bytes of the render pool used by the scan-line converter to |
| 1598 |
+ * do all of its work. |
| 1599 |
+ */ |
| 1600 |
+#define FT_RENDER_POOL_SIZE 16384L |
| 1601 |
+ |
| 1602 |
+ |
| 1603 |
+ /************************************************************************** |
| 1604 |
+ * |
| 1605 |
+ * FT_MAX_MODULES |
| 1606 |
+ * |
| 1607 |
+ * The maximum number of modules that can be registered in a single |
| 1608 |
+ * FreeType library object. 32~is the default. |
| 1609 |
+ */ |
| 1610 |
+#define FT_MAX_MODULES 32 |
| 1611 |
+ |
| 1612 |
+ |
| 1613 |
+ /************************************************************************** |
| 1614 |
+ * |
| 1615 |
+ * Debug level |
| 1616 |
+ * |
| 1617 |
+ * FreeType can be compiled in debug or trace mode. In debug mode, |
| 1618 |
+ * errors are reported through the 'ftdebug' component. In trace mode, |
| 1619 |
+ * additional messages are sent to the standard output during execution. |
| 1620 |
+ * |
| 1621 |
+ * Define `FT_DEBUG_LEVEL_ERROR` to build the library in debug mode. |
| 1622 |
+ * Define `FT_DEBUG_LEVEL_TRACE` to build it in trace mode. |
| 1623 |
+ * |
| 1624 |
+ * Don't define any of these macros to compile in 'release' mode! |
| 1625 |
+ * |
| 1626 |
+ * Do not `#undef` these macros here since the build system might define |
| 1627 |
+ * them for certain configurations only. |
| 1628 |
+ */ |
| 1629 |
+/* #define FT_DEBUG_LEVEL_ERROR */ |
| 1630 |
+/* #define FT_DEBUG_LEVEL_TRACE */ |
| 1631 |
+ |
| 1632 |
+ |
| 1633 |
+ /************************************************************************** |
| 1634 |
+ * |
| 1635 |
+ * Logging |
| 1636 |
+ * |
| 1637 |
+ * Compiling FreeType in debug or trace mode makes FreeType write error |
| 1638 |
+ * and trace log messages to `stderr`. Enabling this macro |
| 1639 |
+ * automatically forces the `FT_DEBUG_LEVEL_ERROR` and |
| 1640 |
+ * `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and |
| 1641 |
+ * trace log messages to a file instead of `stderr`. For writing logs |
| 1642 |
+ * to a file, FreeType uses an the external `dlg` library (the source |
| 1643 |
+ * code is in `src/dlg`). |
| 1644 |
+ * |
| 1645 |
+ * This option needs a C99 compiler. |
| 1646 |
+ */ |
| 1647 |
+/* #define FT_DEBUG_LOGGING */ |
| 1648 |
+ |
| 1649 |
+ |
| 1650 |
+ /************************************************************************** |
| 1651 |
+ * |
| 1652 |
+ * Autofitter debugging |
| 1653 |
+ * |
| 1654 |
+ * If `FT_DEBUG_AUTOFIT` is defined, FreeType provides some means to |
| 1655 |
+ * control the autofitter behaviour for debugging purposes with global |
| 1656 |
+ * boolean variables (consequently, you should **never** enable this |
| 1657 |
+ * while compiling in 'release' mode): |
| 1658 |
+ * |
| 1659 |
+ * ``` |
| 1660 |
+ * af_debug_disable_horz_hints_ |
| 1661 |
+ * af_debug_disable_vert_hints_ |
| 1662 |
+ * af_debug_disable_blue_hints_ |
| 1663 |
+ * ``` |
| 1664 |
+ * |
| 1665 |
+ * Additionally, the following functions provide dumps of various |
| 1666 |
+ * internal autofit structures to stdout (using `printf`): |
| 1667 |
+ * |
| 1668 |
+ * ``` |
| 1669 |
+ * af_glyph_hints_dump_points |
| 1670 |
+ * af_glyph_hints_dump_segments |
| 1671 |
+ * af_glyph_hints_dump_edges |
| 1672 |
+ * af_glyph_hints_get_num_segments |
| 1673 |
+ * af_glyph_hints_get_segment_offset |
| 1674 |
+ * ``` |
| 1675 |
+ * |
| 1676 |
+ * As an argument, they use another global variable: |
| 1677 |
+ * |
| 1678 |
+ * ``` |
| 1679 |
+ * af_debug_hints_ |
| 1680 |
+ * ``` |
| 1681 |
+ * |
| 1682 |
+ * Please have a look at the `ftgrid` demo program to see how those |
| 1683 |
+ * variables and macros should be used. |
| 1684 |
+ * |
| 1685 |
+ * Do not `#undef` these macros here since the build system might define |
| 1686 |
+ * them for certain configurations only. |
| 1687 |
+ */ |
| 1688 |
+/* #define FT_DEBUG_AUTOFIT */ |
| 1689 |
+ |
| 1690 |
+ |
| 1691 |
+ /************************************************************************** |
| 1692 |
+ * |
| 1693 |
+ * Memory Debugging |
| 1694 |
+ * |
| 1695 |
+ * FreeType now comes with an integrated memory debugger that is capable |
| 1696 |
+ * of detecting simple errors like memory leaks or double deletes. To |
| 1697 |
+ * compile it within your build of the library, you should define |
| 1698 |
+ * `FT_DEBUG_MEMORY` here. |
| 1699 |
+ * |
| 1700 |
+ * Note that the memory debugger is only activated at runtime when when |
| 1701 |
+ * the _environment_ variable `FT2_DEBUG_MEMORY` is defined also! |
| 1702 |
+ * |
| 1703 |
+ * Do not `#undef` this macro here since the build system might define it |
| 1704 |
+ * for certain configurations only. |
| 1705 |
+ */ |
| 1706 |
+/* #define FT_DEBUG_MEMORY */ |
| 1707 |
+ |
| 1708 |
+ |
| 1709 |
+ /************************************************************************** |
| 1710 |
+ * |
| 1711 |
+ * Module errors |
| 1712 |
+ * |
| 1713 |
+ * If this macro is set (which is _not_ the default), the higher byte of |
| 1714 |
+ * an error code gives the module in which the error has occurred, while |
| 1715 |
+ * the lower byte is the real error code. |
| 1716 |
+ * |
| 1717 |
+ * Setting this macro makes sense for debugging purposes only, since it |
| 1718 |
+ * would break source compatibility of certain programs that use |
| 1719 |
+ * FreeType~2. |
| 1720 |
+ * |
| 1721 |
+ * More details can be found in the files `ftmoderr.h` and `fterrors.h`. |
| 1722 |
+ */ |
| 1723 |
+#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS |
| 1724 |
+ |
| 1725 |
+ |
| 1726 |
+ /************************************************************************** |
| 1727 |
+ * |
| 1728 |
+ * OpenType SVG Glyph Support |
| 1729 |
+ * |
| 1730 |
+ * Setting this macro enables support for OpenType SVG glyphs. By |
| 1731 |
+ * default, FreeType can only fetch SVG documents. However, it can also |
| 1732 |
+ * render them if external rendering hook functions are plugged in at |
| 1733 |
+ * runtime. |
| 1734 |
+ * |
| 1735 |
+ * More details on the hooks can be found in file `otsvg.h`. |
| 1736 |
+ */ |
| 1737 |
+/* #define FT_CONFIG_OPTION_SVG */ |
| 1738 |
+ |
| 1739 |
+ |
| 1740 |
+ /************************************************************************** |
| 1741 |
+ * |
| 1742 |
+ * Error Strings |
| 1743 |
+ * |
| 1744 |
+ * If this macro is set, `FT_Error_String` will return meaningful |
| 1745 |
+ * descriptions. This is not enabled by default to reduce the overall |
| 1746 |
+ * size of FreeType. |
| 1747 |
+ * |
| 1748 |
+ * More details can be found in the file `fterrors.h`. |
| 1749 |
+ */ |
| 1750 |
+/* #define FT_CONFIG_OPTION_ERROR_STRINGS */ |
| 1751 |
+ |
| 1752 |
+ |
| 1753 |
+ /*************************************************************************/ |
| 1754 |
+ /*************************************************************************/ |
| 1755 |
+ /**** ****/ |
| 1756 |
+ /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ |
| 1757 |
+ /**** ****/ |
| 1758 |
+ /*************************************************************************/ |
| 1759 |
+ /*************************************************************************/ |
| 1760 |
+ |
| 1761 |
+ |
| 1762 |
+ /************************************************************************** |
| 1763 |
+ * |
| 1764 |
+ * Define `TT_CONFIG_OPTION_EMBEDDED_BITMAPS` if you want to support |
| 1765 |
+ * embedded bitmaps in all formats using the 'sfnt' module (namely |
| 1766 |
+ * TrueType~& OpenType). |
| 1767 |
+ */ |
| 1768 |
+#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS |
| 1769 |
+ |
| 1770 |
+ |
| 1771 |
+ /************************************************************************** |
| 1772 |
+ * |
| 1773 |
+ * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored |
| 1774 |
+ * outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt' |
| 1775 |
+ * module (namely TrueType~& OpenType). |
| 1776 |
+ */ |
| 1777 |
+#define TT_CONFIG_OPTION_COLOR_LAYERS |
| 1778 |
+ |
| 1779 |
+ |
| 1780 |
+ /************************************************************************** |
| 1781 |
+ * |
| 1782 |
+ * Define `TT_CONFIG_OPTION_POSTSCRIPT_NAMES` if you want to be able to |
| 1783 |
+ * load and enumerate Postscript names of glyphs in a TrueType or OpenType |
| 1784 |
+ * file. |
| 1785 |
+ * |
| 1786 |
+ * Note that if you do not compile the 'psnames' module by undefining the |
| 1787 |
+ * above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` macro, the 'sfnt' module will |
| 1788 |
+ * contain additional code to read the PostScript name table from a font. |
| 1789 |
+ * |
| 1790 |
+ * (By default, the module uses 'psnames' to extract glyph names.) |
| 1791 |
+ */ |
| 1792 |
+#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES |
| 1793 |
+ |
| 1794 |
+ |
| 1795 |
+ /************************************************************************** |
| 1796 |
+ * |
| 1797 |
+ * Define `TT_CONFIG_OPTION_SFNT_NAMES` if your applications need to access |
| 1798 |
+ * the internal name table in a SFNT-based format like TrueType or |
| 1799 |
+ * OpenType. The name table contains various strings used to describe the |
| 1800 |
+ * font, like family name, copyright, version, etc. It does not contain |
| 1801 |
+ * any glyph name though. |
| 1802 |
+ * |
| 1803 |
+ * Accessing SFNT names is done through the functions declared in |
| 1804 |
+ * `ftsnames.h`. |
| 1805 |
+ */ |
| 1806 |
+#define TT_CONFIG_OPTION_SFNT_NAMES |
| 1807 |
+ |
| 1808 |
+ |
| 1809 |
+ /************************************************************************** |
| 1810 |
+ * |
| 1811 |
+ * TrueType CMap support |
| 1812 |
+ * |
| 1813 |
+ * Here you can fine-tune which TrueType CMap table format shall be |
| 1814 |
+ * supported. |
| 1815 |
+ */ |
| 1816 |
+#define TT_CONFIG_CMAP_FORMAT_0 |
| 1817 |
+#define TT_CONFIG_CMAP_FORMAT_2 |
| 1818 |
+#define TT_CONFIG_CMAP_FORMAT_4 |
| 1819 |
+#define TT_CONFIG_CMAP_FORMAT_6 |
| 1820 |
+#define TT_CONFIG_CMAP_FORMAT_8 |
| 1821 |
+#define TT_CONFIG_CMAP_FORMAT_10 |
| 1822 |
+#define TT_CONFIG_CMAP_FORMAT_12 |
| 1823 |
+#define TT_CONFIG_CMAP_FORMAT_13 |
| 1824 |
+#define TT_CONFIG_CMAP_FORMAT_14 |
| 1825 |
+ |
| 1826 |
+ |
| 1827 |
+ /*************************************************************************/ |
| 1828 |
+ /*************************************************************************/ |
| 1829 |
+ /**** ****/ |
| 1830 |
+ /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ |
| 1831 |
+ /**** ****/ |
| 1832 |
+ /*************************************************************************/ |
| 1833 |
+ /*************************************************************************/ |
| 1834 |
+ |
| 1835 |
+ /************************************************************************** |
| 1836 |
+ * |
| 1837 |
+ * Define `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` if you want to compile a |
| 1838 |
+ * bytecode interpreter in the TrueType driver. |
| 1839 |
+ * |
| 1840 |
+ * By undefining this, you will only compile the code necessary to load |
| 1841 |
+ * TrueType glyphs without hinting. |
| 1842 |
+ * |
| 1843 |
+ * Do not `#undef` this macro here, since the build system might define it |
| 1844 |
+ * for certain configurations only. |
| 1845 |
+ */ |
| 1846 |
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER |
| 1847 |
+ |
| 1848 |
+ |
| 1849 |
+ /************************************************************************** |
| 1850 |
+ * |
| 1851 |
+ * Define `TT_CONFIG_OPTION_SUBPIXEL_HINTING` if you want to compile |
| 1852 |
+ * subpixel hinting support into the TrueType driver. This modifies the |
| 1853 |
+ * TrueType hinting mechanism when anything but `FT_RENDER_MODE_MONO` is |
| 1854 |
+ * requested. |
| 1855 |
+ * |
| 1856 |
+ * In particular, it modifies the bytecode interpreter to interpret (or |
| 1857 |
+ * not) instructions in a certain way so that all TrueType fonts look like |
| 1858 |
+ * they do in a Windows ClearType (DirectWrite) environment. See [1] for a |
| 1859 |
+ * technical overview on what this means. See `ttinterp.h` for more |
| 1860 |
+ * details on this option. |
| 1861 |
+ * |
| 1862 |
+ * The new default mode focuses on applying a minimal set of rules to all |
| 1863 |
+ * fonts indiscriminately so that modern and web fonts render well while |
| 1864 |
+ * legacy fonts render okay. The corresponding interpreter version is v40. |
| 1865 |
+ * The so-called Infinality mode (v38) is no longer available in FreeType. |
| 1866 |
+ * |
| 1867 |
+ * By undefining these, you get rendering behavior like on Windows without |
| 1868 |
+ * ClearType, i.e., Windows XP without ClearType enabled and Win9x |
| 1869 |
+ * (interpreter version v35). Or not, depending on how much hinting blood |
| 1870 |
+ * and testing tears the font designer put into a given font. If you |
| 1871 |
+ * define one or both subpixel hinting options, you can switch between |
| 1872 |
+ * between v35 and the ones you define (using `FT_Property_Set`). |
| 1873 |
+ * |
| 1874 |
+ * This option requires `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` to be |
| 1875 |
+ * defined. |
| 1876 |
+ * |
| 1877 |
+ * [1] |
| 1878 |
+ * https://learn.microsoft.com/typography/cleartype/truetypecleartype |
| 1879 |
+ */ |
| 1880 |
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING |
| 1881 |
+ |
| 1882 |
+ |
| 1883 |
+ /************************************************************************** |
| 1884 |
+ * |
| 1885 |
+ * Define `TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED` to compile the |
| 1886 |
+ * TrueType glyph loader to use Apple's definition of how to handle |
| 1887 |
+ * component offsets in composite glyphs. |
| 1888 |
+ * |
| 1889 |
+ * Apple and MS disagree on the default behavior of component offsets in |
| 1890 |
+ * composites. Apple says that they should be scaled by the scaling |
| 1891 |
+ * factors in the transformation matrix (roughly, it's more complex) while |
| 1892 |
+ * MS says they should not. OpenType defines two bits in the composite |
| 1893 |
+ * flags array which can be used to disambiguate, but old fonts will not |
| 1894 |
+ * have them. |
| 1895 |
+ * |
| 1896 |
+ * https://learn.microsoft.com/typography/opentype/spec/glyf |
| 1897 |
+ * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html |
| 1898 |
+ */ |
| 1899 |
+#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED |
| 1900 |
+ |
| 1901 |
+ |
| 1902 |
+ /************************************************************************** |
| 1903 |
+ * |
| 1904 |
+ * Define `TT_CONFIG_OPTION_GX_VAR_SUPPORT` if you want to include support |
| 1905 |
+ * for Apple's distortable font technology ('fvar', 'gvar', 'cvar', and |
| 1906 |
+ * 'avar' tables). Tagged 'Font Variations', this is now part of OpenType |
| 1907 |
+ * also. This has many similarities to Type~1 Multiple Masters support. |
| 1908 |
+ */ |
| 1909 |
+#define TT_CONFIG_OPTION_GX_VAR_SUPPORT |
| 1910 |
+ |
| 1911 |
+ |
| 1912 |
+ /************************************************************************** |
| 1913 |
+ * |
| 1914 |
+ * Define `TT_CONFIG_OPTION_NO_BORING_EXPANSION` if you want to exclude |
| 1915 |
+ * support for 'boring' OpenType specification expansions. |
| 1916 |
+ * |
| 1917 |
+ * https://github.com/harfbuzz/boring-expansion-spec |
| 1918 |
+ * |
| 1919 |
+ * Right now, the following features are covered: |
| 1920 |
+ * |
| 1921 |
+ * - 'avar' version 2.0 |
| 1922 |
+ * |
| 1923 |
+ * Most likely, this is a temporary configuration option to be removed in |
| 1924 |
+ * the near future, since it is assumed that eventually those features are |
| 1925 |
+ * added to the OpenType standard. |
| 1926 |
+ */ |
| 1927 |
+#define TT_CONFIG_OPTION_NO_BORING_EXPANSION |
| 1928 |
+ |
| 1929 |
+ |
| 1930 |
+ /************************************************************************** |
| 1931 |
+ * |
| 1932 |
+ * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an |
| 1933 |
+ * embedded 'BDF~' table within an SFNT-based `.otb` font file. This table |
| 1934 |
+ * is an extension used by X11 to preserve BDF properties after conversion |
| 1935 |
+ * to SFNT containers. See |
| 1936 |
+ * |
| 1937 |
+ * https://fontforge.org/docs/techref/non-standard.html#non-standard-bdf |
| 1938 |
+ * |
| 1939 |
+ * for more details. |
| 1940 |
+ */ |
| 1941 |
+#define TT_CONFIG_OPTION_BDF |
| 1942 |
+ |
| 1943 |
+ |
| 1944 |
+ /************************************************************************** |
| 1945 |
+ * |
| 1946 |
+ * Option `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES` controls the maximum |
| 1947 |
+ * number of bytecode instructions executed for a single run of the |
| 1948 |
+ * bytecode interpreter, needed to prevent infinite loops. You don't want |
| 1949 |
+ * to change this except for very special situations (e.g., making a |
| 1950 |
+ * library fuzzer spend less time to handle broken fonts). |
| 1951 |
+ * |
| 1952 |
+ * It is not expected that this value is ever modified by a configuring |
| 1953 |
+ * script; instead, it gets surrounded with `#ifndef ... #endif` so that |
| 1954 |
+ * the value can be set as a preprocessor option on the compiler's command |
| 1955 |
+ * line. |
| 1956 |
+ */ |
| 1957 |
+#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES |
| 1958 |
+#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L |
| 1959 |
+#endif |
| 1960 |
+ |
| 1961 |
+ |
| 1962 |
+ /************************************************************************** |
| 1963 |
+ * |
| 1964 |
+ * Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning |
| 1965 |
+ * implementation (for TrueType and OpenType fonts only). With this |
| 1966 |
+ * defined, FreeType is able to get kerning pair data from the GPOS 'kern' |
| 1967 |
+ * feature as well as legacy 'kern' tables; without this defined, FreeType |
| 1968 |
+ * will only be able to use legacy 'kern' tables. |
| 1969 |
+ * |
| 1970 |
+ * Note that FreeType does not support more advanced GPOS layout features; |
| 1971 |
+ * even the 'kern' feature implemented here doesn't handle more |
| 1972 |
+ * sophisticated kerning variants. Use a higher-level library like |
| 1973 |
+ * HarfBuzz instead for that. |
| 1974 |
+ */ |
| 1975 |
+/* #define TT_CONFIG_OPTION_GPOS_KERNING */ |
| 1976 |
+ |
| 1977 |
+ |
| 1978 |
+ /*************************************************************************/ |
| 1979 |
+ /*************************************************************************/ |
| 1980 |
+ /**** ****/ |
| 1981 |
+ /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ |
| 1982 |
+ /**** ****/ |
| 1983 |
+ /*************************************************************************/ |
| 1984 |
+ /*************************************************************************/ |
| 1985 |
+ |
| 1986 |
+ |
| 1987 |
+ /************************************************************************** |
| 1988 |
+ * |
| 1989 |
+ * `T1_MAX_DICT_DEPTH` is the maximum depth of nest dictionaries and arrays |
| 1990 |
+ * in the Type~1 stream (see `t1load.c`). A minimum of~4 is required. |
| 1991 |
+ */ |
| 1992 |
+#define T1_MAX_DICT_DEPTH 5 |
| 1993 |
+ |
| 1994 |
+ |
| 1995 |
+ /************************************************************************** |
| 1996 |
+ * |
| 1997 |
+ * `T1_MAX_SUBRS_CALLS` details the maximum number of nested sub-routine |
| 1998 |
+ * calls during glyph loading. |
| 1999 |
+ */ |
| 2000 |
+#define T1_MAX_SUBRS_CALLS 16 |
| 2001 |
+ |
| 2002 |
+ |
| 2003 |
+ /************************************************************************** |
| 2004 |
+ * |
| 2005 |
+ * `T1_MAX_CHARSTRING_OPERANDS` is the charstring stack's capacity. A |
| 2006 |
+ * minimum of~16 is required. |
| 2007 |
+ * |
| 2008 |
+ * The Chinese font 'MingTiEG-Medium' (covering the CNS 11643 character |
| 2009 |
+ * set) needs 256. |
| 2010 |
+ */ |
| 2011 |
+#define T1_MAX_CHARSTRINGS_OPERANDS 256 |
| 2012 |
+ |
| 2013 |
+ |
| 2014 |
+ /************************************************************************** |
| 2015 |
+ * |
| 2016 |
+ * Define this configuration macro if you want to prevent the compilation |
| 2017 |
+ * of the 't1afm' module, which is in charge of reading Type~1 AFM files |
| 2018 |
+ * into an existing face. Note that if set, the Type~1 driver will be |
| 2019 |
+ * unable to produce kerning distances. |
| 2020 |
+ */ |
| 2021 |
+#undef T1_CONFIG_OPTION_NO_AFM |
| 2022 |
+ |
| 2023 |
+ |
| 2024 |
+ /************************************************************************** |
| 2025 |
+ * |
| 2026 |
+ * Define this configuration macro if you want to prevent the compilation |
| 2027 |
+ * of the Multiple Masters font support in the Type~1 driver. |
| 2028 |
+ */ |
| 2029 |
+#undef T1_CONFIG_OPTION_NO_MM_SUPPORT |
| 2030 |
+ |
| 2031 |
+ |
| 2032 |
+ /************************************************************************** |
| 2033 |
+ * |
| 2034 |
+ * `T1_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe Type~1 |
| 2035 |
+ * engine gets compiled into FreeType. If defined, it is possible to |
| 2036 |
+ * switch between the two engines using the `hinting-engine` property of |
| 2037 |
+ * the 'type1' driver module. |
| 2038 |
+ */ |
| 2039 |
+/* #define T1_CONFIG_OPTION_OLD_ENGINE */ |
| 2040 |
+ |
| 2041 |
+ |
| 2042 |
+ /*************************************************************************/ |
| 2043 |
+ /*************************************************************************/ |
| 2044 |
+ /**** ****/ |
| 2045 |
+ /**** C F F D R I V E R C O N F I G U R A T I O N ****/ |
| 2046 |
+ /**** ****/ |
| 2047 |
+ /*************************************************************************/ |
| 2048 |
+ /*************************************************************************/ |
| 2049 |
+ |
| 2050 |
+ |
| 2051 |
+ /************************************************************************** |
| 2052 |
+ * |
| 2053 |
+ * Using `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}` it is |
| 2054 |
+ * possible to set up the default values of the four control points that |
| 2055 |
+ * define the stem darkening behaviour of the (new) CFF engine. For more |
| 2056 |
+ * details please read the documentation of the `darkening-parameters` |
| 2057 |
+ * property (file `ftdriver.h`), which allows the control at run-time. |
| 2058 |
+ * |
| 2059 |
+ * Do **not** undefine these macros! |
| 2060 |
+ */ |
| 2061 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 |
| 2062 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 |
| 2063 |
+ |
| 2064 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 |
| 2065 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 |
| 2066 |
+ |
| 2067 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 |
| 2068 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 |
| 2069 |
+ |
| 2070 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 |
| 2071 |
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 |
| 2072 |
+ |
| 2073 |
+ |
| 2074 |
+ /************************************************************************** |
| 2075 |
+ * |
| 2076 |
+ * `CFF_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe CFF engine |
| 2077 |
+ * gets compiled into FreeType. If defined, it is possible to switch |
| 2078 |
+ * between the two engines using the `hinting-engine` property of the 'cff' |
| 2079 |
+ * driver module. |
| 2080 |
+ */ |
| 2081 |
+/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ |
| 2082 |
+ |
| 2083 |
+ |
| 2084 |
+ /*************************************************************************/ |
| 2085 |
+ /*************************************************************************/ |
| 2086 |
+ /**** ****/ |
| 2087 |
+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/ |
| 2088 |
+ /**** ****/ |
| 2089 |
+ /*************************************************************************/ |
| 2090 |
+ /*************************************************************************/ |
| 2091 |
+ |
| 2092 |
+ |
| 2093 |
+ /************************************************************************** |
| 2094 |
+ * |
| 2095 |
+ * There are many PCF fonts just called 'Fixed' which look completely |
| 2096 |
+ * different, and which have nothing to do with each other. When selecting |
| 2097 |
+ * 'Fixed' in KDE or Gnome one gets results that appear rather random, the |
| 2098 |
+ * style changes often if one changes the size and one cannot select some |
| 2099 |
+ * fonts at all. This option makes the 'pcf' module prepend the foundry |
| 2100 |
+ * name (plus a space) to the family name. |
| 2101 |
+ * |
| 2102 |
+ * We also check whether we have 'wide' characters; all put together, we |
| 2103 |
+ * get family names like 'Sony Fixed' or 'Misc Fixed Wide'. |
| 2104 |
+ * |
| 2105 |
+ * If this option is activated, it can be controlled with the |
| 2106 |
+ * `no-long-family-names` property of the 'pcf' driver module. |
| 2107 |
+ */ |
| 2108 |
+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES |
| 2109 |
+ |
| 2110 |
+ |
| 2111 |
+ /*************************************************************************/ |
| 2112 |
+ /*************************************************************************/ |
| 2113 |
+ /**** ****/ |
| 2114 |
+ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ |
| 2115 |
+ /**** ****/ |
| 2116 |
+ /*************************************************************************/ |
| 2117 |
+ /*************************************************************************/ |
| 2118 |
+ |
| 2119 |
+ |
| 2120 |
+ /************************************************************************** |
| 2121 |
+ * |
| 2122 |
+ * Compile 'autofit' module with CJK (Chinese, Japanese, Korean) script |
| 2123 |
+ * support. |
| 2124 |
+ */ |
| 2125 |
+#define AF_CONFIG_OPTION_CJK |
| 2126 |
+ |
| 2127 |
+ |
| 2128 |
+ /************************************************************************** |
| 2129 |
+ * |
| 2130 |
+ * Compile 'autofit' module with fallback Indic script support, covering |
| 2131 |
+ * some scripts that the 'latin' submodule of the 'autofit' module doesn't |
| 2132 |
+ * (yet) handle. Currently, this needs option `AF_CONFIG_OPTION_CJK`. |
| 2133 |
+ */ |
| 2134 |
+#ifdef AF_CONFIG_OPTION_CJK |
| 2135 |
+#define AF_CONFIG_OPTION_INDIC |
| 2136 |
+#endif |
| 2137 |
+ |
| 2138 |
+ |
| 2139 |
+ /************************************************************************** |
| 2140 |
+ * |
| 2141 |
+ * Compile 'autofit' module with warp hinting. The idea of the warping |
| 2142 |
+ * code is to slightly scale and shift a glyph within a single dimension so |
| 2143 |
+ * that as much of its segments are aligned (more or less) on the grid. To |
| 2144 |
+ * find out the optimal scaling and shifting value, various parameter |
| 2145 |
+ * combinations are tried and scored. |
| 2146 |
+ * |
| 2147 |
+ * You can switch warping on and off with the `warping` property of the |
| 2148 |
+ * auto-hinter (see file `ftdriver.h` for more information; by default it |
| 2149 |
+ * is switched off). |
| 2150 |
+ * |
| 2151 |
+ * This experimental option is not active if the rendering mode is |
| 2152 |
+ * `FT_RENDER_MODE_LIGHT`. |
| 2153 |
+ */ |
| 2154 |
+/* #define AF_CONFIG_OPTION_USE_WARPER */ |
| 2155 |
+ |
| 2156 |
+ |
| 2157 |
+ /************************************************************************** |
| 2158 |
+ * |
| 2159 |
+ * Use TrueType-like size metrics for 'light' auto-hinting. |
| 2160 |
+ * |
| 2161 |
+ * It is strongly recommended to avoid this option, which exists only to |
| 2162 |
+ * help some legacy applications retain its appearance and behaviour with |
| 2163 |
+ * respect to auto-hinted TrueType fonts. |
| 2164 |
+ * |
| 2165 |
+ * The very reason this option exists at all are GNU/Linux distributions |
| 2166 |
+ * like Fedora that did not un-patch the following change (which was |
| 2167 |
+ * present in FreeType between versions 2.4.6 and 2.7.1, inclusive). |
| 2168 |
+ * |
| 2169 |
+ * ``` |
| 2170 |
+ * 2011-07-16 Steven Chu <[email protected]> |
| 2171 |
+ * |
| 2172 |
+ * [truetype] Fix metrics on size request for scalable fonts. |
| 2173 |
+ * ``` |
| 2174 |
+ * |
| 2175 |
+ * This problematic commit is now reverted (more or less). |
| 2176 |
+ */ |
| 2177 |
+/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */ |
| 2178 |
+ |
| 2179 |
+ /* */ |
| 2180 |
+ |
| 2181 |
+ |
| 2182 |
+ /* |
| 2183 |
+ * This macro is obsolete. Support has been removed in FreeType version |
| 2184 |
+ * 2.5. |
| 2185 |
+ */ |
| 2186 |
+/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ |
| 2187 |
+ |
| 2188 |
+ |
| 2189 |
+ /* |
| 2190 |
+ * The next two macros are defined if native TrueType hinting is |
| 2191 |
+ * requested by the definitions above. Don't change this. |
| 2192 |
+ */ |
| 2193 |
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER |
| 2194 |
+#define TT_USE_BYTECODE_INTERPRETER |
| 2195 |
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING |
| 2196 |
+#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL |
| 2197 |
+#endif |
| 2198 |
+#endif |
| 2199 |
+ |
| 2200 |
+ |
| 2201 |
+ /* |
| 2202 |
+ * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this |
| 2203 |
+ * version of FreeType has support for 'COLR' v1 API. This definition is |
| 2204 |
+ * useful to FreeType clients that want to build in support for 'COLR' v1 |
| 2205 |
+ * depending on a tip-of-tree checkout before it is officially released in |
| 2206 |
+ * FreeType, and while the feature cannot yet be tested against using |
| 2207 |
+ * version macros. Don't change this macro. This may be removed once the |
| 2208 |
+ * feature is in a FreeType release version and version macros can be used |
| 2209 |
+ * to test for availability. |
| 2210 |
+ */ |
| 2211 |
+#ifdef TT_CONFIG_OPTION_COLOR_LAYERS |
| 2212 |
+#define TT_SUPPORT_COLRV1 |
| 2213 |
+#endif |
| 2214 |
+ |
| 2215 |
+ |
| 2216 |
+ /* |
| 2217 |
+ * Check CFF darkening parameters. The checks are the same as in function |
| 2218 |
+ * `cff_property_set` in file `cffdrivr.c`. |
| 2219 |
+ */ |
| 2220 |
+#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ |
| 2221 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ |
| 2222 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ |
| 2223 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ |
| 2224 |
+ \ |
| 2225 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ |
| 2226 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ |
| 2227 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ |
| 2228 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ |
| 2229 |
+ \ |
| 2230 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ |
| 2231 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ |
| 2232 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ |
| 2233 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ |
| 2234 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ |
| 2235 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ |
| 2236 |
+ \ |
| 2237 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ |
| 2238 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ |
| 2239 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ |
| 2240 |
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 |
| 2241 |
+#error "Invalid CFF darkening parameters!" |
| 2242 |
+#endif |
| 2243 |
+ |
| 2244 |
+ |
| 2245 |
+FT_END_HEADER |
| 2246 |
+ |
| 2247 |
+#endif /* FTOPTION_H_ */ |
| 2248 |
+ |
| 2249 |
+ |
| 2250 |
+/* END */ |
| 2251 |
|