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> |
| 41 | src/base/ftmm.c -- optional, see <freetype/ftmm.h> |
| 42 | src/base/ftpfr.c -- optional, see <freetype/ftpfr.h> |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 43 | src/base/ftwinfnt.c -- optional, see <freetype/ftwinfnt.h> |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 44 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 45 | src/base/ftmac.c -- only on the Macintosh |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 46 | |
Werner Lemberg | 2b428d5 | 2005-10-15 05:49:31 +0000 | [diff] [blame^] | 47 | -- font drivers (optional; at least one is needed) |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 48 | |
| 49 | src/bdf/bdf.c -- BDF font driver |
| 50 | src/cff/cff.c -- CFF/OpenType font driver |
| 51 | src/cid/type1cid.c -- Type 1 CID-keyed font driver |
| 52 | src/pcf/pcf.c -- PCF font driver |
| 53 | src/pfr/pfr.c -- PFR/TrueDoc font driver |
| 54 | src/sfnt/sfnt.c -- SFNT files support |
| 55 | (TrueType & OpenType) |
| 56 | src/truetype/truetype.c -- TrueType font driver |
| 57 | src/type1/type1.c -- Type 1 font driver |
| 58 | src/type42/type42.c -- Type 42 font driver |
| 59 | src/winfonts/winfonts.c -- Windows FONT / FNT font driver |
| 60 | |
Werner Lemberg | 2b428d5 | 2005-10-15 05:49:31 +0000 | [diff] [blame^] | 61 | -- rasterizers (optional; at least one is needed for vector formats) |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 62 | |
Werner Lemberg | 2b428d5 | 2005-10-15 05:49:31 +0000 | [diff] [blame^] | 63 | src/raster/raster.c -- monochrome rasterizer |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 64 | src/smooth/smooth.c -- anti-aliasing rasterizer |
| 65 | |
| 66 | -- auxiliary modules (optional) |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 67 | |
Werner Lemberg | a37745b | 2005-03-23 16:45:24 +0000 | [diff] [blame] | 68 | src/autofit/autofit.c -- auto hinting module |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 69 | src/cache/ftcache.c -- cache sub-system (in beta) |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 70 | src/gzip/ftgzip.c -- support for compressed fonts (.gz) |
| 71 | src/lzw/ftlzw.c -- support for compressed fonts (.Z) |
Suzuki, Toshiya (鈴木俊哉) | a438621 | 2005-08-24 04:31:31 +0000 | [diff] [blame] | 72 | src/gxvalid/gxvalid.c -- TrueTypeGX/AAT table validation |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 73 | src/otvalid/otvalid.c -- OpenType table validation |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 74 | src/psaux/psaux.c -- PostScript Type 1 parsing |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 75 | src/pshinter/pshinter.c -- PS hinting module |
| 76 | src/psnames/psnames.c -- PostScript glyph names support |
| 77 | |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 78 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 79 | Notes: |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 80 | |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 81 | `cff.c' needs `sfnt.c', `pshinter.c', and `psnames.c' |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 82 | `truetype.c' needs `sfnt.c' and `psnames.c' |
Werner Lemberg | f20a4d3 | 2005-08-10 13:24:51 +0000 | [diff] [blame] | 83 | `type1.c' needs `psaux.c' `pshinter.c', and `psnames.c' |
| 84 | `type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c' |
| 85 | `type42.c' needs `truetype.c' |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 86 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 87 | |
Werner Lemberg | a723526 | 2005-08-30 00:22:46 +0000 | [diff] [blame] | 88 | Read the file `CUSTOMIZE' in case you want to compile only a subset of |
| 89 | the drivers, renderers, and optional modules. |
| 90 | |
| 91 | 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] | 92 | development mailing list. |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 93 | |
| 94 | |
| 95 | II. Support for flat-directory compilation |
| 96 | ------------------------------------------ |
| 97 | |
Werner Lemberg | a723526 | 2005-08-30 00:22:46 +0000 | [diff] [blame] | 98 | 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] | 99 | directory, with the *exception* of the `include' hierarchy. |
| 100 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 101 | 1. Copy all files in current directory |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 102 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 103 | cp freetype2/src/base/*.[hc] . |
| 104 | cp freetype2/src/raster1/*.[hc] . |
| 105 | cp freetype2/src/smooth/*.[hc] . |
| 106 | etc. |
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 | 2. Compile sources |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 109 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 110 | cc -c -Ifreetype2/include ftsystem.c |
| 111 | cc -c -Ifreetype2/include ftinit.c |
| 112 | cc -c -Ifreetype2/include ftdebug.c |
| 113 | cc -c -Ifreetype2/include ftbase.c |
| 114 | etc. |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 115 | |
Werner Lemberg | a723526 | 2005-08-30 00:22:46 +0000 | [diff] [blame] | 116 | You don't need to define the FT_FLAT_COMPILATION macro (as this was |
| 117 | required in previous releases of FreeType 2). |
David Turner | 66cbc20 | 2003-03-20 07:04:40 +0000 | [diff] [blame] | 118 | |
Werner Lemberg | a723526 | 2005-08-30 00:22:46 +0000 | [diff] [blame] | 119 | ------------------------------------------------------------------------ |
Werner Lemberg | 56c368c | 2005-06-04 23:00:25 +0000 | [diff] [blame] | 120 | |
| 121 | Copyright 2003, 2005 by |
| 122 | David Turner, Robert Wilhelm, and Werner Lemberg. |
| 123 | |
Werner Lemberg | a723526 | 2005-08-30 00:22:46 +0000 | [diff] [blame] | 124 | This file is part of the FreeType project, and may only be used, |
| 125 | modified, and distributed under the terms of the FreeType project |
| 126 | license, LICENSE.TXT. By continuing to use, modify, or distribute this |
| 127 | file you indicate that you have read the license and understand and |
| 128 | accept it fully. |
Werner Lemberg | 56c368c | 2005-06-04 23:00:25 +0000 | [diff] [blame] | 129 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 130 | |
| 131 | --- end of INSTALL.ANY --- |