* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
How to customize the compilation of the library
|
|
|
|
===============================================
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
FreeType is highly customizable to fit various needs, and this
|
|
|
|
document describes how it is possible to select options and components
|
|
|
|
at compilation time.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
I. Configuration macros
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
The file found in `include/freetype/config/ftoption.h' contains a list
|
2003-03-20 10:04:40 +03:00
|
|
|
of commented configuration macros that can be toggled by developers to
|
2003-04-21 17:30:27 +04:00
|
|
|
indicate which features should be active while building the library.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
These options range from debug level to availability of certain
|
2003-03-20 10:04:40 +03:00
|
|
|
features, like native TrueType hinting through a bytecode interpreter.
|
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
We invite you to read this file for more information. You can change
|
|
|
|
the file's content to suit your needs, or override it with one of the
|
|
|
|
techniques described below.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
II. Modules list
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
The file found in `include/freetype/config/ftmodule.h' contains a list
|
2003-04-21 17:30:27 +04:00
|
|
|
of names corresponding to the modules and font drivers to be
|
|
|
|
statically compiled in the FreeType library during the build.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
You can change it to suit your own preferences. Be aware that certain
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
modules depend on others, as described by the file `modules.txt' in
|
2003-03-20 10:04:40 +03:00
|
|
|
this directory.
|
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
You can modify the file's content to suit your needs, or override it
|
|
|
|
at compile time with one of the methods described below.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
Note that you also have to rename the various `*.mk' files in the
|
|
|
|
module directories which you want to exclude so that the extension
|
|
|
|
isn't `.mk' -- GNU make uses a simple globbing mechanism to include
|
|
|
|
all those files.
|
|
|
|
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
III. System interface
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
FreeType's default interface to the system (i.e., the parts that deal
|
|
|
|
with memory management and i/o streams) is located in
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
`src/base/ftsystem.c'.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
The current implementation uses standard C library calls to manage
|
|
|
|
memory and to read font files. It is however possible to write custom
|
2003-03-20 10:04:40 +03:00
|
|
|
implementations to suit specific systems.
|
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
To tell the GNU Make-based build system to use a custom system
|
|
|
|
interface, you have to define the environment variable FTSYS_SRC to
|
|
|
|
point to the relevant implementation:
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
on Unix:
|
|
|
|
|
|
|
|
./configure <your options>
|
|
|
|
export FTSYS_SRC=foo/my_ftsystem.c
|
|
|
|
make
|
|
|
|
make install
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
on Windows:
|
|
|
|
|
|
|
|
make setup <compiler>
|
|
|
|
set FTSYS_SRC=foo/my_ftsystem.c
|
|
|
|
make
|
2003-03-20 10:04:40 +03:00
|
|
|
|
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
IV. Overriding default configuration and module headers
|
|
|
|
|
|
|
|
It is possible to override the default configuration and module
|
|
|
|
headers without changing the original files. There are two ways to do
|
|
|
|
that:
|
2003-03-20 10:04:40 +03:00
|
|
|
|
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
1. Using the C include path
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
Use the C include path to ensure that your own versions of the files
|
|
|
|
are used at compile time when the lines
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
#include FT_CONFIG_OPTIONS_H
|
|
|
|
#include FT_CONFIG_MODULES_H
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
are compiled. Their default values being
|
|
|
|
<freetype/config/ftoption.h> and <freetype/config/ftmodule.h>, you
|
|
|
|
can do something like:
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
custom/
|
|
|
|
freetype/
|
|
|
|
config/
|
|
|
|
ftoption.h => custom options header
|
|
|
|
ftmodule.h => custom modules list
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
include/ => normal FreeType 2 include
|
|
|
|
freetype/
|
|
|
|
...
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
then change the C include path to always give the path to `custom'
|
|
|
|
before the FreeType 2 `include'.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
2. Redefining FT_CONFIG_OPTIONS_H and FT_CONFIG_MODULES_H
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
Another way to do the same thing is to redefine the macros used to
|
|
|
|
name the configuration headers. To do so, you need a custom
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
`ft2build.h' whose content can be as simple as:
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-11-09 11:37:14 +03:00
|
|
|
#ifndef __FT2_BUILD_MY_PLATFORM_H__
|
|
|
|
#define __FT2_BUILD_MY_PLATFORM_H__
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-11-09 11:37:14 +03:00
|
|
|
#define FT_CONFIG_OPTIONS_H <custom/my-ftoption.h>
|
|
|
|
#define FT_CONFIG_MODULES_H <custom/my-ftmodule.h>
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
#include <freetype/config/ftheader.h>
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-11-09 11:37:14 +03:00
|
|
|
#endif /* __FT2_BUILD_MY_PLATFORM_H__ */
|
2003-03-20 10:04:40 +03:00
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
Place those files in a separate directory, e.g.,
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
custom/
|
|
|
|
ft2build.h => custom version described above
|
|
|
|
my-ftoption.h => custom options header
|
|
|
|
my-ftmodule.h => custom modules list header
|
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
and change the C include path to ensure that `custom' is always
|
|
|
|
placed before the FT2 `include' during compilation.
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2005-06-05 03:00:25 +04:00
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
Copyright 2003, 2005 by
|
2005-06-05 03:00:25 +04:00
|
|
|
David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 04:22:46 +04:00
|
|
|
This file is part of the FreeType project, and may only be used,
|
|
|
|
modified, and distributed under the terms of the FreeType project
|
|
|
|
license, LICENSE.TXT. By continuing to use, modify, or distribute this
|
|
|
|
file you indicate that you have read the license and understand and
|
2005-06-05 03:00:25 +04:00
|
|
|
accept it fully.
|
|
|
|
|
2003-03-20 10:04:40 +03:00
|
|
|
|
2003-04-21 17:30:27 +04:00
|
|
|
--- end of CUSTOMIZE ---
|