• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  *
3  * ftheader.h
4  *
5  *   Build macros of the FreeType 2 library.
6  *
7  * Copyright (C) 1996-2023 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 #ifndef FTHEADER_H_
19 #define FTHEADER_H_
20 
21 
22   /*@***********************************************************************/
23   /*                                                                       */
24   /* <Macro>                                                               */
25   /*    FT_BEGIN_HEADER                                                    */
26   /*                                                                       */
27   /* <Description>                                                         */
28   /*    This macro is used in association with @FT_END_HEADER in header    */
29   /*    files to ensure that the declarations within are properly          */
30   /*    encapsulated in an `extern "C" { .. }` block when included from a  */
31   /*    C++ compiler.                                                      */
32   /*                                                                       */
33 #ifndef FT_BEGIN_HEADER
34 #  ifdef __cplusplus
35 #    define FT_BEGIN_HEADER  extern "C" {
36 #  else
37 #  define FT_BEGIN_HEADER  /* nothing */
38 #  endif
39 #endif
40 
41 
42   /*@***********************************************************************/
43   /*                                                                       */
44   /* <Macro>                                                               */
45   /*    FT_END_HEADER                                                      */
46   /*                                                                       */
47   /* <Description>                                                         */
48   /*    This macro is used in association with @FT_BEGIN_HEADER in header  */
49   /*    files to ensure that the declarations within are properly          */
50   /*    encapsulated in an `extern "C" { .. }` block when included from a  */
51   /*    C++ compiler.                                                      */
52   /*                                                                       */
53 #ifndef FT_END_HEADER
54 #  ifdef __cplusplus
55 #    define FT_END_HEADER  }
56 #  else
57 #   define FT_END_HEADER  /* nothing */
58 #  endif
59 #endif
60 
61 
62   /**************************************************************************
63    *
64    * Aliases for the FreeType 2 public and configuration files.
65    *
66    */
67 
68   /**************************************************************************
69    *
70    * @section:
71    *   header_file_macros
72    *
73    * @title:
74    *   Header File Macros
75    *
76    * @abstract:
77    *   Macro definitions used to `#include` specific header files.
78    *
79    * @description:
80    *   In addition to the normal scheme of including header files like
81    *
82    *   ```
83    *     #include <freetype/freetype.h>
84    *     #include <freetype/ftmm.h>
85    *     #include <freetype/ftglyph.h>
86    *   ```
87    *
88    *   it is possible to used named macros instead.  They can be used
89    *   directly in `#include` statements as in
90    *
91    *   ```
92    *     #include FT_FREETYPE_H
93    *     #include FT_MULTIPLE_MASTERS_H
94    *     #include FT_GLYPH_H
95    *   ```
96    *
97    *   These macros were introduced to overcome the infamous 8.3~naming rule
98    *   required by DOS (and `FT_MULTIPLE_MASTERS_H` is a lot more meaningful
99    *   than `ftmm.h`).
100    *
101    */
102 
103 
104   /* configuration files */
105 
106   /**************************************************************************
107    *
108    * @macro:
109    *   FT_CONFIG_CONFIG_H
110    *
111    * @description:
112    *   A macro used in `#include` statements to name the file containing
113    *   FreeType~2 configuration data.
114    *
115    */
116 #ifndef FT_CONFIG_CONFIG_H
117 #define FT_CONFIG_CONFIG_H  <freetype/config/ftconfig.h>
118 #endif
119 
120 
121   /**************************************************************************
122    *
123    * @macro:
124    *   FT_CONFIG_STANDARD_LIBRARY_H
125    *
126    * @description:
127    *   A macro used in `#include` statements to name the file containing
128    *   FreeType~2 interface to the standard C library functions.
129    *
130    */
131 #ifndef FT_CONFIG_STANDARD_LIBRARY_H
132 #define FT_CONFIG_STANDARD_LIBRARY_H  <freetype/config/ftstdlib.h>
133 #endif
134 
135 
136   /**************************************************************************
137    *
138    * @macro:
139    *   FT_CONFIG_OPTIONS_H
140    *
141    * @description:
142    *   A macro used in `#include` statements to name the file containing
143    *   FreeType~2 project-specific configuration options.
144    *
145    */
146 #ifndef FT_CONFIG_OPTIONS_H
147 #define FT_CONFIG_OPTIONS_H  <freetype/config/ftoption.h>
148 #endif
149 
150 
151   /**************************************************************************
152    *
153    * @macro:
154    *   FT_CONFIG_MODULES_H
155    *
156    * @description:
157    *   A macro used in `#include` statements to name the file containing the
158    *   list of FreeType~2 modules that are statically linked to new library
159    *   instances in @FT_Init_FreeType.
160    *
161    */
162 #ifndef FT_CONFIG_MODULES_H
163 #define FT_CONFIG_MODULES_H  <freetype/config/ftmodule.h>
164 #endif
165 
166   /* */
167 
168   /* public headers */
169 
170   /**************************************************************************
171    *
172    * @macro:
173    *   FT_FREETYPE_H
174    *
175    * @description:
176    *   A macro used in `#include` statements to name the file containing the
177    *   base FreeType~2 API.
178    *
179    */
180 #define FT_FREETYPE_H  <freetype/freetype.h>
181 
182 
183   /**************************************************************************
184    *
185    * @macro:
186    *   FT_ERRORS_H
187    *
188    * @description:
189    *   A macro used in `#include` statements to name the file containing the
190    *   list of FreeType~2 error codes (and messages).
191    *
192    *   It is included by @FT_FREETYPE_H.
193    *
194    */
195 #define FT_ERRORS_H  <freetype/fterrors.h>
196 
197 
198   /**************************************************************************
199    *
200    * @macro:
201    *   FT_MODULE_ERRORS_H
202    *
203    * @description:
204    *   A macro used in `#include` statements to name the file containing the
205    *   list of FreeType~2 module error offsets (and messages).
206    *
207    */
208 #define FT_MODULE_ERRORS_H  <freetype/ftmoderr.h>
209 
210 
211   /**************************************************************************
212    *
213    * @macro:
214    *   FT_SYSTEM_H
215    *
216    * @description:
217    *   A macro used in `#include` statements to name the file containing the
218    *   FreeType~2 interface to low-level operations (i.e., memory management
219    *   and stream i/o).
220    *
221    *   It is included by @FT_FREETYPE_H.
222    *
223    */
224 #define FT_SYSTEM_H  <freetype/ftsystem.h>
225 
226 
227   /**************************************************************************
228    *
229    * @macro:
230    *   FT_IMAGE_H
231    *
232    * @description:
233    *   A macro used in `#include` statements to name the file containing type
234    *   definitions related to glyph images (i.e., bitmaps, outlines,
235    *   scan-converter parameters).
236    *
237    *   It is included by @FT_FREETYPE_H.
238    *
239    */
240 #define FT_IMAGE_H  <freetype/ftimage.h>
241 
242 
243   /**************************************************************************
244    *
245    * @macro:
246    *   FT_TYPES_H
247    *
248    * @description:
249    *   A macro used in `#include` statements to name the file containing the
250    *   basic data types defined by FreeType~2.
251    *
252    *   It is included by @FT_FREETYPE_H.
253    *
254    */
255 #define FT_TYPES_H  <freetype/fttypes.h>
256 
257 
258   /**************************************************************************
259    *
260    * @macro:
261    *   FT_LIST_H
262    *
263    * @description:
264    *   A macro used in `#include` statements to name the file containing the
265    *   list management API of FreeType~2.
266    *
267    *   (Most applications will never need to include this file.)
268    *
269    */
270 #define FT_LIST_H  <freetype/ftlist.h>
271 
272 
273   /**************************************************************************
274    *
275    * @macro:
276    *   FT_OUTLINE_H
277    *
278    * @description:
279    *   A macro used in `#include` statements to name the file containing the
280    *   scalable outline management API of FreeType~2.
281    *
282    */
283 #define FT_OUTLINE_H  <freetype/ftoutln.h>
284 
285 
286   /**************************************************************************
287    *
288    * @macro:
289    *   FT_SIZES_H
290    *
291    * @description:
292    *   A macro used in `#include` statements to name the file containing the
293    *   API which manages multiple @FT_Size objects per face.
294    *
295    */
296 #define FT_SIZES_H  <freetype/ftsizes.h>
297 
298 
299   /**************************************************************************
300    *
301    * @macro:
302    *   FT_MODULE_H
303    *
304    * @description:
305    *   A macro used in `#include` statements to name the file containing the
306    *   module management API of FreeType~2.
307    *
308    */
309 #define FT_MODULE_H  <freetype/ftmodapi.h>
310 
311 
312   /**************************************************************************
313    *
314    * @macro:
315    *   FT_RENDER_H
316    *
317    * @description:
318    *   A macro used in `#include` statements to name the file containing the
319    *   renderer module management API of FreeType~2.
320    *
321    */
322 #define FT_RENDER_H  <freetype/ftrender.h>
323 
324 
325   /**************************************************************************
326    *
327    * @macro:
328    *   FT_DRIVER_H
329    *
330    * @description:
331    *   A macro used in `#include` statements to name the file containing
332    *   structures and macros related to the driver modules.
333    *
334    */
335 #define FT_DRIVER_H  <freetype/ftdriver.h>
336 
337 
338   /**************************************************************************
339    *
340    * @macro:
341    *   FT_AUTOHINTER_H
342    *
343    * @description:
344    *   A macro used in `#include` statements to name the file containing
345    *   structures and macros related to the auto-hinting module.
346    *
347    *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
348    *
349    */
350 #define FT_AUTOHINTER_H  FT_DRIVER_H
351 
352 
353   /**************************************************************************
354    *
355    * @macro:
356    *   FT_CFF_DRIVER_H
357    *
358    * @description:
359    *   A macro used in `#include` statements to name the file containing
360    *   structures and macros related to the CFF driver module.
361    *
362    *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
363    *
364    */
365 #define FT_CFF_DRIVER_H  FT_DRIVER_H
366 
367 
368   /**************************************************************************
369    *
370    * @macro:
371    *   FT_TRUETYPE_DRIVER_H
372    *
373    * @description:
374    *   A macro used in `#include` statements to name the file containing
375    *   structures and macros related to the TrueType driver module.
376    *
377    *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
378    *
379    */
380 #define FT_TRUETYPE_DRIVER_H  FT_DRIVER_H
381 
382 
383   /**************************************************************************
384    *
385    * @macro:
386    *   FT_PCF_DRIVER_H
387    *
388    * @description:
389    *   A macro used in `#include` statements to name the file containing
390    *   structures and macros related to the PCF driver module.
391    *
392    *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
393    *
394    */
395 #define FT_PCF_DRIVER_H  FT_DRIVER_H
396 
397 
398   /**************************************************************************
399    *
400    * @macro:
401    *   FT_TYPE1_TABLES_H
402    *
403    * @description:
404    *   A macro used in `#include` statements to name the file containing the
405    *   types and API specific to the Type~1 format.
406    *
407    */
408 #define FT_TYPE1_TABLES_H  <freetype/t1tables.h>
409 
410 
411   /**************************************************************************
412    *
413    * @macro:
414    *   FT_TRUETYPE_IDS_H
415    *
416    * @description:
417    *   A macro used in `#include` statements to name the file containing the
418    *   enumeration values which identify name strings, languages, encodings,
419    *   etc.  This file really contains a _large_ set of constant macro
420    *   definitions, taken from the TrueType and OpenType specifications.
421    *
422    */
423 #define FT_TRUETYPE_IDS_H  <freetype/ttnameid.h>
424 
425 
426   /**************************************************************************
427    *
428    * @macro:
429    *   FT_TRUETYPE_TABLES_H
430    *
431    * @description:
432    *   A macro used in `#include` statements to name the file containing the
433    *   types and API specific to the TrueType (as well as OpenType) format.
434    *
435    */
436 #define FT_TRUETYPE_TABLES_H  <freetype/tttables.h>
437 
438 
439   /**************************************************************************
440    *
441    * @macro:
442    *   FT_TRUETYPE_TAGS_H
443    *
444    * @description:
445    *   A macro used in `#include` statements to name the file containing the
446    *   definitions of TrueType four-byte 'tags' which identify blocks in
447    *   SFNT-based font formats (i.e., TrueType and OpenType).
448    *
449    */
450 #define FT_TRUETYPE_TAGS_H  <freetype/tttags.h>
451 
452 
453   /**************************************************************************
454    *
455    * @macro:
456    *   FT_BDF_H
457    *
458    * @description:
459    *   A macro used in `#include` statements to name the file containing the
460    *   definitions of an API which accesses BDF-specific strings from a face.
461    *
462    */
463 #define FT_BDF_H  <freetype/ftbdf.h>
464 
465 
466   /**************************************************************************
467    *
468    * @macro:
469    *   FT_CID_H
470    *
471    * @description:
472    *   A macro used in `#include` statements to name the file containing the
473    *   definitions of an API which access CID font information from a face.
474    *
475    */
476 #define FT_CID_H  <freetype/ftcid.h>
477 
478 
479   /**************************************************************************
480    *
481    * @macro:
482    *   FT_GZIP_H
483    *
484    * @description:
485    *   A macro used in `#include` statements to name the file containing the
486    *   definitions of an API which supports gzip-compressed files.
487    *
488    */
489 #define FT_GZIP_H  <freetype/ftgzip.h>
490 
491 
492   /**************************************************************************
493    *
494    * @macro:
495    *   FT_LZW_H
496    *
497    * @description:
498    *   A macro used in `#include` statements to name the file containing the
499    *   definitions of an API which supports LZW-compressed files.
500    *
501    */
502 #define FT_LZW_H  <freetype/ftlzw.h>
503 
504 
505   /**************************************************************************
506    *
507    * @macro:
508    *   FT_BZIP2_H
509    *
510    * @description:
511    *   A macro used in `#include` statements to name the file containing the
512    *   definitions of an API which supports bzip2-compressed files.
513    *
514    */
515 #define FT_BZIP2_H  <freetype/ftbzip2.h>
516 
517 
518   /**************************************************************************
519    *
520    * @macro:
521    *   FT_WINFONTS_H
522    *
523    * @description:
524    *   A macro used in `#include` statements to name the file containing the
525    *   definitions of an API which supports Windows FNT files.
526    *
527    */
528 #define FT_WINFONTS_H   <freetype/ftwinfnt.h>
529 
530 
531   /**************************************************************************
532    *
533    * @macro:
534    *   FT_GLYPH_H
535    *
536    * @description:
537    *   A macro used in `#include` statements to name the file containing the
538    *   API of the optional glyph management component.
539    *
540    */
541 #define FT_GLYPH_H  <freetype/ftglyph.h>
542 
543 
544   /**************************************************************************
545    *
546    * @macro:
547    *   FT_BITMAP_H
548    *
549    * @description:
550    *   A macro used in `#include` statements to name the file containing the
551    *   API of the optional bitmap conversion component.
552    *
553    */
554 #define FT_BITMAP_H  <freetype/ftbitmap.h>
555 
556 
557   /**************************************************************************
558    *
559    * @macro:
560    *   FT_BBOX_H
561    *
562    * @description:
563    *   A macro used in `#include` statements to name the file containing the
564    *   API of the optional exact bounding box computation routines.
565    *
566    */
567 #define FT_BBOX_H  <freetype/ftbbox.h>
568 
569 
570   /**************************************************************************
571    *
572    * @macro:
573    *   FT_CACHE_H
574    *
575    * @description:
576    *   A macro used in `#include` statements to name the file containing the
577    *   API of the optional FreeType~2 cache sub-system.
578    *
579    */
580 #define FT_CACHE_H  <freetype/ftcache.h>
581 
582 
583   /**************************************************************************
584    *
585    * @macro:
586    *   FT_MAC_H
587    *
588    * @description:
589    *   A macro used in `#include` statements to name the file containing the
590    *   Macintosh-specific FreeType~2 API.  The latter is used to access fonts
591    *   embedded in resource forks.
592    *
593    *   This header file must be explicitly included by client applications
594    *   compiled on the Mac (note that the base API still works though).
595    *
596    */
597 #define FT_MAC_H  <freetype/ftmac.h>
598 
599 
600   /**************************************************************************
601    *
602    * @macro:
603    *   FT_MULTIPLE_MASTERS_H
604    *
605    * @description:
606    *   A macro used in `#include` statements to name the file containing the
607    *   optional multiple-masters management API of FreeType~2.
608    *
609    */
610 #define FT_MULTIPLE_MASTERS_H  <freetype/ftmm.h>
611 
612 
613   /**************************************************************************
614    *
615    * @macro:
616    *   FT_SFNT_NAMES_H
617    *
618    * @description:
619    *   A macro used in `#include` statements to name the file containing the
620    *   optional FreeType~2 API which accesses embedded 'name' strings in
621    *   SFNT-based font formats (i.e., TrueType and OpenType).
622    *
623    */
624 #define FT_SFNT_NAMES_H  <freetype/ftsnames.h>
625 
626 
627   /**************************************************************************
628    *
629    * @macro:
630    *   FT_OPENTYPE_VALIDATE_H
631    *
632    * @description:
633    *   A macro used in `#include` statements to name the file containing the
634    *   optional FreeType~2 API which validates OpenType tables ('BASE',
635    *   'GDEF', 'GPOS', 'GSUB', 'JSTF').
636    *
637    */
638 #define FT_OPENTYPE_VALIDATE_H  <freetype/ftotval.h>
639 
640 
641   /**************************************************************************
642    *
643    * @macro:
644    *   FT_GX_VALIDATE_H
645    *
646    * @description:
647    *   A macro used in `#include` statements to name the file containing the
648    *   optional FreeType~2 API which validates TrueTypeGX/AAT tables ('feat',
649    *   'mort', 'morx', 'bsln', 'just', 'kern', 'opbd', 'trak', 'prop').
650    *
651    */
652 #define FT_GX_VALIDATE_H  <freetype/ftgxval.h>
653 
654 
655   /**************************************************************************
656    *
657    * @macro:
658    *   FT_PFR_H
659    *
660    * @description:
661    *   A macro used in `#include` statements to name the file containing the
662    *   FreeType~2 API which accesses PFR-specific data.
663    *
664    */
665 #define FT_PFR_H  <freetype/ftpfr.h>
666 
667 
668   /**************************************************************************
669    *
670    * @macro:
671    *   FT_STROKER_H
672    *
673    * @description:
674    *   A macro used in `#include` statements to name the file containing the
675    *   FreeType~2 API which provides functions to stroke outline paths.
676    */
677 #define FT_STROKER_H  <freetype/ftstroke.h>
678 
679 
680   /**************************************************************************
681    *
682    * @macro:
683    *   FT_SYNTHESIS_H
684    *
685    * @description:
686    *   A macro used in `#include` statements to name the file containing the
687    *   FreeType~2 API which performs artificial obliquing and emboldening.
688    */
689 #define FT_SYNTHESIS_H  <freetype/ftsynth.h>
690 
691 
692   /**************************************************************************
693    *
694    * @macro:
695    *   FT_FONT_FORMATS_H
696    *
697    * @description:
698    *   A macro used in `#include` statements to name the file containing the
699    *   FreeType~2 API which provides functions specific to font formats.
700    */
701 #define FT_FONT_FORMATS_H  <freetype/ftfntfmt.h>
702 
703   /* deprecated */
704 #define FT_XFREE86_H  FT_FONT_FORMATS_H
705 
706 
707   /**************************************************************************
708    *
709    * @macro:
710    *   FT_TRIGONOMETRY_H
711    *
712    * @description:
713    *   A macro used in `#include` statements to name the file containing the
714    *   FreeType~2 API which performs trigonometric computations (e.g.,
715    *   cosines and arc tangents).
716    */
717 #define FT_TRIGONOMETRY_H  <freetype/fttrigon.h>
718 
719 
720   /**************************************************************************
721    *
722    * @macro:
723    *   FT_LCD_FILTER_H
724    *
725    * @description:
726    *   A macro used in `#include` statements to name the file containing the
727    *   FreeType~2 API which performs color filtering for subpixel rendering.
728    */
729 #define FT_LCD_FILTER_H  <freetype/ftlcdfil.h>
730 
731 
732   /**************************************************************************
733    *
734    * @macro:
735    *   FT_INCREMENTAL_H
736    *
737    * @description:
738    *   A macro used in `#include` statements to name the file containing the
739    *   FreeType~2 API which performs incremental glyph loading.
740    */
741 #define FT_INCREMENTAL_H  <freetype/ftincrem.h>
742 
743 
744   /**************************************************************************
745    *
746    * @macro:
747    *   FT_GASP_H
748    *
749    * @description:
750    *   A macro used in `#include` statements to name the file containing the
751    *   FreeType~2 API which returns entries from the TrueType GASP table.
752    */
753 #define FT_GASP_H  <freetype/ftgasp.h>
754 
755 
756   /**************************************************************************
757    *
758    * @macro:
759    *   FT_ADVANCES_H
760    *
761    * @description:
762    *   A macro used in `#include` statements to name the file containing the
763    *   FreeType~2 API which returns individual and ranged glyph advances.
764    */
765 #define FT_ADVANCES_H  <freetype/ftadvanc.h>
766 
767 
768   /**************************************************************************
769    *
770    * @macro:
771    *   FT_COLOR_H
772    *
773    * @description:
774    *   A macro used in `#include` statements to name the file containing the
775    *   FreeType~2 API which handles the OpenType 'CPAL' table.
776    */
777 #define FT_COLOR_H  <freetype/ftcolor.h>
778 
779 
780   /**************************************************************************
781    *
782    * @macro:
783    *   FT_OTSVG_H
784    *
785    * @description:
786    *   A macro used in `#include` statements to name the file containing the
787    *   FreeType~2 API which handles the OpenType 'SVG~' glyphs.
788    */
789 #define FT_OTSVG_H  <freetype/otsvg.h>
790 
791 
792   /* */
793 
794   /* These header files don't need to be included by the user. */
795 #define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.h>
796 #define FT_PARAMETER_TAGS_H     <freetype/ftparams.h>
797 
798   /* Deprecated macros. */
799 #define FT_UNPATENTED_HINTING_H   <freetype/ftparams.h>
800 #define FT_TRUETYPE_UNPATENTED_H  <freetype/ftparams.h>
801 
802   /* `FT_CACHE_H` is the only header file needed for the cache subsystem. */
803 #define FT_CACHE_IMAGE_H          FT_CACHE_H
804 #define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H
805 #define FT_CACHE_CHARMAP_H        FT_CACHE_H
806 
807   /* The internals of the cache sub-system are no longer exposed.  We */
808   /* default to `FT_CACHE_H` at the moment just in case, but we know  */
809   /* of no rogue client that uses them.                               */
810   /*                                                                  */
811 #define FT_CACHE_MANAGER_H           FT_CACHE_H
812 #define FT_CACHE_INTERNAL_MRU_H      FT_CACHE_H
813 #define FT_CACHE_INTERNAL_MANAGER_H  FT_CACHE_H
814 #define FT_CACHE_INTERNAL_CACHE_H    FT_CACHE_H
815 #define FT_CACHE_INTERNAL_GLYPH_H    FT_CACHE_H
816 #define FT_CACHE_INTERNAL_IMAGE_H    FT_CACHE_H
817 #define FT_CACHE_INTERNAL_SBITS_H    FT_CACHE_H
818 
819 /* TODO(david): Move this section below to a different header */
820 #ifdef FT2_BUILD_LIBRARY
821 #if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
822 
823   /* We disable the warning `conditional expression is constant' here */
824   /* in order to compile cleanly with the maximum level of warnings.  */
825   /* In particular, the warning complains about stuff like `while(0)' */
826   /* which is very useful in macro definitions.  There is no benefit  */
827   /* in having it enabled.                                            */
828 #pragma warning( disable : 4127 )
829 
830 #endif /* _MSC_VER */
831 #endif /* FT2_BUILD_LIBRARY */
832 
833 #endif /* FTHEADER_H_ */
834 
835 
836 /* END */
837