updated, formatted
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
diff --git a/docs/BUILD b/docs/BUILD
index e12b8db..b25813a 100644
--- a/docs/BUILD
+++ b/docs/BUILD
@@ -1,80 +1,80 @@
+ FreeType 2 compilation how-to
+ =============================
- FreeType 2 compilation how-to
- =============================
+Introduction
+------------
-Introduction:
-
-Welcome to this version of the FreeType 2 library. You'll find in this
-document instructions on how to compile the library on your favorite
-platform.
+Welcome to the FreeType 2 library. You'll find in this document
+instructions on how to compile the library on your favorite platform.
I. QUICK COMMAND-LINE GUIDE
---------------------------
- Install GNU Make, then try the following on Unix or any system with gcc:
+ Install GNU Make, then try the following on Unix or any system with
+ gcc:
- make // this will setup the build
- make // this will build the library
+ make // this will setup the build
+ make // this will build the library
On Win32 + Visual C++:
- make setup visualc // setup the build for VisualC++ on Win32
- make // build the library
+ make setup visualc // setup the build for VisualC++ on Win32
+ make // build the library
- Then, go to the "demos" directory and type
+ Then, go to the `demos' directory and type
- make
+ make
- Note that on Unix, the first "make" invocation will run a configure
- script (which is located in "freetype2/builds/unix/". You can also
+ Note that on Unix, the first `make' invocation will run a configure
+ script (which is located in `freetype2/builds/unix/'. You can also
pass parameters to this script with the CFG variable, as in:
- make CFG="--prefix=/usr/local"
- make
+ make CFG="--prefix=/usr/local"
+ make
If this doesn't work, read the following.
-
II. COMMAND-LINE COMPILATION
----------------------------
- Note that if you do not want to compile FreeType 2 from a command line
- shell, please skip to section III below (DETAILED COMPILATION)
+ Note that if you do not want to compile FreeType 2 from a command
+ line shell, please skip to section III below (DETAILED COMPILATION).
- FreeType 2 includes a powerful and flexible build system that allows you
- to easily compile it on a great variety of platforms from the command
- line. To do so, just follow these simple instructions:
+ FreeType 2 includes a powerful and flexible build system that allows
+ you to easily compile it on a great variety of platforms from the
+ command line. To do so, just follow these simple instructions:
- a/ Install GNU Make:
+ a. Install GNU Make
- Because GNU Make is the only Make tool supported to compile FreeType 2,
- you should install it on your machine.
+ Because GNU Make is the only Make tool supported to compile
+ FreeType 2, you should install it on your machine.
- Because the FT2 build system relies on many important features of GNU
- Make, trying to build the library with any other Make tool will *fail*.
+ The FreeType 2 build system relies on many features special to GNU
+ Make -- trying to build the library with any other Make tool will
+ *fail*.
- Make sure that you're invoking GNU Make from the command line, by
- typing something like:
+ Make sure that you are invoking GNU Make from the command line, by
+ typing something like:
- make -V
+ make -v
- to display its version number..
+ to display its version number.
+ b. Invoke `make'
+ Go to the root directory of FreeType 2, then simply invoke GNU
+ Make from the command line. This will launch the FreeType 2 host
+ platform detection routines. A summary will be displayed, for
+ example, on Win32:
- b/ Invoke "make":
- Go to the root FT2 directory, then simply invoke GNU Make from the
- command line, this will launch the FreeType 2 Host Platform detection
- routines. A summary will be displayed, for example, on Win32:
-
- ========================================================================
+ ==============================================================
FreeType build system -- automatic system detection
The following settings are used:
@@ -84,141 +84,137 @@ II. COMMAND-LINE COMPILATION
configuration directory ./builds/win32
configuration rules ./builds/win32/w32-gcc.mk
- If this does not correspond to your system or settings please remove
- the file 'config.mk' from this directory then read the INSTALL file
- for help.
+ If this does not correspond to your system or settings please
+ remove the file 'config.mk' from this directory then read the
+ INSTALL file for help.
Otherwise, simply type 'make' again to build the library.
- =========================================================================
+ =============================================================
- If the detected settings correspond to your platform and compiler,
- skip to step e/. Note that if your platform is completely alien to
- the build system, the detected platform will be "ansi".
+ If the detected settings correspond to your platform and compiler,
+ skip to step e. Note that if your platform is completely alien to
+ the build system, the detected platform will be `ansi'.
- c/ Configure the build system for a different compiler:
+ c. Configure the build system for a different compiler
- If the build system correctly detected your platform, but you want to
- use a different compiler than the one specified in the summary (for
- most platforms, gcc is the defaut compiler), simply invoke GNU Make
- like :
+ If the build system correctly detected your platform, but you want
+ to use a different compiler than the one specified in the summary
+ (for most platforms, gcc is the defaut compiler), invoke GNU Make
+ with
make setup <compiler>
- For example:
-
- to use Visual C++ on Win32, type: "make setup visualc"
- to use LCC-Win32 on Win32, type: "make setup lcc"
-
- The <compiler> name to use is platform-dependent. The list of available
- compilers for your system is available in the file
- "builds/<system>/detect.mk" (note that we hope to make the list
- displayed at user demand in the final release)..
-
- If you're satisfed by the new configuration summary, skip to step e/
-
+ For example:
- d/ Configure the build system for an unknown platform/compiler:
+ to use Visual C++ on Win32, type: "make setup visualc"
+ to use LCC-Win32 on Win32, type: "make setup lcc"
- What the auto-detection/setup phase of the build system does is simply
- copy a file to the current directory under the name "config.mk".
+ The <compiler> name to use is platform-dependent. The list of
+ available compilers for your system is available in the file
+ `builds/<system>/detect.mk' (note that we hope to make the list
+ displayed at user demand in the final release).
- For example, on OS/2+gcc, it would simply copy "builds/os2/os2-gcc.mk"
- to "./config.mk"
+ If you are satisfied by the new configuration summary, skip to
+ step e.
- If for some reason your platform isn't correctly detected, simply copy
- manually the configuration sub-makefile to "./config.mk" and go to
- step e/.
+ d. Configure the build system for an unknown platform/compiler
- Note that this file is a sub-Makefile used to specify Make variables
- used to invoke the compiler and linker during the build, you can easily
- create your own version from one of the existing configuration files,
- then copy it to the current directory under the name "./config.mk".
+ The auto-detection/setup phase of the build system copies a file
+ to the current directory under the name `config.mk'.
+ For example, on OS/2+gcc, it would simply copy
+ `builds/os2/os2-gcc.mk' to `./config.mk'.
- e/ Build the library:
+ If for some reason your platform isn't correctly detected, copy
+ manually the configuration sub-makefile to `./config.mk' and go to
+ step e.
- The auto-detection/setup phase should have copied a file in the current
- directory, called "./config.mk". This file contains definitions of various
- Make variables used to invoke the compiler and linker during the build.
+ Note that this file is a sub-Makefile used to specify Make
+ variables for compiler and linker invocation during the build.
+ You can easily create your own version from one of the existing
+ configuration files, then copy it to the current directory under
+ the name `./config.mk'.
- To launch the build, simply invoke GNU Make again: the top Makefile will
- detect the configuration file and run the build with it..
+ e. Build the library
+ The auto-detection/setup phase should have copied a file in the
+ current directory, called `./config.mk'. This file contains
+ definitions of various Make variables used to invoke the compiler
+ and linker during the build.
- f/ Build the demonstration programs:
+ To launch the build, simply invoke GNU Make again: The top
+ Makefile will detect the configuration file and run the build with
+ it.
- Once the library is compiled, go to "demos", then invoke GNU Make.
+ f. Build the demonstration programs
- Note that the demonstration programs include a tiny graphics sub-system
- that includes "drivers" to display Windows on Win32, X11 and OS/2. The
- build system should automatically detect which driver to use based on
- the current platform.
- UNIX USERS TAKE NOTE: XXXXXX
-
- When building the demos, the build system tries to detect your X11 path
- by looking for the patterns "X11R5/bin", "X11R6/bin" or "X11/bin" in
- your current path. If no X11 path is found, the demo programs will not
- be able to display graphics and will fail. Change your current path
- if you encounter this problem.
-
- Note that the release version will use Autoconf to detect everything
- on Unix, so this will not be necessary !!
-
-
-II. DETAILED COMPILATION PROCEDURE:
+III. DETAILED COMPILATION PROCEDURE
-----------------------------------
- If you don't want to compile FreeType 2 from the command-line (for example
- from a graphical IDE on a Mac or Windows), you'll need to understand how the
- FreeType files are organized.
+ If you don't want to compile FreeType 2 from the command-line (for
+ example if you use a graphical IDE on a Mac or Windows), you will
+ need to understand how the FreeType files are organized.
- FreeType 2 has a very modular design, and it is made of several components.
- Each component must be compiled as a stand-alone object file, even when it
- is really made of several C source files. For example, the "base layer"
- component is made of the following C files:
+ FreeType 2 has a very modular design, and it is made of several
+ components. Each component must be compiled as a stand-alone object
+ file, even if it is really made of several C source files. For
+ example, the `base layer' component is made of the following C
+ files:
src/
base/
ftcalc.c - computations
- ftobjs.c - object management
- ftstream.c - stream input
+ ftextend.c - extensions support
ftlist.c - simple list management
+ ftobjs.c - object management
ftoutln.c - simple outline processing
- ftextend.c - extensions support
-
- However, you can create a single object file by compiling the file
- "src/base/ftbase.c", whose content is basically:
-
- #include <base/ftcalc.c>
- #include <base/ftobjs.c>
- #include <base/ftstream.c>
- #include <base/ftlist.c>
- #include <base/ftoutln.c>
- #include <base/ftextend.c>
-
- Similarly, each component has a single "englobing" C file to compile it
- as a stand-alone object, i.e. :
-
- src/base/ftbase.c - the base layer, high-level interface
- src/sfnt/sfnt.c - the "sfnt" module
- src/psnames/psnames.c - the Postscript Names module
- src/truetype/truetype.c - the TrueType font driver
- src/type1/type1.c - the Type 1 font driver
+ ftstream.c - stream input
+ However, you can create a single object file by compiling the file
+ `src/base/ftbase.c', which basically contains
+
+ #include <base/ftcalc.c>
+ #include <base/ftobjs.c>
+ #include <base/ftstream.c>
+ #include <base/ftlist.c>
+ #include <base/ftoutln.c>
+ #include <base/ftextend.c>
+
+ Similarly, each component has a single `englobing' C file to compile
+ it as a stand-alone object:
+
+ src/autohint/autohint.c - the autohinting module
+ src/base/ftbase.c - the base layer, high-level interface
+ src/cache/ftcache.c - a glyph and image caching system
+ (still experimental)
+ src/cff/cff.c - the OpenType font driver
+ src/cid/type1cid.c - the CID-keyed font driver
+ src/psaux/psaux.c - the PS support module
+ src/psnames/psnames.c - a support module to handle PS glyph
+ names
+ src/raster1/raster1.c - the monochrome raster module
+ src/sfnt/sfnt.c - the `sfnt' module
+ src/smooth/smooth.c - the anti-aliasing raster module
+ src/truetype/truetype.c - the TrueType font driver
+ src/type1z/type1z.c - the Type 1 font driver
+
+ The last module of FreeType 2, winfonts (implementing support for
+ Windows FNT format), is a single file.
To compile one component, do the following:
- - add the top-level "include" directory to your compilation include path
+ - Add the top-level `include' directory to your compilation
+ include path
- - add the "src" directory to your compilation include path.
+ - Add the `src' directory to your compilation include path.
- - compile the component "source" file (see list below), you don't need
- to be in the component's directory..
+ - Compile the component `source' file (see list below); you don't
+ need to be in the component's directory.
- For example, the following line can be used to compile the truetype driver
- on Unix:
+ For example, the following line can be used to compile the truetype
+ driver on Unix:
cd freetype2/
cc -c -Iinclude -Isrc src/truetype/truetype.c
@@ -228,52 +224,45 @@ II. DETAILED COMPILATION PROCEDURE:
cd freetype2/src/truetype
cc -c -I../../include -I.. truetype.c
- The complete list of files to compile for a feature-complete build of
- FreeType 2 is:
-
- src/base/ftsystem.c - system-specific memory and i/o support
- src/base/ftinit.c - initialisation layer
- src/base/ftdebug.c - debugging component (empty in release build)
- src/base/ftbase.c - the "base layer" component
- src/base/ftglyph.c - optional convenience functions
- src/raster1/raster1.c - the monochrome bitmap renderer
- src/smooth/smooth.c - the anti-aliased bitmap renderer
- src/sfnt/sfnt.c - the "sfnt" module
- src/psnames/psnames.c - the "psnames" module
- src/truetype/truetype.c - the TrueType font driver
- src/type1/type1.c - the Type 1 font driver (incl. Multiple Masters)
- src/cid/type1cid.c - the Type 1 CID-keyed font driver
- src/cff/cff.c - the OpenType/CFF/CEF font driver
- src/winfonts/winfnt.c - the Windows FNT/FON font driver
-
- All font drivers are optional. the "sfnt" and "psnames" modules are
- mandatory for certain drivers. However, you may need to update the list
- of drivers that are statically linked to the library, which is located
- in the file "include/freetype/config/ftmodule.h"
-
-
-III. Support for flat-directory compilation:
-----------------------------------------
-
- It is now possible to put all FreeType 2 source files into a single
- directory, with the exception of the "include" hierarchy.
-
- Note that you'll still need to only compile the 'wrapper' sources described
- above. Define the "FT_FLAT_COMPILE" macro when compiling. Here's an
- example:
+ Finally, FreeType 2 contains some other components:
+
+ src/base/ftsystem.c - system-specific memory and i/o support
+ src/base/ftinit.c - initialization layer
+ src/base/ftdebug.c - debugging component (empty in release
+ build)
+ src/base/ftglyph.c - optional convenience functions
+
+ All font drivers are optional. The `sfnt', `psaux', and `psnames'
+ modules are mandatory for certain drivers. However, you may need to
+ update the list of drivers that are statically linked to the
+ library, which is located in the configuration file
+ `include/freetype/config/ftmodule.h'.
+
+
+IV. Support for flat-directory compilation
+------------------------------------------
+
+ It is now possible to put all FreeType 2 source files into a single
+ directory, with the exception of the `include' hierarchy.
+
+ Note that you still need to only compile the `wrapper' sources
+ described above. Define the `FT_FLAT_COMPILE' macro when
+ compiling. Here an example:
- 1/ Copy all files in current directory:
+ 1. Copy all files in current directory:
- cp freetype2/src/base/*.[hc] .
- cp freetype2/src/raster1/*.[hc] .
- cp freetype2/src/smooth/*.[hc] .
- etc...
+ cp freetype2/src/base/*.[hc] .
+ cp freetype2/src/raster1/*.[hc] .
+ cp freetype2/src/smooth/*.[hc] .
+ etc.
- 2/ Compile sources:
+ 2. Compile sources:
- cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftsystem.c
- cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftinit.c
- cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftdebug.c
- cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftbase.c
- etc...
+ cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftsystem.c
+ cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftinit.c
+ cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftdebug.c
+ cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftbase.c
+ etc.
+
+End of file