• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Instructions on how to build FreeType with your own build tool
2==============================================================
3
4See  the  file `CUSTOMIZE'  to  learn  how  to customize  FreeType  to
5specific environments.
6
7
8I. Standard procedure
9---------------------
10
11  * DISABLE PRE-COMPILED  HEADERS!  This is very  important for Visual
12    C++, because FreeType uses lines like:
13
14      #include FT_FREETYPE_H
15
16    which are not correctly supported by this compiler while being ISO
17    C compliant!
18
19  * You need to add the directory `include' to your  include path when
20    compiling the library.
21
22  * FreeType 2 is made of  several components; each of them is located
23    in    a   subdirectory    of   `freetype2/src'.     For   example,
24    `freetype2/src/truetype/' contains the TrueType font driver.
25
26  * DO NOT COMPILE ALL C FILES!  Rather, compile the following ones.
27
28    -- base components (required)
29
30      src/base/ftsystem.c
31      src/base/ftinit.c
32      src/base/ftdebug.c
33
34      src/base/ftbase.c
35
36      src/base/ftbbox.c       -- recommended, see <ftbbox.h>
37      src/base/ftglyph.c      -- recommended, see <ftglyph.h>
38
39      src/base/ftbdf.c        -- optional, see <ftbdf.h>
40      src/base/ftbitmap.c     -- optional, see <ftbitmap.h>
41      src/base/ftcid.c        -- optional, see <ftcid.h>
42      src/base/ftfstype.c     -- optional
43      src/base/ftgasp.c       -- optional, see <ftgasp.h>
44      src/base/ftgxval.c      -- optional, see <ftgxval.h>
45      src/base/ftmm.c         -- optional, see <ftmm.h>
46      src/base/ftotval.c      -- optional, see <ftotval.h>
47      src/base/ftpatent.c     -- optional
48      src/base/ftpfr.c        -- optional, see <ftpfr.h>
49      src/base/ftstroke.c     -- optional, see <ftstroke.h>
50      src/base/ftsynth.c      -- optional, see <ftsynth.h>
51      src/base/fttype1.c      -- optional, see <t1tables.h>
52      src/base/ftwinfnt.c     -- optional, see <ftwinfnt.h>
53
54      src/base/ftmac.c        -- only on the Macintosh
55
56    -- font drivers (optional; at least one is needed)
57
58      src/bdf/bdf.c           -- BDF font driver
59      src/cff/cff.c           -- CFF/OpenType font driver
60      src/cid/type1cid.c      -- Type 1 CID-keyed font driver
61      src/pcf/pcf.c           -- PCF font driver
62      src/pfr/pfr.c           -- PFR/TrueDoc font driver
63      src/sfnt/sfnt.c         -- SFNT files support
64                                 (TrueType & OpenType)
65      src/truetype/truetype.c -- TrueType font driver
66      src/type1/type1.c       -- Type 1 font driver
67      src/type42/type42.c     -- Type 42 font driver
68      src/winfonts/winfnt.c   -- Windows FONT / FNT font driver
69
70    -- rasterizers (optional; at least one is needed for vector
71       formats)
72
73      src/raster/raster.c     -- monochrome rasterizer
74      src/smooth/smooth.c     -- anti-aliasing rasterizer
75
76    -- auxiliary modules (optional)
77
78      src/autofit/autofit.c   -- auto hinting module
79      src/cache/ftcache.c     -- cache sub-system (in beta)
80      src/gzip/ftgzip.c       -- support for compressed fonts (.gz)
81      src/lzw/ftlzw.c         -- support for compressed fonts (.Z)
82      src/bzip2/ftbzip2.c     -- support for compressed fonts (.bz2)
83      src/gxvalid/gxvalid.c   -- TrueTypeGX/AAT table validation
84      src/otvalid/otvalid.c   -- OpenType table validation
85      src/psaux/psaux.c       -- PostScript Type 1 parsing
86      src/pshinter/pshinter.c -- PS hinting module
87      src/psnames/psnames.c   -- PostScript glyph names support
88
89
90    Notes:
91
92      `ftcache.c'  needs `ftglyph.c'
93      `ftfstype.c' needs `fttype1.c'
94      `ftglyph.c'  needs `ftbitmap.c'
95      `ftstroke.c' needs `ftglyph.c'
96      `ftsynth.c'  needs `ftbitmap.c'
97
98      `cff.c'      needs `sfnt.c', `pshinter.c', and `psnames.c'
99      `truetype.c' needs `sfnt.c' and `psnames.c'
100      `type1.c'    needs `psaux.c' `pshinter.c', and `psnames.c'
101      `type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c'
102      `type42.c'   needs `truetype.c'
103
104      Please consult the central  `include/freetype/config/ftoption.h'
105      configuration file for details on additional libraries necessary
106      for some optional features.
107
108
109  Read the file `CUSTOMIZE' in case  you want to compile only a subset
110  of  the  drivers,  renderers,   and  optional  modules;  a  detailed
111  description of the various base  extension is given in the top-level
112  file `modules.cfg'.
113
114  You are done.  In case of problems, see the archives of the FreeType
115  development mailing list.
116
117
118II. Support for flat-directory compilation
119------------------------------------------
120
121  It is  possible to  put all  FreeType 2 source  files into  a single
122  directory, with the *exception* of the `include' hierarchy.
123
124  1. Copy all files in current directory
125
126      cp freetype2/src/base/*.[hc] .
127      cp freetype2/src/raster1/*.[hc] .
128      cp freetype2/src/smooth/*.[hc] .
129      etc.
130
131  2. Compile sources
132
133      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftsystem.c
134      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftinit.c
135      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftdebug.c
136      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftbase.c
137      etc.
138
139    You don't  need to define  the FT_FLAT_COMPILATION macro  (as this
140    was required in previous releases of FreeType 2).
141
142----------------------------------------------------------------------
143
144Copyright 2003-2018 by
145David Turner, Robert Wilhelm, and Werner Lemberg.
146
147This  file is  part of  the FreeType  project, and  may only  be used,
148modified,  and distributed  under the  terms of  the  FreeType project
149license,  LICENSE.TXT.  By  continuing to  use, modify,  or distribute
150this file you  indicate that you have read  the license and understand
151and accept it fully.
152
153
154--- end of INSTALL.ANY ---
155