1 Instructions on how to build FreeType with your own build tool
2 ==============================================================
4 See the file `CUSTOMIZE' to learn how to customize FreeType to
11 * If you use macro names for FreeType header files (while mandatory
12 in earlier versions, this is now optional since FreeType version
13 2.6.1) it is necessary to disable pre-compiled headers. This is
14 very important for Visual C++, because lines like
16 #include FT_FREETYPE_H
18 are not correctly supported by this compiler while being ISO C
21 * You need to add the directory `include' to your include path when
22 compiling the library.
24 * FreeType 2 is made of several components; each of them is located
25 in a subdirectory of `freetype/src'. For example,
26 `freetype/src/truetype/' contains the TrueType font driver.
28 * DO NOT COMPILE ALL C FILES! Rather, compile the following ones.
30 -- base components (required)
38 src/base/ftbbox.c -- recommended, see <ftbbox.h>
39 src/base/ftglyph.c -- recommended, see <ftglyph.h>
41 src/base/ftbdf.c -- optional, see <ftbdf.h>
42 src/base/ftbitmap.c -- optional, see <ftbitmap.h>
43 src/base/ftcid.c -- optional, see <ftcid.h>
44 src/base/ftfstype.c -- optional
45 src/base/ftgasp.c -- optional, see <ftgasp.h>
46 src/base/ftgxval.c -- optional, see <ftgxval.h>
47 src/base/ftmm.c -- optional, see <ftmm.h>
48 src/base/ftotval.c -- optional, see <ftotval.h>
49 src/base/ftpatent.c -- optional
50 src/base/ftpfr.c -- optional, see <ftpfr.h>
51 src/base/ftstroke.c -- optional, see <ftstroke.h>
52 src/base/ftsynth.c -- optional, see <ftsynth.h>
53 src/base/fttype1.c -- optional, see <t1tables.h>
54 src/base/ftwinfnt.c -- optional, see <ftwinfnt.h>
56 src/base/ftmac.c -- only on the Macintosh
58 -- font drivers (optional; at least one is needed)
60 src/bdf/bdf.c -- BDF font driver
61 src/cff/cff.c -- CFF/OpenType font driver
62 src/cid/type1cid.c -- Type 1 CID-keyed font driver
63 src/pcf/pcf.c -- PCF font driver
64 src/pfr/pfr.c -- PFR/TrueDoc font driver
65 src/sfnt/sfnt.c -- SFNT files support
67 src/truetype/truetype.c -- TrueType font driver
68 src/type1/type1.c -- Type 1 font driver
69 src/type42/type42.c -- Type 42 font driver
70 src/winfonts/winfnt.c -- Windows FONT / FNT font driver
72 -- rasterizers (optional; at least one is needed for vector
75 src/raster/raster.c -- monochrome rasterizer
76 src/sdf/sdf.c -- Signed Distance Field driver
77 src/smooth/smooth.c -- anti-aliasing rasterizer
79 -- auxiliary modules (optional)
81 src/autofit/autofit.c -- auto hinting module
82 src/cache/ftcache.c -- cache sub-system (in beta)
83 src/gzip/ftgzip.c -- support for compressed fonts (.gz)
84 src/lzw/ftlzw.c -- support for compressed fonts (.Z)
85 src/bzip2/ftbzip2.c -- support for compressed fonts (.bz2)
86 src/gxvalid/gxvalid.c -- TrueTypeGX/AAT table validation
87 src/otvalid/otvalid.c -- OpenType table validation
88 src/psaux/psaux.c -- PostScript Type 1 parsing
89 src/pshinter/pshinter.c -- PS hinting module
90 src/psnames/psnames.c -- PostScript glyph names support
95 `ftcache.c' needs `ftglyph.c'
96 `ftfstype.c' needs `fttype1.c'
97 `ftglyph.c' needs `ftbitmap.c'
98 `ftstroke.c' needs `ftglyph.c'
99 `ftsynth.c' needs `ftbitmap.c'
101 `cff.c' needs `sfnt.c', `pshinter.c', and `psnames.c'
102 `truetype.c' needs `sfnt.c' and `psnames.c'
103 `type1.c' needs `psaux.c' `pshinter.c', and `psnames.c'
104 `type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c'
105 `type42.c' needs `truetype.c'
107 Please consult the central `include/freetype/config/ftoption.h'
108 configuration file for details on additional libraries necessary
109 for some optional features.
112 Read the file `CUSTOMIZE' in case you want to compile only a subset
113 of the drivers, renderers, and optional modules; a detailed
114 description of the various base extension is given in the top-level
117 You are done. In case of problems, see the archives of the FreeType
118 development mailing list.
121 II. Support for flat-directory compilation
122 ------------------------------------------
124 It is possible to put all FreeType 2 source files into a single
125 directory, with the *exception* of the `include' hierarchy.
127 1. Copy all files in current directory
129 cp freetype/src/base/*.[hc] .
130 cp freetype/src/raster1/*.[hc] .
131 cp freetype/src/smooth/*.[hc] .
136 cc -c -Iinclude -DFT2_BUILD_LIBRARY ftsystem.c
137 cc -c -Iinclude -DFT2_BUILD_LIBRARY ftinit.c
138 cc -c -Iinclude -DFT2_BUILD_LIBRARY ftdebug.c
139 cc -c -Iinclude -DFT2_BUILD_LIBRARY ftbase.c
142 You don't need to define the FT_FLAT_COMPILATION macro (as this
143 was required in previous releases of FreeType 2).
145 ----------------------------------------------------------------------
147 Copyright (C) 2003-2023 by
148 David Turner, Robert Wilhelm, and Werner Lemberg.
150 This file is part of the FreeType project, and may only be used,
151 modified, and distributed under the terms of the FreeType project
152 license, LICENSE.TXT. By continuing to use, modify, or distribute
153 this file you indicate that you have read the license and understand
157 --- end of INSTALL.ANY ---