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