sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
ftoption.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* ftoption.h
4
*
5
* User-selectable configuration macros (specification only).
6
*
7
* Copyright (C) 1996-2025 by
8
* David Turner, Robert Wilhelm, and Werner Lemberg.
9
*
10
* This file is part of the FreeType project, and may only be used,
11
* modified, and distributed under the terms of the FreeType project
12
* license, LICENSE.TXT. By continuing to use, modify, or distribute
13
* this file you indicate that you have read the license and
14
* understand and accept it fully.
15
*
16
*/
17
18
23
#ifndef FTOPTION_H_
24
#define FTOPTION_H_
25
26
27
#include <
ft2build.h
>
28
29
30
FT_BEGIN_HEADER
31
32
/**************************************************************************
33
*
34
* USER-SELECTABLE CONFIGURATION MACROS
35
*
36
* This file contains the default configuration macro definitions for a
37
* standard build of the FreeType library. There are three ways to use
38
* this file to build project-specific versions of the library:
39
*
40
* - You can modify this file by hand, but this is not recommended in
41
* cases where you would like to build several versions of the library
42
* from a single source directory.
43
*
44
* - You can put a copy of this file in your build directory, more
45
* precisely in `$BUILD/freetype/config/ftoption.h`, where `$BUILD` is
46
* the name of a directory that is included _before_ the FreeType include
47
* path during compilation.
48
*
49
* The default FreeType Makefiles use the build directory
50
* `builds/<system>` by default, but you can easily change that for your
51
* own projects.
52
*
53
* - Copy the file <ft2build.h> to `$BUILD/ft2build.h` and modify it
54
* slightly to pre-define the macro `FT_CONFIG_OPTIONS_H` used to locate
55
* this file during the build. For example,
56
*
57
* ```
58
* #define FT_CONFIG_OPTIONS_H <myftoptions.h>
59
* #include <freetype/config/ftheader.h>
60
* ```
61
*
62
* will use `$BUILD/myftoptions.h` instead of this file for macro
63
* definitions.
64
*
65
* Note also that you can similarly pre-define the macro
66
* `FT_CONFIG_MODULES_H` used to locate the file listing of the modules
67
* that are statically linked to the library at compile time. By
68
* default, this file is `<freetype/config/ftmodule.h>`.
69
*
70
* We highly recommend using the third method whenever possible.
71
*
72
*/
73
74
75
/*************************************************************************/
76
/*************************************************************************/
77
/**** ****/
78
/**** 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 ****/
79
/**** ****/
80
/*************************************************************************/
81
/*************************************************************************/
82
83
84
/*#************************************************************************
85
*
86
* If you enable this configuration option, FreeType recognizes an
87
* environment variable called `FREETYPE_PROPERTIES`, which can be used to
88
* control the various font drivers and modules. The controllable
89
* properties are listed in the section @properties.
90
*
91
* You have to undefine this configuration option on platforms that lack
92
* the concept of environment variables (and thus don't have the `getenv`
93
* function), for example Windows CE.
94
*
95
* `FREETYPE_PROPERTIES` has the following syntax form (broken here into
96
* multiple lines for better readability).
97
*
98
* ```
99
* <optional whitespace>
100
* <module-name1> ':'
101
* <property-name1> '=' <property-value1>
102
* <whitespace>
103
* <module-name2> ':'
104
* <property-name2> '=' <property-value2>
105
* ...
106
* ```
107
*
108
* Example:
109
*
110
* ```
111
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
112
* cff:no-stem-darkening=1
113
* ```
114
*
115
*/
116
#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
117
118
119
/**************************************************************************
120
*
121
* Uncomment the line below if you want to activate LCD rendering
122
* technology similar to ClearType in this build of the library. This
123
* technology triples the resolution in the direction color subpixels. To
124
* mitigate color fringes inherent to this technology, you also need to
125
* explicitly set up LCD filtering.
126
*
127
* When this macro is not defined, FreeType offers alternative LCD
128
* rendering technology that produces excellent output.
129
*/
130
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
131
132
133
/**************************************************************************
134
*
135
* Many compilers provide a non-ANSI 64-bit data type that can be used by
136
* FreeType to speed up some computations. However, this will create some
137
* problems when compiling the library in strict ANSI mode.
138
*
139
* For this reason, the use of 64-bit integers is normally disabled when
140
* the `__STDC__` macro is defined. You can however disable this by
141
* defining the macro `FT_CONFIG_OPTION_FORCE_INT64` here.
142
*
143
* For most compilers, this will only create compilation warnings when
144
* building the library.
145
*
146
* ObNote: The compiler-specific 64-bit integers are detected in the
147
* file `ftconfig.h` either statically or through the `configure`
148
* script on supported platforms.
149
*/
150
#undef FT_CONFIG_OPTION_FORCE_INT64
151
152
153
/**************************************************************************
154
*
155
* If this macro is defined, do not try to use an assembler version of
156
* performance-critical functions (e.g., @FT_MulFix). You should only do
157
* that to verify that the assembler function works properly, or to execute
158
* benchmark tests of the various implementations.
159
*/
160
/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
161
162
163
/**************************************************************************
164
*
165
* If this macro is defined, try to use an inlined 64-bit or assembler
166
* version of the @FT_MulFix function, which is a 'hotspot' when loading
167
* and hinting glyphs, and which should be executed as fast as possible.
168
*
169
* If your compiler is not C99-compliant or CPU assembly is not supported,
170
* you can disable this option.
171
*/
172
#define FT_CONFIG_OPTION_INLINE_MULFIX
173
174
175
/**************************************************************************
176
*
177
* LZW-compressed file support.
178
*
179
* FreeType now handles font files that have been compressed with the
180
* `compress` program. This is mostly used to parse many of the PCF
181
* files that come with various X11 distributions. The implementation
182
* uses NetBSD's `zopen` to partially uncompress the file on the fly (see
183
* `src/lzw/ftgzip.c`).
184
*
185
* Define this macro if you want to enable this 'feature'.
186
*/
187
#define FT_CONFIG_OPTION_USE_LZW
188
189
190
/**************************************************************************
191
*
192
* Gzip-compressed file support.
193
*
194
* FreeType now handles font files that have been compressed with the
195
* `gzip` program. This is mostly used to parse many of the PCF files
196
* that come with XFree86. The implementation uses 'zlib' to partially
197
* uncompress the file on the fly (see `src/gzip/ftgzip.c`).
198
*
199
* Define this macro if you want to enable this 'feature'. See also the
200
* macro `FT_CONFIG_OPTION_SYSTEM_ZLIB` below.
201
*/
202
#define FT_CONFIG_OPTION_USE_ZLIB
203
204
205
/**************************************************************************
206
*
207
* ZLib library selection
208
*
209
* This macro is only used when `FT_CONFIG_OPTION_USE_ZLIB` is defined.
210
* It allows FreeType's 'ftgzip' component to link to the system's
211
* installation of the ZLib library. This is useful on systems like
212
* Unix or VMS where it generally is already available.
213
*
214
* If you let it undefined, the component will use its own copy of the
215
* zlib sources instead. These have been modified to be included
216
* directly within the component and **not** export external function
217
* names. This allows you to link any program with FreeType _and_ ZLib
218
* without linking conflicts.
219
*
220
* Do not `#undef` this macro here since the build system might define
221
* it for certain configurations only.
222
*
223
* If you use a build system like cmake or the `configure` script,
224
* options set by those programs have precedence, overwriting the value
225
* here with the configured one.
226
*
227
* If you use the GNU make build system directly (that is, without the
228
* `configure` script) and you define this macro, you also have to pass
229
* `SYSTEM_ZLIB=yes` as an argument to make.
230
*/
231
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
232
233
234
/**************************************************************************
235
*
236
* Bzip2-compressed file support.
237
*
238
* FreeType now handles font files that have been compressed with the
239
* `bzip2` program. This is mostly used to parse many of the PCF files
240
* that come with XFree86. The implementation uses `libbz2` to partially
241
* uncompress the file on the fly (see `src/bzip2/ftbzip2.c`). Contrary
242
* to gzip, bzip2 currently is not included and need to use the system
243
* available bzip2 implementation.
244
*
245
* Define this macro if you want to enable this 'feature'.
246
*
247
* If you use a build system like cmake or the `configure` script,
248
* options set by those programs have precedence, overwriting the value
249
* here with the configured one.
250
*/
251
/* #define FT_CONFIG_OPTION_USE_BZIP2 */
252
253
254
/**************************************************************************
255
*
256
* Define to disable the use of file stream functions and types, `FILE`,
257
* `fopen`, etc. Enables the use of smaller system libraries on embedded
258
* systems that have multiple system libraries, some with or without file
259
* stream support, in the cases where file stream support is not necessary
260
* such as memory loading of font files.
261
*/
262
/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */
263
264
265
/**************************************************************************
266
*
267
* PNG bitmap support.
268
*
269
* FreeType now handles loading color bitmap glyphs in the PNG format.
270
* This requires help from the external libpng library. Uncompressed
271
* color bitmaps do not need any external libraries and will be supported
272
* regardless of this configuration.
273
*
274
* Define this macro if you want to enable this 'feature'.
275
*
276
* If you use a build system like cmake or the `configure` script,
277
* options set by those programs have precedence, overwriting the value
278
* here with the configured one.
279
*/
280
/* #define FT_CONFIG_OPTION_USE_PNG */
281
282
283
/**************************************************************************
284
*
285
* HarfBuzz support.
286
*
287
* FreeType uses the HarfBuzz library to improve auto-hinting of OpenType
288
* fonts. If available, many glyphs not directly addressable by a font's
289
* character map will be hinted also.
290
*
291
* Define this macro if you want to enable this 'feature'.
292
*
293
* If you use a build system like cmake or the `configure` script,
294
* options set by those programs have precedence, overwriting the value
295
* here with the configured one.
296
*/
297
/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
298
299
300
/**************************************************************************
301
*
302
* HarfBuzz dynamic support.
303
*
304
* Define this macro if you want the HarfBuzz library to be loaded at
305
* runtime instead of being linked to FreeType.
306
*
307
* This option has no effect if `FT_CONFIG_OPTION_USE_HARFBUZZ` is not
308
* defined.
309
*
310
* When this option is enabled, FreeType will try to load the HarfBuzz
311
* library at runtime, using `dlopen` or `LoadLibrary`, depending on the
312
* platform. On Microsoft platforms, the library name looked up is
313
* `libharfbuzz-0.dll`. On Apple platforms, the library name looked up
314
* is `libharfbuzz.0.dylib`. On all other platforms, the library name
315
* looked up is `libharfbuzz.so.0`. This name can be overridden by
316
* defining the macro `FT_LIBHARFBUZZ` at FreeType compilation time.
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_HARFBUZZ_DYNAMIC */
323
324
325
/**************************************************************************
326
*
327
* Brotli support.
328
*
329
* FreeType uses the Brotli library to provide support for decompressing
330
* WOFF2 streams.
331
*
332
* Define this macro if you want to enable this 'feature'.
333
*
334
* If you use a build system like cmake or the `configure` script,
335
* options set by those programs have precedence, overwriting the value
336
* here with the configured one.
337
*/
338
/* #define FT_CONFIG_OPTION_USE_BROTLI */
339
340
341
/**************************************************************************
342
*
343
* Glyph Postscript Names handling
344
*
345
* By default, FreeType 2 is compiled with the 'psnames' module. This
346
* module is in charge of converting a glyph name string into a Unicode
347
* value, or return a Macintosh standard glyph name for the use with the
348
* TrueType 'post' table.
349
*
350
* Undefine this macro if you do not want 'psnames' compiled in your
351
* build of FreeType. This has the following effects:
352
*
353
* - The TrueType driver will provide its own set of glyph names, if you
354
* build it to support postscript names in the TrueType 'post' table,
355
* but will not synthesize a missing Unicode charmap.
356
*
357
* - The Type~1 driver will not be able to synthesize a Unicode charmap
358
* out of the glyphs found in the fonts.
359
*
360
* You would normally undefine this configuration macro when building a
361
* version of FreeType that doesn't contain a Type~1 or CFF driver.
362
*/
363
#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
364
365
366
/**************************************************************************
367
*
368
* Postscript Names to Unicode Values support
369
*
370
* By default, FreeType~2 is built with the 'psnames' module compiled in.
371
* Among other things, the module is used to convert a glyph name into a
372
* Unicode value. This is especially useful in order to synthesize on
373
* the fly a Unicode charmap from the CFF/Type~1 driver through a big
374
* table named the 'Adobe Glyph List' (AGL).
375
*
376
* Undefine this macro if you do not want the Adobe Glyph List compiled
377
* in your 'psnames' module. The Type~1 driver will not be able to
378
* synthesize a Unicode charmap out of the glyphs found in the fonts.
379
*/
380
#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
381
382
383
/**************************************************************************
384
*
385
* Support for Mac fonts
386
*
387
* Define this macro if you want support for outline fonts in Mac format
388
* (mac dfont, mac resource, macbinary containing a mac resource) on
389
* non-Mac platforms.
390
*
391
* Note that the 'FOND' resource isn't checked.
392
*/
393
#define FT_CONFIG_OPTION_MAC_FONTS
394
395
396
/**************************************************************************
397
*
398
* Guessing methods to access embedded resource forks
399
*
400
* Enable extra Mac fonts support on non-Mac platforms (e.g., GNU/Linux).
401
*
402
* Resource forks which include fonts data are stored sometimes in
403
* locations which users or developers don't expected. In some cases,
404
* resource forks start with some offset from the head of a file. In
405
* other cases, the actual resource fork is stored in file different from
406
* what the user specifies. If this option is activated, FreeType tries
407
* to guess whether such offsets or different file names must be used.
408
*
409
* Note that normal, direct access of resource forks is controlled via
410
* the `FT_CONFIG_OPTION_MAC_FONTS` option.
411
*/
412
#ifdef FT_CONFIG_OPTION_MAC_FONTS
413
#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
414
#endif
415
416
417
/**************************************************************************
418
*
419
* Allow the use of `FT_Incremental_Interface` to load typefaces that
420
* contain no glyph data, but supply it via a callback function. This is
421
* required by clients supporting document formats which supply font data
422
* incrementally as the document is parsed, such as the Ghostscript
423
* interpreter for the PostScript language.
424
*/
425
#define FT_CONFIG_OPTION_INCREMENTAL
426
427
428
/**************************************************************************
429
*
430
* The size in bytes of the render pool used by the scan-line converter to
431
* do all of its work.
432
*/
433
#define FT_RENDER_POOL_SIZE 16384L
434
435
436
/**************************************************************************
437
*
438
* FT_MAX_MODULES
439
*
440
* The maximum number of modules that can be registered in a single
441
* FreeType library object. 32~is the default.
442
*/
443
#define FT_MAX_MODULES 32
444
445
446
/**************************************************************************
447
*
448
* Debug level
449
*
450
* FreeType can be compiled in debug or trace mode. In debug mode,
451
* errors are reported through the 'ftdebug' component. In trace mode,
452
* additional messages are sent to the standard output during execution.
453
*
454
* Define `FT_DEBUG_LEVEL_ERROR` to build the library in debug mode.
455
* Define `FT_DEBUG_LEVEL_TRACE` to build it in trace mode.
456
*
457
* Don't define any of these macros to compile in 'release' mode!
458
*
459
* Do not `#undef` these macros here since the build system might define
460
* them for certain configurations only.
461
*/
462
/* #define FT_DEBUG_LEVEL_ERROR */
463
/* #define FT_DEBUG_LEVEL_TRACE */
464
465
466
/**************************************************************************
467
*
468
* Logging
469
*
470
* Compiling FreeType in debug or trace mode makes FreeType write error
471
* and trace log messages to `stderr`. Enabling this macro
472
* automatically forces the `FT_DEBUG_LEVEL_ERROR` and
473
* `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and
474
* trace log messages to a file instead of `stderr`. For writing logs
475
* to a file, FreeType uses an the external `dlg` library (the source
476
* code is in `src/dlg`).
477
*
478
* This option needs a C99 compiler.
479
*/
480
/* #define FT_DEBUG_LOGGING */
481
482
483
/**************************************************************************
484
*
485
* Autofitter debugging
486
*
487
* If `FT_DEBUG_AUTOFIT` is defined, FreeType provides some means to
488
* control the autofitter behaviour for debugging purposes with global
489
* boolean variables (consequently, you should **never** enable this
490
* while compiling in 'release' mode):
491
*
492
* ```
493
* af_debug_disable_horz_hints_
494
* af_debug_disable_vert_hints_
495
* af_debug_disable_blue_hints_
496
* ```
497
*
498
* Additionally, the following functions provide dumps of various
499
* internal autofit structures to stdout (using `printf`):
500
*
501
* ```
502
* af_glyph_hints_dump_points
503
* af_glyph_hints_dump_segments
504
* af_glyph_hints_dump_edges
505
* af_glyph_hints_get_num_segments
506
* af_glyph_hints_get_segment_offset
507
* ```
508
*
509
* As an argument, they use another global variable:
510
*
511
* ```
512
* af_debug_hints_
513
* ```
514
*
515
* Please have a look at the `ftgrid` demo program to see how those
516
* variables and macros should be used.
517
*
518
* Do not `#undef` these macros here since the build system might define
519
* them for certain configurations only.
520
*/
521
/* #define FT_DEBUG_AUTOFIT */
522
523
524
/**************************************************************************
525
*
526
* Memory Debugging
527
*
528
* FreeType now comes with an integrated memory debugger that is capable
529
* of detecting simple errors like memory leaks or double deletes. To
530
* compile it within your build of the library, you should define
531
* `FT_DEBUG_MEMORY` here.
532
*
533
* Note that the memory debugger is only activated at runtime when when
534
* the _environment_ variable `FT2_DEBUG_MEMORY` is defined also!
535
*
536
* Do not `#undef` this macro here since the build system might define it
537
* for certain configurations only.
538
*/
539
/* #define FT_DEBUG_MEMORY */
540
541
542
/**************************************************************************
543
*
544
* Module errors
545
*
546
* If this macro is set (which is _not_ the default), the higher byte of
547
* an error code gives the module in which the error has occurred, while
548
* the lower byte is the real error code.
549
*
550
* Setting this macro makes sense for debugging purposes only, since it
551
* would break source compatibility of certain programs that use
552
* FreeType~2.
553
*
554
* More details can be found in the files `ftmoderr.h` and `fterrors.h`.
555
*/
556
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
557
558
559
/**************************************************************************
560
*
561
* OpenType SVG Glyph Support
562
*
563
* Setting this macro enables support for OpenType SVG glyphs. By
564
* default, FreeType can only fetch SVG documents. However, it can also
565
* render them if external rendering hook functions are plugged in at
566
* runtime.
567
*
568
* More details on the hooks can be found in file `otsvg.h`.
569
*/
570
#define FT_CONFIG_OPTION_SVG
571
572
573
/**************************************************************************
574
*
575
* Error Strings
576
*
577
* If this macro is set, `FT_Error_String` will return meaningful
578
* descriptions. This is not enabled by default to reduce the overall
579
* size of FreeType.
580
*
581
* More details can be found in the file `fterrors.h`.
582
*/
583
/* #define FT_CONFIG_OPTION_ERROR_STRINGS */
584
585
586
/*************************************************************************/
587
/*************************************************************************/
588
/**** ****/
589
/**** S F N T D R I V E R C O N F I G U R A T I O N ****/
590
/**** ****/
591
/*************************************************************************/
592
/*************************************************************************/
593
594
595
/**************************************************************************
596
*
597
* Define `TT_CONFIG_OPTION_EMBEDDED_BITMAPS` if you want to support
598
* embedded bitmaps in all formats using the 'sfnt' module (namely
599
* TrueType~& OpenType).
600
*/
601
#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
602
603
604
/**************************************************************************
605
*
606
* Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored
607
* outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt'
608
* module (namely TrueType~& OpenType).
609
*/
610
#define TT_CONFIG_OPTION_COLOR_LAYERS
611
612
613
/**************************************************************************
614
*
615
* Define `TT_CONFIG_OPTION_POSTSCRIPT_NAMES` if you want to be able to
616
* load and enumerate Postscript names of glyphs in a TrueType or OpenType
617
* file.
618
*
619
* Note that if you do not compile the 'psnames' module by undefining the
620
* above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` macro, the 'sfnt' module will
621
* contain additional code to read the PostScript name table from a font.
622
*
623
* (By default, the module uses 'psnames' to extract glyph names.)
624
*/
625
#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
626
627
628
/**************************************************************************
629
*
630
* Define `TT_CONFIG_OPTION_SFNT_NAMES` if your applications need to access
631
* the internal name table in a SFNT-based format like TrueType or
632
* OpenType. The name table contains various strings used to describe the
633
* font, like family name, copyright, version, etc. It does not contain
634
* any glyph name though.
635
*
636
* Accessing SFNT names is done through the functions declared in
637
* `ftsnames.h`.
638
*/
639
#define TT_CONFIG_OPTION_SFNT_NAMES
640
641
642
/**************************************************************************
643
*
644
* TrueType CMap support
645
*
646
* Here you can fine-tune which TrueType CMap table format shall be
647
* supported.
648
*/
649
#define TT_CONFIG_CMAP_FORMAT_0
650
#define TT_CONFIG_CMAP_FORMAT_2
651
#define TT_CONFIG_CMAP_FORMAT_4
652
#define TT_CONFIG_CMAP_FORMAT_6
653
#define TT_CONFIG_CMAP_FORMAT_8
654
#define TT_CONFIG_CMAP_FORMAT_10
655
#define TT_CONFIG_CMAP_FORMAT_12
656
#define TT_CONFIG_CMAP_FORMAT_13
657
#define TT_CONFIG_CMAP_FORMAT_14
658
659
660
/*************************************************************************/
661
/*************************************************************************/
662
/**** ****/
663
/**** 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 ****/
664
/**** ****/
665
/*************************************************************************/
666
/*************************************************************************/
667
668
/**************************************************************************
669
*
670
* Define `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` if you want to compile a
671
* bytecode interpreter in the TrueType driver.
672
*
673
* By undefining this, you will only compile the code necessary to load
674
* TrueType glyphs without hinting.
675
*
676
* Do not `#undef` this macro here, since the build system might define it
677
* for certain configurations only.
678
*/
679
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
680
681
682
/**************************************************************************
683
*
684
* Define `TT_CONFIG_OPTION_SUBPIXEL_HINTING` if you want to compile
685
* subpixel hinting support into the TrueType driver. This modifies the
686
* TrueType hinting mechanism when anything but `FT_RENDER_MODE_MONO` is
687
* requested.
688
*
689
* In particular, it modifies the bytecode interpreter to interpret (or
690
* not) instructions in a certain way so that all TrueType fonts look like
691
* they do in a Windows ClearType (DirectWrite) environment. See [1] for a
692
* technical overview on what this means. See `ttinterp.h` for more
693
* details on this option.
694
*
695
* The new default mode focuses on applying a minimal set of rules to all
696
* fonts indiscriminately so that modern and web fonts render well while
697
* legacy fonts render okay. The corresponding interpreter version is v40.
698
* The so-called Infinality mode (v38) is no longer available in FreeType.
699
*
700
* By undefining these, you get rendering behavior like on Windows without
701
* ClearType, i.e., Windows XP without ClearType enabled and Win9x
702
* (interpreter version v35). Or not, depending on how much hinting blood
703
* and testing tears the font designer put into a given font. If you
704
* define one or both subpixel hinting options, you can switch between
705
* between v35 and the ones you define (using `FT_Property_Set`).
706
*
707
* This option requires `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` to be
708
* defined.
709
*
710
* [1]
711
* https://learn.microsoft.com/typography/cleartype/truetypecleartype
712
*/
713
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
714
715
716
/**************************************************************************
717
*
718
* Define `TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED` to compile the
719
* TrueType glyph loader to use Apple's definition of how to handle
720
* component offsets in composite glyphs.
721
*
722
* Apple and MS disagree on the default behavior of component offsets in
723
* composites. Apple says that they should be scaled by the scaling
724
* factors in the transformation matrix (roughly, it's more complex) while
725
* MS says they should not. OpenType defines two bits in the composite
726
* flags array which can be used to disambiguate, but old fonts will not
727
* have them.
728
*
729
* https://learn.microsoft.com/typography/opentype/spec/glyf
730
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html
731
*/
732
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
733
734
735
/**************************************************************************
736
*
737
* Define `TT_CONFIG_OPTION_GX_VAR_SUPPORT` if you want to include support
738
* for Apple's distortable font technology ('fvar', 'gvar', 'cvar', and
739
* 'avar' tables). Tagged 'Font Variations', this is now part of OpenType
740
* also. This has many similarities to Type~1 Multiple Masters support.
741
*/
742
#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
743
744
745
/**************************************************************************
746
*
747
* Define `TT_CONFIG_OPTION_NO_BORING_EXPANSION` if you want to exclude
748
* support for 'boring' OpenType specification expansions.
749
*
750
* https://github.com/harfbuzz/boring-expansion-spec
751
*
752
* Right now, the following features are covered:
753
*
754
* - 'avar' version 2.0
755
*
756
* Most likely, this is a temporary configuration option to be removed in
757
* the near future, since it is assumed that eventually those features are
758
* added to the OpenType standard.
759
*/
760
/* #define TT_CONFIG_OPTION_NO_BORING_EXPANSION */
761
762
763
/**************************************************************************
764
*
765
* Define `TT_CONFIG_OPTION_BDF` if you want to include support for an
766
* embedded 'BDF~' table within SFNT-based bitmap formats.
767
*/
768
#define TT_CONFIG_OPTION_BDF
769
770
771
/**************************************************************************
772
*
773
* Option `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES` controls the maximum
774
* number of bytecode instructions executed for a single run of the
775
* bytecode interpreter, needed to prevent infinite loops. You don't want
776
* to change this except for very special situations (e.g., making a
777
* library fuzzer spend less time to handle broken fonts).
778
*
779
* It is not expected that this value is ever modified by a configuring
780
* script; instead, it gets surrounded with `#ifndef ... #endif` so that
781
* the value can be set as a preprocessor option on the compiler's command
782
* line.
783
*/
784
#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
785
#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
786
#endif
787
788
789
/**************************************************************************
790
*
791
* Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning
792
* implementation (for TrueType and OpenType fonts only). With this
793
* defined, FreeType is able to get kerning pair data from the GPOS 'kern'
794
* feature as well as legacy 'kern' tables; without this defined, FreeType
795
* will only be able to use legacy 'kern' tables.
796
*
797
* Note that FreeType does not support more advanced GPOS layout features;
798
* even the 'kern' feature implemented here doesn't handle more
799
* sophisticated kerning variants. Use a higher-level library like
800
* HarfBuzz instead for that.
801
*/
802
/* #define TT_CONFIG_OPTION_GPOS_KERNING */
803
804
805
/*************************************************************************/
806
/*************************************************************************/
807
/**** ****/
808
/**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
809
/**** ****/
810
/*************************************************************************/
811
/*************************************************************************/
812
813
814
/**************************************************************************
815
*
816
* `T1_MAX_DICT_DEPTH` is the maximum depth of nest dictionaries and arrays
817
* in the Type~1 stream (see `t1load.c`). A minimum of~4 is required.
818
*/
819
#define T1_MAX_DICT_DEPTH 5
820
821
822
/**************************************************************************
823
*
824
* `T1_MAX_SUBRS_CALLS` details the maximum number of nested sub-routine
825
* calls during glyph loading.
826
*/
827
#define T1_MAX_SUBRS_CALLS 16
828
829
830
/**************************************************************************
831
*
832
* `T1_MAX_CHARSTRING_OPERANDS` is the charstring stack's capacity. A
833
* minimum of~16 is required.
834
*
835
* The Chinese font 'MingTiEG-Medium' (covering the CNS 11643 character
836
* set) needs 256.
837
*/
838
#define T1_MAX_CHARSTRINGS_OPERANDS 256
839
840
841
/**************************************************************************
842
*
843
* Define this configuration macro if you want to prevent the compilation
844
* of the 't1afm' module, which is in charge of reading Type~1 AFM files
845
* into an existing face. Note that if set, the Type~1 driver will be
846
* unable to produce kerning distances.
847
*/
848
#undef T1_CONFIG_OPTION_NO_AFM
849
850
851
/**************************************************************************
852
*
853
* Define this configuration macro if you want to prevent the compilation
854
* of the Multiple Masters font support in the Type~1 driver.
855
*/
856
#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
857
858
859
/**************************************************************************
860
*
861
* `T1_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe Type~1
862
* engine gets compiled into FreeType. If defined, it is possible to
863
* switch between the two engines using the `hinting-engine` property of
864
* the 'type1' driver module.
865
*/
866
/* #define T1_CONFIG_OPTION_OLD_ENGINE */
867
868
869
/*************************************************************************/
870
/*************************************************************************/
871
/**** ****/
872
/**** C F F D R I V E R C O N F I G U R A T I O N ****/
873
/**** ****/
874
/*************************************************************************/
875
/*************************************************************************/
876
877
878
/**************************************************************************
879
*
880
* Using `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}` it is
881
* possible to set up the default values of the four control points that
882
* define the stem darkening behaviour of the (new) CFF engine. For more
883
* details please read the documentation of the `darkening-parameters`
884
* property (file `ftdriver.h`), which allows the control at run-time.
885
*
886
* Do **not** undefine these macros!
887
*/
888
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
889
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
890
891
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000
892
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275
893
894
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667
895
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275
896
897
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333
898
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0
899
900
901
/**************************************************************************
902
*
903
* `CFF_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe CFF engine
904
* gets compiled into FreeType. If defined, it is possible to switch
905
* between the two engines using the `hinting-engine` property of the 'cff'
906
* driver module.
907
*/
908
/* #define CFF_CONFIG_OPTION_OLD_ENGINE */
909
910
911
/*************************************************************************/
912
/*************************************************************************/
913
/**** ****/
914
/**** P C F D R I V E R C O N F I G U R A T I O N ****/
915
/**** ****/
916
/*************************************************************************/
917
/*************************************************************************/
918
919
920
/**************************************************************************
921
*
922
* There are many PCF fonts just called 'Fixed' which look completely
923
* different, and which have nothing to do with each other. When selecting
924
* 'Fixed' in KDE or Gnome one gets results that appear rather random, the
925
* style changes often if one changes the size and one cannot select some
926
* fonts at all. This option makes the 'pcf' module prepend the foundry
927
* name (plus a space) to the family name.
928
*
929
* We also check whether we have 'wide' characters; all put together, we
930
* get family names like 'Sony Fixed' or 'Misc Fixed Wide'.
931
*
932
* If this option is activated, it can be controlled with the
933
* `no-long-family-names` property of the 'pcf' driver module.
934
*/
935
/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
936
937
938
/*************************************************************************/
939
/*************************************************************************/
940
/**** ****/
941
/**** 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 ****/
942
/**** ****/
943
/*************************************************************************/
944
/*************************************************************************/
945
946
947
/**************************************************************************
948
*
949
* Compile 'autofit' module with CJK (Chinese, Japanese, Korean) script
950
* support.
951
*/
952
#define AF_CONFIG_OPTION_CJK
953
954
955
/**************************************************************************
956
*
957
* Compile 'autofit' module with fallback Indic script support, covering
958
* some scripts that the 'latin' submodule of the 'autofit' module doesn't
959
* (yet) handle. Currently, this needs option `AF_CONFIG_OPTION_CJK`.
960
*/
961
#ifdef AF_CONFIG_OPTION_CJK
962
#define AF_CONFIG_OPTION_INDIC
963
#endif
964
965
966
/**************************************************************************
967
*
968
* Use TrueType-like size metrics for 'light' auto-hinting.
969
*
970
* It is strongly recommended to avoid this option, which exists only to
971
* help some legacy applications retain its appearance and behaviour with
972
* respect to auto-hinted TrueType fonts.
973
*
974
* The very reason this option exists at all are GNU/Linux distributions
975
* like Fedora that did not un-patch the following change (which was
976
* present in FreeType between versions 2.4.6 and 2.7.1, inclusive).
977
*
978
* ```
979
* 2011-07-16 Steven Chu <steven.f.chu@gmail.com>
980
*
981
* [truetype] Fix metrics on size request for scalable fonts.
982
* ```
983
*
984
* This problematic commit is now reverted (more or less).
985
*/
986
/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */
987
988
/* */
989
990
991
/*
992
* This macro is obsolete. Support has been removed in FreeType version
993
* 2.5.
994
*/
995
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
996
997
998
/*
999
* The next two macros are defined if native TrueType hinting is
1000
* requested by the definitions above. Don't change this.
1001
*/
1002
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
1003
#define TT_USE_BYTECODE_INTERPRETER
1004
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
1005
#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
1006
#endif
1007
#endif
1008
1009
1010
/*
1011
* The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this
1012
* version of FreeType has support for 'COLR' v1 API. This definition is
1013
* useful to FreeType clients that want to build in support for 'COLR' v1
1014
* depending on a tip-of-tree checkout before it is officially released in
1015
* FreeType, and while the feature cannot yet be tested against using
1016
* version macros. Don't change this macro. This may be removed once the
1017
* feature is in a FreeType release version and version macros can be used
1018
* to test for availability.
1019
*/
1020
#ifdef TT_CONFIG_OPTION_COLOR_LAYERS
1021
#define TT_SUPPORT_COLRV1
1022
#endif
1023
1024
1025
/*
1026
* Check CFF darkening parameters. The checks are the same as in function
1027
* `cff_property_set` in file `cffdrivr.c`.
1028
*/
1029
#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
1030
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
1031
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
1032
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
1033
\
1034
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \
1035
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \
1036
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \
1037
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \
1038
\
1039
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \
1040
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \
1041
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \
1042
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \
1043
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \
1044
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \
1045
\
1046
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
1047
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
1048
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
1049
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
1050
#error "Invalid CFF darkening parameters!"
1051
#endif
1052
1053
1054
FT_END_HEADER
1055
1056
#endif
/* FTOPTION_H_ */
1057
1058
1059
/* END */
ft2build.h
freetype
include
freetype
config
ftoption.h
Generated by
1.18.0