vast clean-up of the sources in order to allow flat

directory compilation (by defining the FT_FLAT_COMPILE
macro at compile time..)

moved "freetype2/BUILD" to "freetype2/docs/BUILD"
This commit is contained in:
David Turner 2000-07-08 00:41:13 +00:00
parent 7404301024
commit a90663f591
94 changed files with 1182 additions and 296 deletions

View File

@ -75,8 +75,8 @@ ifdef check_platform
# #
modules: make_module_list setup modules: make_module_list setup
include $(TOP)/config/detect.mk include $(TOP)/builds/detect.mk
include $(TOP)/config/modules.mk include $(TOP)/builds/modules.mk
ifeq ($(wildcard $(FT_MODULE_LIST)),) ifeq ($(wildcard $(FT_MODULE_LIST)),)
setup: make_module_list setup: make_module_list

View File

@ -20,7 +20,7 @@ endif
DELETE := rm -f DELETE := rm -f
SEP := / SEP := /
HOSTSEP := $(SEP) HOSTSEP := $(SEP)
BUILD := $(TOP)/config/ansi BUILD := $(TOP)/builds/ansi
PLATFORM := ansi PLATFORM := ansi
# The directory where all object files are placed. # The directory where all object files are placed.
@ -105,7 +105,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -17,7 +17,7 @@
# the following variables: # the following variables:
# #
# BUILD The configuration and system-specific directory. Usually # BUILD The configuration and system-specific directory. Usually
# `freetype/config/$(PLATFORM)' but can be different for # `freetype/builds/$(PLATFORM)' but can be different for
# custom builds of the library. # custom builds of the library.
# #
# The following variables must be defined in system specific `detect.mk' # The following variables must be defined in system specific `detect.mk'
@ -52,7 +52,7 @@ DELETE := $(RM)
COPY := cp COPY := cp
SEP := / SEP := /
BUILD_CONFIG_ = $(TOP)$(SEP)config$(SEP) BUILD_CONFIG_ = $(TOP)$(SEP)builds$(SEP)
BUILD = $(BUILD_CONFIG_)$(PLATFORM) BUILD = $(BUILD_CONFIG_)$(PLATFORM)
CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE) CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
@ -70,7 +70,7 @@ CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
# #
BACKSLASH := $(strip \ ) BACKSLASH := $(strip \ )
# Now, include all detection rule files found in the `config/<system>' # Now, include all detection rule files found in the `builds/<system>'
# directories. Note that the calling order of the various `detect.mk' files # directories. Note that the calling order of the various `detect.mk' files
# isn't predictable. # isn't predictable.
# #

View File

@ -20,7 +20,7 @@ endif
DELETE := rm -f DELETE := rm -f
SEP := / SEP := /
HOSTSEP := $(strip \ ) HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/dos BUILD := $(TOP)/builds/dos
PLATFORM := dos PLATFORM := dos
# The directory where all object files are placed. # The directory where all object files are placed.
@ -105,7 +105,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -21,7 +21,7 @@
# environment, or on the command line) are used: # environment, or on the command line) are used:
# #
# BUILD The architecture dependent directory, # BUILD The architecture dependent directory,
# e.g. `$(TOP)/config/unix'. # e.g. `$(TOP)/builds/unix'.
# #
# OBJ_DIR The directory in which object files are created. # OBJ_DIR The directory in which object files are created.
# #
@ -112,7 +112,7 @@ FT_LIBRARY := $(LIB_)$(LIBRARY).$A
# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed # IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
# in front of the include list. Porters are then able to # in front of the include list. Porters are then able to
# put their own version of some of the FreeType components # put their own version of some of the FreeType components
# in the `freetype/config/<system>' directory, as these # in the `freetype/builds/<system>' directory, as these
# files will override the default sources. # files will override the default sources.
# #
INCLUDES := $(BUILD) $(TOP)$(SEP)include $(SRC) INCLUDES := $(BUILD) $(TOP)$(SEP)include $(SRC)
@ -121,7 +121,7 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# C flags used for the compilation of an object file. This must include at # C flags used for the compilation of an object file. This must include at
# least the paths for the `base' and `config/<system>' directories; # least the paths for the `base' and `builds/<system>' directories;
# debug/optimization/warning flags + ansi compliance if needed. # debug/optimization/warning flags + ansi compliance if needed.
# #
FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS) FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
@ -131,7 +131,7 @@ FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
# Include the `modules' rules file. # Include the `modules' rules file.
# #
include $(TOP)/config/modules.mk include $(TOP)/builds/modules.mk
# Initialize the list of objects. # Initialize the list of objects.

View File

@ -22,7 +22,7 @@ endif
DELETE := del DELETE := del
SEP := / SEP := /
HOSTSEP := $(strip \ ) HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2 BUILD := $(TOP)/builds/os2
PLATFORM := os2 PLATFORM := os2
CC := gcc CC := gcc
@ -108,7 +108,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -20,7 +20,7 @@ endif
DELETE := del DELETE := del
SEP := / SEP := /
HOSTSEP := $(strip \ ) HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2 BUILD := $(TOP)/builds/os2
PLATFORM := os2 PLATFORM := os2
CC := gcc CC := gcc
@ -106,7 +106,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -22,7 +22,7 @@ endif
DELETE := rm -f DELETE := rm -f
SEP := / SEP := /
HOSTSEP := $(SEP) HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix BUILD := $(TOP)/builds/unix
PLATFORM := unix PLATFORM := unix
# The directory where all object files are placed. # The directory where all object files are placed.
@ -107,7 +107,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -20,7 +20,7 @@ endif
DELETE := rm -f DELETE := rm -f
SEP := / SEP := /
HOSTSEP := $(SEP) HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix BUILD := $(TOP)/builds/unix
PLATFORM := unix PLATFORM := unix
# The directory where all object files are placed. # The directory where all object files are placed.
@ -105,7 +105,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -20,7 +20,7 @@ endif
DELETE := @RMF@ DELETE := @RMF@
SEP := / SEP := /
HOSTSEP := $(SEP) HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix BUILD := $(TOP)/builds/unix
PLATFORM := unix PLATFORM := unix
# The directory where all object files are placed. # The directory where all object files are placed.

View File

@ -20,7 +20,7 @@ endif
DELETE := rm -f DELETE := rm -f
SEP := / SEP := /
HOSTSEP := $(SEP) HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix BUILD := $(TOP)/builds/unix
PLATFORM := unix PLATFORM := unix
# The directory where all object files are placed. # The directory where all object files are placed.
@ -105,7 +105,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -25,7 +25,7 @@ endif
DELETE := del DELETE := del
SEP := / SEP := /
HOSTSEP := $(strip \ ) HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/win32 BUILD := $(TOP)/builds/win32
PLATFORM := win32 PLATFORM := win32
CC := gcc CC := gcc
@ -111,7 +111,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -23,7 +23,7 @@ endif
DELETE := del DELETE := del
SEP := / SEP := /
HOSTSEP := $(strip \ ) HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/win32 BUILD := $(TOP)/builds/win32
PLATFORM := win32 PLATFORM := win32
CC := gcc CC := gcc
@ -109,7 +109,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -108,7 +108,7 @@ ANSI_FLAGS := /Sa
ifdef BUILD_FREETYPE ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
clean_freetype: clean_freetype_dos clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos distclean_freetype: distclean_freetype_dos

View File

@ -19,7 +19,7 @@ endif
DELETE := del DELETE := del
SEP := / SEP := /
HOSTSEP := $(strip \ ) HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/win32 BUILD := $(TOP)/builds/win32
PLATFORM := win32 PLATFORM := win32
CC := lcc CC := lcc
@ -105,7 +105,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -19,7 +19,7 @@ endif
DELETE := del DELETE := del
SEP := / SEP := /
HOSTSEP := $(strip \ ) HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/win32 BUILD := $(TOP)/builds/win32
PLATFORM := win32 PLATFORM := win32
CC := cl CC := cl
@ -105,7 +105,7 @@ ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined. # build the library with the previous variables defined.
# #
include $(TOP)/config/freetype.mk include $(TOP)/builds/freetype.mk
# The cleanup targets. # The cleanup targets.
# #

View File

@ -115,7 +115,7 @@ FT_LIBRARY := $(LIB_)$(LIBRARY).$A
# in the `freetype/config/<system>' directory, as these # in the `freetype/config/<system>' directory, as these
# files will override the default sources. # files will override the default sources.
# #
INCLUDES := $(BUILD) $(TOP)$(SEP)include $(INCLUDES) INCLUDES := $(BUILD) $(TOP)$(SEP)include $(SRC)
INCLUDE_FLAGS = $(INCLUDES:%=$I%) INCLUDE_FLAGS = $(INCLUDES:%=$I%)

264
docs/BUILD Normal file
View File

@ -0,0 +1,264 @@
FreeType 2 compilation how-to
Introduction:
Welcome to this new beta of the FreeType 2 library. You'll find in this
document instructions on how to compile the library on your favorite
platform.
*** UNIX USERS : Even though the FT2 build system doesn't
************** : use the Autoconf/Automake tools, these will
************** : be introduced in the Unix-specific parts of
************** : the build in our final release..
I. QUICK COMMAND-LINE GUIDE:
----------------------------
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
On Win32+Visual C++:
make setup visualc // setup the build for VisualC++ on Win32
make // build the library
Then, go to the "demos" directory and type
make
To compile the demo programs..
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)
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:
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*.
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:
platform win32
compiler gcc
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.
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".
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 :
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 satisfying by the new configuration summary, skip to step e/
d/ Configure the build system for an unknown platform/compiler:
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".
For example, on OS/2+gcc, it would simply copy "builds/os2/os2-gcc.mk"
to "./config.mk"
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/.
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".
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.
To launch the build, simply invoke GNU Make again: the top Makefile will
detect the configuration file and run the build with it..
f/ Build the demonstration programs:
Once the library is compiled, go to "demos", then invoke GNU Make.
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:
-----------------------------------
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.
FreeType 2 has a very module 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:
src/
base/
ftcalc.c - computations
ftobjs.c - object management
ftstream.c - stream input
ftlist.c - simple list 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
To compile one component, do the following:
- add the top-level "include" 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..
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
Alternatively:
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.
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:
1/ Copy all files in current directory:
cp freetype2/src/base/*.[hc] .
cp freetype2/src/raster1/*.[hc] .
cp freetype2/src/smooth/*.[hc] .
etc...
2/ Compile sources:
cc -c -DFT_FLAT_COMPILE -Ifreetype/include ftsystem.c
cc -c -DFT_FLAT_COMPILE -Ifreetype/include ftinit.c
cc -c -DFT_FLAT_COMPILE -Ifreetype/include ftdebug.c
cc -c -DFT_FLAT_COMPILE -Ifreetype/include ftbase.c
etc...

View File

@ -16,12 +16,20 @@
/***************************************************************************/ /***************************************************************************/
#ifdef FT_FLAT_COMPILE
#include "ftcalc.c"
#include "ftobjs.c"
#include "ftstream.c"
#include "ftlist.c"
#include "ftoutln.c"
#include "ftextend.c"
#else
#include <ftcalc.c> #include <ftcalc.c>
#include <ftobjs.c> #include <ftobjs.c>
#include <ftstream.c> #include <ftstream.c>
#include <ftlist.c> #include <ftlist.c>
#include <ftoutln.c> #include <ftoutln.c>
#include <ftextend.c> #include <ftextend.c>
#endif
/* END */ /* END */

View File

@ -18,11 +18,20 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <t2driver.c> /* driver interface */ #ifdef FT_FLAT_COMPILE
#include <t2parse.c> /* token parser */ #include "t2driver.c" /* driver interface */
#include <t2load.c> /* tables loader */ #include "t2parse.c" /* token parser */
#include <t2objs.c> /* object management */ #include "t2load.c" /* tables loader */
#include <t2gload.c> /* glyph loader */ #include "t2objs.c" /* object management */
#include "t2gload.c" /* glyph loader */
#else
#include <cff/t2driver.c> /* driver interface */
#include <cff/t2parse.c> /* token parser */
#include <cff/t2load.c> /* tables loader */
#include <cff/t2objs.c> /* object management */
#include <cff/t2gload.c> /* glyph loader */
#endif
/* END */ /* END */

View File

@ -19,14 +19,7 @@ T2_DIR := $(SRC_)cff
T2_DIR_ := $(T2_DIR)$(SEP) T2_DIR_ := $(T2_DIR)$(SEP)
# additional include flags used when compiling the driver T2_COMPILE := $(FT_COMPILE)
#
T2_INCLUDE := $(T2_DIR)
# compilation flags for the driver
#
T2_CFLAGS := $(T2_INCLUDE:%=$I%)
T2_COMPILE := $(FT_COMPILE) $(T2_CFLAGS)
# T2 driver sources (i.e., C files) # T2 driver sources (i.e., C files)

View File

@ -22,11 +22,17 @@
#include <freetype/internal/sfnt.h> #include <freetype/internal/sfnt.h>
#include <freetype/ttnameid.h> #include <freetype/ttnameid.h>
#include <t2driver.h>
#include <t2gload.h>
#include <freetype/internal/t2errors.h> #include <freetype/internal/t2errors.h>
#ifdef FT_FLAT_COMPILE
#include "t2driver.h"
#include "t2gload.h"
#else
#include <cff/t2driver.h>
#include <cff/t2gload.h>
#endif
/*************************************************************************/ /*************************************************************************/
/* */ /* */

View File

@ -23,8 +23,13 @@
#include <freetype/ftoutln.h> #include <freetype/ftoutln.h>
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <t2load.h> #ifdef FT_FLAT_COMPILE
#include <t2gload.h> #include "t2load.h"
#include "t2gload.h"
#else
#include <cff/t2load.h>
#include <cff/t2gload.h>
#endif
#include <freetype/internal/t2errors.h> #include <freetype/internal/t2errors.h>
@ -472,9 +477,9 @@
builder->path_begun = 1; builder->path_begun = 1;
error = add_contour( builder ); error = add_contour( builder );
if ( !error ) if ( !error )
error = add_point1( builder, x, y ); return error;
} }
return error; return add_point1( builder, x, y );
} }
@ -595,8 +600,8 @@
v = *ip++; v = *ip++;
if ( v >= 32 || v == 28 ) if ( v >= 32 || v == 28 )
{ {
FT_Int shift = 16; FT_Int shift = 16;
FT_Long val; FT_Int32 val;
/* this is an operand, push it on the stack */ /* this is an operand, push it on the stack */
@ -604,7 +609,7 @@
{ {
if ( ip + 1 >= limit ) if ( ip + 1 >= limit )
goto Syntax_Error; goto Syntax_Error;
val = (FT_Short)( ( (FT_Int)ip[0] << 8 ) + ip[1] ); val = (FT_Int32)( ( (FT_Short)ip[0] << 8 ) | ip[1] );
ip += 2; ip += 2;
} }
else if ( v < 247 ) else if ( v < 247 )
@ -640,7 +645,7 @@
#ifdef FT_DEBUG_LEVEL_TRACE #ifdef FT_DEBUG_LEVEL_TRACE
if ( !( val & 0xFFFF ) ) if ( !( val & 0xFFFF ) )
FT_TRACE4(( " %d", (FT_Int)( val >> 16 ) )); FT_TRACE4(( " %d", (FT_Int32)( val >> 16 ) ));
else else
FT_TRACE4(( " %.2f", val/65536.0 )); FT_TRACE4(( " %.2f", val/65536.0 ));
#endif #endif
@ -1296,7 +1301,7 @@
{ {
FT_Pos start_x, start_y; /* record start x,y values for alter use */ FT_Pos start_x, start_y; /* record start x,y values for alter use */
FT_Int dx = 0, dy = 0; /* used in hort./vert. algorithm below */ FT_Int dx = 0, dy = 0; /* used in hort./vert. algorithm below */
FT_Int hort_flag, count; FT_Int horizontal, count;
FT_TRACE4(( " flex1" )); FT_TRACE4(( " flex1" ));
@ -1314,7 +1319,7 @@
args = stack; args = stack;
/* grab up to the last argument */ /* grab up to the last argument */
while ( args < decoder->top - 1) for ( count = 5; count > 0; count-- )
{ {
dx += args[0]; dx += args[0];
dy += args[1]; dy += args[1];
@ -1328,7 +1333,7 @@
if ( dy < 0 ) dy = -dy; if ( dy < 0 ) dy = -dy;
/* strange test, but here it is... */ /* strange test, but here it is... */
hort_flag = (dx > dy); horizontal = (dx > dy);
for ( count = 5; count > 0; count-- ) for ( count = 5; count > 0; count-- )
{ {
@ -1338,7 +1343,7 @@
args += 2; args += 2;
} }
if (hort_flag) if (horizontal)
{ {
x += args[0]; x += args[0];
y = start_y; y = start_y;

View File

@ -20,7 +20,12 @@
#define T2GLOAD_H #define T2GLOAD_H
#include <freetype/freetype.h> #include <freetype/freetype.h>
#include <t2objs.h>
#ifdef FT_FLAT_COMPILE
#include "t2objs.h"
#else
#include <cff/t2objs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -23,8 +23,14 @@
#include <freetype/internal/t2errors.h> #include <freetype/internal/t2errors.h>
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <t2load.h>
#include <t2parse.h> #ifdef FT_FLAT_COMPILE
#include "t2load.h"
#include "t2parse.h"
#else
#include <cff/t2load.h>
#include <cff/t2parse.h>
#endif
/*************************************************************************/ /*************************************************************************/
@ -283,8 +289,6 @@
} }
#if 0 /* unused until we fully support pure-CFF fonts */
LOCAL_FUNC LOCAL_FUNC
FT_String* T2_Get_String( CFF_Index* index, FT_String* T2_Get_String( CFF_Index* index,
FT_UInt sid, FT_UInt sid,
@ -319,7 +323,6 @@
} }
} }
#endif /* 0 */
/*************************************************************************/ /*************************************************************************/

View File

@ -29,14 +29,11 @@
FT_String* T2_Get_Name( CFF_Index* index, FT_String* T2_Get_Name( CFF_Index* index,
FT_UInt element ); FT_UInt element );
#if 0 /* will be used later for pure-CFF font support */
LOCAL_DEF LOCAL_DEF
FT_String* T2_Get_String( CFF_Index* index, FT_String* T2_Get_String( CFF_Index* index,
FT_UInt sid, FT_UInt sid,
PSNames_Interface* interface ); PSNames_Interface* interface );
#endif
LOCAL_DEF LOCAL_DEF
FT_Error T2_Access_Element( CFF_Index* index, FT_Error T2_Access_Element( CFF_Index* index,

View File

@ -19,14 +19,21 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftcalc.h> #include <freetype/internal/ftcalc.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/fterrors.h>
#include <freetype/ttnameid.h> #include <freetype/ttnameid.h>
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <freetype/internal/sfnt.h> #include <freetype/internal/sfnt.h>
#include <freetype/internal/psnames.h> #include <freetype/internal/psnames.h>
#include <t2objs.h>
#include <t2load.h> #ifdef FT_FLAT_COMPILE
#include "t2objs.h"
#include "t2load.h"
#else
#include <cff/t2objs.h>
#include <cff/t2load.h>
#endif
#include <freetype/internal/t2errors.h> #include <freetype/internal/t2errors.h>
@ -46,7 +53,131 @@
/* */ /* */
/*************************************************************************/ /*************************************************************************/
static
FT_String* T2_StrCopy( FT_Memory memory, const FT_String* source )
{
FT_Error error;
FT_String* result = 0;
FT_Int len = (FT_Int)strlen(source);
if ( !ALLOC( result, len+1 ) )
{
MEM_Copy( result, source, len );
result[len] = 0;
}
return result;
}
/* this function is used to build a Unicode charmap from the glyph names */
/* in a file.. */
static
FT_Error CFF_Build_Unicode_Charmap( T2_Face face,
FT_ULong base_offset,
PSNames_Interface* psnames )
{
CFF_Font* font = (CFF_Font*)face->extra.data;
FT_Memory memory = FT_FACE_MEMORY(face);
FT_UInt n, num_glyphs = face->root.num_glyphs;
const char** glyph_names;
FT_Error error;
CFF_Font_Dict* dict = &font->top_font.font_dict;
FT_ULong charset_offset;
FT_Byte format;
FT_Stream stream = face->root.stream;
charset_offset = dict->charset_offset;
if (!charset_offset)
{
FT_ERROR(( "CFF.Build_Unicode_Charmap: charset table is missing\n" ));
error = FT_Err_Invalid_File_Format;
goto Exit;
}
/* seek to charset table and allocate glyph names table */
if ( FILE_Seek( base_offset + charset_offset ) ||
ALLOC_ARRAY( glyph_names, num_glyphs, const char* ) )
goto Exit;
/* now, read each glyph name and store it in the glyph name table */
if ( READ_Byte(format) )
goto Fail;
switch (format)
{
case 0: /* format 0 - one SID per glyph */
{
const char** gname = glyph_names;
const char** limit = gname + num_glyphs;
if ( ACCESS_Frame( num_glyphs*2 ) )
goto Fail;
for ( ; gname < limit; gname++ )
gname[0] = T2_Get_String( &font->string_index,
GET_UShort(),
psnames );
FORGET_Frame();
break;
}
case 1: /* format 1 - sequential ranges */
case 2: /* format 2 - sequential ranges with 16-bit counts */
{
const char** gname = glyph_names;
const char** limit = gname + num_glyphs;
FT_UInt len = 3;
if (format == 2)
len++;
while (gname < limit)
{
FT_UInt first;
FT_UInt count;
if ( ACCESS_Frame( len ) )
goto Fail;
first = GET_UShort();
if (format == 3)
count = GET_UShort();
else
count = GET_Byte();
FORGET_Frame();
for ( ; count > 0; count-- )
{
gname[0] = T2_Get_String( &font->string_index,
first,
psnames );
gname++;
first++;
}
}
break;
}
default: /* unknown charset format !! */
FT_ERROR(( "CFF: unknown charset format !!\n" ));
error = FT_Err_Invalid_File_Format;
goto Fail;
}
/* all right, the glyph names were loaded, we now need to create */
/* the corresponding unicode charmap.. */
Fail:
for ( n = 0; n < num_glyphs; n++ )
FREE( glyph_names[n] );
FREE( glyph_names );
Exit:
return error;
}
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
@ -77,48 +208,82 @@
FT_Int num_params, FT_Int num_params,
FT_Parameter* params ) FT_Parameter* params )
{ {
FT_Error error; FT_Error error;
SFNT_Interface* sfnt; SFNT_Interface* sfnt;
PSNames_Interface* psnames;
FT_Bool pure_cff = 1;
FT_Bool sfnt_format = 0;
sfnt = (SFNT_Interface*)FT_Get_Module_Interface( sfnt = (SFNT_Interface*)FT_Get_Module_Interface(
face->root.driver->root.library, "sfnt" ); face->root.driver->root.library, "sfnt" );
if ( !sfnt ) if ( !sfnt )
goto Bad_Format; goto Bad_Format;
psnames = (PSNames_Interface*)FT_Get_Module_Interface(
face->root.driver->root.library, "psnames" );
/* create input stream from resource */ /* create input stream from resource */
if ( FILE_Seek( 0 ) ) if ( FILE_Seek( 0 ) )
goto Exit; goto Exit;
/* check that we have a valid OpenType file */ /* check that we have a valid OpenType file */
error = sfnt->init_face( stream, face, face_index, num_params, params ); error = sfnt->init_face( stream, face, face_index, num_params, params );
if ( error ) if ( !error )
goto Exit;
if ( face->format_tag != 0x4F54544FL ) /* `OTTO'; OpenType/CFF font */
{ {
FT_TRACE2(( "[not a valid OpenType/CFF font]\n" )); if ( face->format_tag != 0x4F54544FL ) /* `OTTO'; OpenType/CFF font */
goto Bad_Format; {
FT_TRACE2(( "[not a valid OpenType/CFF font]\n" ));
goto Bad_Format;
}
/* If we are performing a simple font format check, exit immediately */
if ( face_index < 0 )
return T2_Err_Ok;
sfnt_format = 1;
/* now, the font can be either an OpenType/CFF font, or a SVG CEF font */
/* in the later case, it doesn't have a "head" table.. */
error = face->goto_table( face, TTAG_head, stream, 0 );
if (!error)
{
pure_cff = 0;
/* Load font directory */
error = sfnt->load_face( stream, face, face_index, num_params, params );
if ( error )
goto Exit;
}
else
{
/* load the "cmap" table by hand */
error = sfnt->load_charmaps( face, stream );
if (error)
goto Exit;
/* XXX: for now, we don't load the GPOS table, as OpenType Layout */
/* support will be added later to FreeType 2 as a separate module */
}
/* now, load the CFF part of the file */
error = face->goto_table( face, TTAG_CFF, stream, 0 );
if ( error )
goto Exit;
}
else
{
/* rewind to start of file, we're going to load a pure-CFF font */
(void)FILE_Seek(0);
error = FT_Err_Ok;
} }
/* If we are performing a simple font format check, exit immediately */
if ( face_index < 0 )
return T2_Err_Ok;
/* Load font directory */
error = sfnt->load_face( stream, face, face_index, num_params, params );
if ( error )
goto Exit;
/* now, load the CFF part of the file */
error = face->goto_table( face, TTAG_CFF, stream, 0 );
if ( error )
goto Exit;
/* now load and parse the CFF table in the file */
{ {
CFF_Font* cff; CFF_Font* cff;
FT_Memory memory = face->root.memory; FT_Memory memory = face->root.memory;
FT_Face root; FT_Face root;
FT_UInt flags;
if ( ALLOC( cff, sizeof ( *cff ) ) ) if ( ALLOC( cff, sizeof ( *cff ) ) )
@ -130,11 +295,80 @@
goto Exit; goto Exit;
/* Complement the root flags with some interesting information. */ /* Complement the root flags with some interesting information. */
/* Note that for OpenType/CFF, there is no need to do this, but */ /* Note that this is only necessary for pure CFF and CEF fonts */
/* this will be necessary for pure CFF fonts through. */
root = &face->root; root = &face->root;
} if (pure_cff)
{
CFF_Font_Dict* dict = &cff->top_font.font_dict;
/* we need the psnames module for pure-CFF and CEF formats */
if (!psnames)
{
FT_ERROR(( "cannot open CFF & CEF fonts without the 'psnames' module\n" ));
goto Bad_Format;
}
/* retrieve font family & style name */
if (dict->cid_registry)
{
root->family_name = T2_Get_String( &cff->string_index,
dict->cid_font_name,
psnames );
root->style_name = T2_StrCopy( memory, "Regular" ); /* XXXX */
}
else
{
root->family_name = T2_Get_String( &cff->string_index,
dict->base_font_name,
psnames );
root->style_name = T2_Get_String( &cff->string_index,
dict->weight,
psnames );
}
/*********************************************************************/
/* */
/* Compute face flags. */
/* */
flags = FT_FACE_FLAG_SCALABLE | /* scalable outlines */
FT_FACE_FLAG_HORIZONTAL; /* horizontal data */
if (sfnt_format)
flags |= FT_FACE_FLAG_SFNT;
/* fixed width font? */
if ( dict->is_fixed_pitch )
flags |= FT_FACE_FLAG_FIXED_WIDTH;
/* XXXX: WE DO NOT SUPPORT KERNING METRICS IN THE GPOS TABLE FOR NOW */
#if 0
/* kerning available ? */
if ( face->kern_pairs )
flags |= FT_FACE_FLAG_KERNING;
#endif
root->face_flags = flags;
/*********************************************************************/
/* */
/* Compute style flags. */
/* */
flags = 0;
if ( dict->italic_angle )
flags |= FT_STYLE_FLAG_ITALIC;
/* XXXX : may not be correct .. */
if ( cff->top_font.private_dict.force_bold )
flags |= FT_STYLE_FLAG_BOLD;
root->style_flags = flags;
}
}
Exit: Exit:
return error; return error;

View File

@ -16,7 +16,12 @@
/***************************************************************************/ /***************************************************************************/
#include <t2parse.h> #ifdef FT_FLAT_COMPILE
#include "t2parse.h"
#else
#include <cff/t2parse.h>
#endif
#include <freetype/internal/t2errors.h> #include <freetype/internal/t2errors.h>
@ -417,7 +422,11 @@
static const T2_Field_Handler t2_field_handlers[] = static const T2_Field_Handler t2_field_handlers[] =
{ {
#include <t2tokens.h> #ifdef FT_FLAT_COMPILE
#include "t2tokens.h"
#else
#include <cff/t2tokens.h>
#endif
{ 0, 0, 0, 0, 0, 0, 0 } { 0, 0, 0, 0, 0, 0, 0 }
}; };

View File

@ -15,8 +15,12 @@
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#ifdef FT_FLAT_COMPILE
#include "cidafm.h"
#else
#include <cid/cidafm.h>
#endif
#include <cidafm.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>
#include <freetype/internal/t1errors.h> #include <freetype/internal/t1errors.h>

View File

@ -19,7 +19,11 @@
#ifndef CIDAFM_H #ifndef CIDAFM_H
#define CIDAFM_H #define CIDAFM_H
#include <cidobjs.h> #ifdef FT_FLAT_COMPILE
#include "cidobjs.h"
#else
#include <cid/cidobjs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -16,8 +16,14 @@
/***************************************************************************/ /***************************************************************************/
#include <cidload.h> #ifdef FT_FLAT_COMPILE
#include <cidgload.h> #include "cidload.h"
#include "cidgload.h"
#else
#include <cid/cidload.h>
#include <cid/cidgload.h>
#endif
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/ftoutln.h> #include <freetype/ftoutln.h>

View File

@ -19,7 +19,11 @@
#ifndef CIDGLOAD_H #ifndef CIDGLOAD_H
#define CIDGLOAD_H #define CIDGLOAD_H
#include <cidobjs.h> #ifdef FT_FLAT_COMPILE
#include "cidobjs.h"
#else
#include <cid/cidobjs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -22,7 +22,12 @@
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>
#include <freetype/internal/t1errors.h> #include <freetype/internal/t1errors.h>
#include <cidload.h>
#ifdef FT_FLAT_COMPILE
#include "cidload.h"
#else
#include <cid/cidload.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <ctype.h> /* for isspace(), isalnum() */ #include <ctype.h> /* for isspace(), isalnum() */
@ -238,7 +243,11 @@
static static
const CID_Field_Rec t1_field_records[] = const CID_Field_Rec t1_field_records[] =
{ {
#include <cidtokens.h> #ifdef FT_FLAT_COMPILE
#include "cidtokens.h"
#else
#include <cid/cidtokens.h>
#endif
{ 0, 0, 0, 0, 0, 0, 0, 0 } { 0, 0, 0, 0, 0, 0, 0, 0 }
}; };

View File

@ -20,7 +20,12 @@
#define CIDLOAD_H #define CIDLOAD_H
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <cidparse.h>
#ifdef FT_FLAT_COMPILE
#include "cidparse.h"
#else
#include <cid/cidparse.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -19,8 +19,14 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <cidgload.h> #ifdef FT_FLAT_COMPILE
#include <cidload.h> #include "cidgload.h"
#include "cidload.h"
#else
#include <cid/cidgload.h>
#include <cid/cidload.h>
#endif
#include <freetype/internal/psnames.h> #include <freetype/internal/psnames.h>

View File

@ -21,7 +21,12 @@
#include <freetype/internal/ftobjs.h> #include <freetype/internal/ftobjs.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/t1errors.h> #include <freetype/internal/t1errors.h>
#include <cidparse.h>
#ifdef FT_FLAT_COMPILE
#include "cidparse.h"
#else
#include <cid/cidparse.h>
#endif
#include <string.h> /* for strncmp() */ #include <string.h> /* for strncmp() */

View File

@ -16,8 +16,13 @@
/***************************************************************************/ /***************************************************************************/
#include <cidriver.h> #ifdef FT_FLAT_COMPILE
#include <cidgload.h> #include "cidriver.h"
#include "cidgload.h"
#else
#include <cid/cidriver.h>
#include <cid/cidgload.h>
#endif
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>

View File

@ -19,14 +19,7 @@ CID_DIR := $(SRC_)cid
CID_DIR_ := $(CID_DIR)$(SEP) CID_DIR_ := $(CID_DIR)$(SEP)
# additional include flags used when compiling the driver CID_COMPILE := $(FT_COMPILE)
#
CID_INCLUDE := $(CID_DIR)
# compilation flags for the driver
#
CID_CFLAGS := $(CID_INCLUDE:%=$I%)
CID_COMPILE := $(FT_COMPILE) $(CID_CFLAGS)
# CID driver sources (i.e., C files) # CID driver sources (i.e., C files)

View File

@ -18,14 +18,18 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <cidparse.c> #ifdef FT_FLAT_COMPILE
#include <cidload.c> #include "cidparse.c"
#include <cidobjs.c> #include "cidload.c"
#include <cidriver.c> #include "cidobjs.c"
#include <cidgload.c> #include "cidriver.c"
#include "cidgload.c"
#if 0 #else
#include <cidafm.c> #include <cid/cidparse.c>
#include <cid/cidload.c>
#include <cid/cidobjs.c>
#include <cid/cidriver.c>
#include <cid/cidgload.c>
#endif #endif

View File

@ -18,7 +18,14 @@
#include <freetype/internal/psnames.h> #include <freetype/internal/psnames.h>
#include <freetype/internal/ftobjs.h> #include <freetype/internal/ftobjs.h>
#include <psmodule.h>
#ifdef FT_FLAT_COMPILE
#include "psmodule.h"
#include "pstables.h"
#else
#include <psnames/psmodule.h>
#include <psnames/pstables.h>
#endif
#include <stdlib.h> /* for qsort() */ #include <stdlib.h> /* for qsort() */
#include <string.h> /* for strcmp(), strncpy() */ #include <string.h> /* for strcmp(), strncpy() */
@ -27,9 +34,6 @@
#ifndef FT_CONFIG_OPTION_NO_POSTSCRIPT_NAMES #ifndef FT_CONFIG_OPTION_NO_POSTSCRIPT_NAMES
/* see the Python script `freetype2/docs/glnames.py' which is used */
/* to generate the following file */
#include <pstables.h>
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST #ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST

View File

@ -18,15 +18,10 @@
PSNAMES_DIR := $(SRC_)psnames PSNAMES_DIR := $(SRC_)psnames
PSNAMES_DIR_ := $(PSNAMES_DIR)$(SEP) PSNAMES_DIR_ := $(PSNAMES_DIR)$(SEP)
# additional include flags used when compiling the driver
#
PSNAMES_INCLUDE := $(PSNAMES_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
PSNAMES_CFLAGS := $(PSNAMES_INCLUDE:%=$I%) PSNAMES_COMPILE := $(FT_COMPILE)
PSNAMES_COMPILE := $(FT_COMPILE) $(PSNAMES_CFLAGS)
# PSNames driver sources (i.e., C files) # PSNames driver sources (i.e., C files)

View File

@ -18,8 +18,14 @@
#include <freetype/internal/ftobjs.h> #include <freetype/internal/ftobjs.h>
#include <freetype/ftoutln.h> #include <freetype/ftoutln.h>
#include <ftrend1.h>
#include <ftraster.h> #ifdef FT_FLAT_COMPILE
#include "ftrend1.h"
#include "ftraster.h"
#else
#include <raster1/ftrend1.h>
#include <raster1/ftraster.h>
#endif
/* initialize renderer -- init its raster */ /* initialize renderer -- init its raster */

View File

@ -18,8 +18,13 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ftraster.c> #ifdef FT_FLAT_COMPILE
#include <ftrend1.c> #include "ftraster.c"
#include "ftrend1.c"
#else
#include <raster1/ftraster.c>
#include <raster1/ftrend1.c>
#endif
/* END */ /* END */

View File

@ -18,15 +18,9 @@
RAS1_DIR := $(SRC_)raster1 RAS1_DIR := $(SRC_)raster1
RAS1_DIR_ := $(RAS1_DIR)$(SEP) RAS1_DIR_ := $(RAS1_DIR)$(SEP)
# additional include flags used when compiling the driver
#
RAS1_INCLUDE := $(RAS1_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
RAS1_CFLAGS := $(RAS1_INCLUDE:%=$I%) RAS1_COMPILE := $(FT_COMPILE)
RAS1_COMPILE := $(FT_COMPILE) $(RAS1_CFLAGS)
# raster1 driver sources (i.e., C files) # raster1 driver sources (i.e., C files)

View File

@ -19,14 +19,9 @@ SFNT_DIR := $(SRC_)sfnt
SFNT_DIR_ := $(SFNT_DIR)$(SEP) SFNT_DIR_ := $(SFNT_DIR)$(SEP)
# additional include flags used when compiling the driver
#
SFNT_INCLUDE := $(SFNT_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
SFNT_CFLAGS := $(SFNT_INCLUDE:%=$I%) SFNT_COMPILE := $(FT_COMPILE)
SFNT_COMPILE := $(FT_COMPILE) $(SFNT_CFLAGS)
# SFNT driver sources (i.e., C files) # SFNT driver sources (i.e., C files)

View File

@ -18,12 +18,23 @@
#include <freetype/internal/sfnt.h> #include <freetype/internal/sfnt.h>
#include <freetype/internal/ftobjs.h> #include <freetype/internal/ftobjs.h>
#include <sfdriver.h>
#include <ttload.h> #ifdef FT_FLAT_COMPILE
#include <ttsbit.h> #include "sfdriver.h"
#include <ttpost.h> #include "ttload.h"
#include <ttcmap.h> #include "ttsbit.h"
#include <sfobjs.h> #include "ttpost.h"
#include "ttcmap.h"
#include "sfobjs.h"
#else
#include <sfnt/sfdriver.h>
#include <sfnt/ttload.h>
#include <sfnt/ttsbit.h>
#include <sfnt/ttpost.h>
#include <sfnt/ttcmap.h>
#include <sfnt/sfobjs.h>
#endif
#include <string.h> /* for strcmp() */ #include <string.h> /* for strcmp() */

View File

@ -18,19 +18,41 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ttload.c> #ifdef FT_FLAT_COMPILE
#include <ttcmap.c>
#include <sfobjs.c> #include "ttload.c"
#include "ttcmap.c"
#include "sfobjs.c"
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
#include <ttsbit.c> #include "ttsbit.c"
#endif #endif
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
#include <ttpost.c> #include "ttpost.c"
#endif
#include "sfdriver.c"
#else /* FT_FLAT_COMPILE */
#include <sfnt/ttload.c>
#include <sfnt/ttcmap.c>
#include <sfnt/sfobjs.c>
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
#include <sfnt/ttsbit.c>
#endif #endif
#include <sfdriver.c> #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
#include <sfnt/ttpost.c>
#endif
#include <sfnt/sfdriver.c>
#endif /* FT_FLAT_COMPILE */
/* END */ /* END */

View File

@ -16,7 +16,12 @@
/***************************************************************************/ /***************************************************************************/
#include <sfobjs.h> #ifdef FT_FLAT_COMPILE
#include "sfobjs.h"
#else
#include <sfnt/sfobjs.h>
#endif
#include <freetype/internal/sfnt.h> #include <freetype/internal/sfnt.h>
#include <freetype/internal/psnames.h> #include <freetype/internal/psnames.h>
#include <freetype/ttnameid.h> #include <freetype/ttnameid.h>

View File

@ -19,8 +19,15 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/tterrors.h> #include <freetype/internal/tterrors.h>
#include <ttload.h> #ifdef FT_FLAT_COMPILE
#include <ttcmap.h> #include "ttload.h"
#include "ttcmap.h"
#else
#include <sfnt/ttload.h>
#include <sfnt/ttcmap.h>
#endif
/*************************************************************************/ /*************************************************************************/

View File

@ -21,8 +21,15 @@
#include <freetype/internal/tterrors.h> #include <freetype/internal/tterrors.h>
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <ttload.h> #ifdef FT_FLAT_COMPILE
#include <ttcmap.h> #include "ttload.h"
#include "ttcmap.h"
#else
#include <sfnt/ttload.h>
#include <sfnt/ttcmap.h>
#endif
/*************************************************************************/ /*************************************************************************/

View File

@ -29,8 +29,14 @@
#include <freetype/internal/tterrors.h> #include <freetype/internal/tterrors.h>
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <ttpost.h> #ifdef FT_FLAT_COMPILE
#include <ttload.h> #include "ttpost.h"
#include "ttload.h"
#else
#include <sfnt/ttpost.h>
#include <sfnt/ttload.h>
#endif
/*************************************************************************/ /*************************************************************************/

View File

@ -20,7 +20,12 @@
#include <freetype/internal/tterrors.h> #include <freetype/internal/tterrors.h>
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <ttsbit.h> #ifdef FT_FLAT_COMPILE
#include "ttsbit.h"
#else
#include <sfnt/ttsbit.h>
#endif
/*************************************************************************/ /*************************************************************************/

View File

@ -19,7 +19,12 @@
#ifndef TTSBIT_H #ifndef TTSBIT_H
#define TTSBIT_H #define TTSBIT_H
#include <ttload.h> #ifdef FT_FLAT_COMPILE
#include "ttload.h"
#else
#include <sfnt/ttload.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -123,8 +123,13 @@
#else /* _STANDALONE_ */ #else /* _STANDALONE_ */
#ifdef FT_FLAT_COMPILE
#include "ftgrays.h" #include "ftgrays.h"
#else
#include <smooth/ftgrays.h>
#endif
#include <freetype/internal/ftobjs.h> /* for FT_UNUSED() */ #include <freetype/internal/ftobjs.h> /* for FT_UNUSED() */
#include <freetype/internal/ftdebug.h> /* for FT_TRACE() and FT_ERROR() */ #include <freetype/internal/ftdebug.h> /* for FT_TRACE() and FT_ERROR() */
#include <freetype/ftoutln.h> /* for FT_Outline_Decompose() */ #include <freetype/ftoutln.h> /* for FT_Outline_Decompose() */

View File

@ -18,8 +18,16 @@
#include <freetype/internal/ftobjs.h> #include <freetype/internal/ftobjs.h>
#include <freetype/ftoutln.h> #include <freetype/ftoutln.h>
#include <ftsmooth.h>
#include <ftgrays.h> #ifdef FT_FLAT_COMPILE
#include "ftsmooth.h"
#include "ftgrays.h"
#else
#include <smooth/ftsmooth.h>
#include <smooth/ftgrays.h>
#endif
/* initialize renderer -- init its raster */ /* initialize renderer -- init its raster */

View File

@ -18,15 +18,9 @@
SMOOTH_DIR := $(SRC_)smooth SMOOTH_DIR := $(SRC_)smooth
SMOOTH_DIR_ := $(SMOOTH_DIR)$(SEP) SMOOTH_DIR_ := $(SMOOTH_DIR)$(SEP)
# additional include flags used when compiling the driver
#
SMOOTH_INCLUDE := $(SMOOTH_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
SMOOTH_CFLAGS := $(SMOOTH_INCLUDE:%=$I%) SMOOTH_COMPILE := $(FT_COMPILE)
SMOOTH_COMPILE := $(FT_COMPILE) $(SMOOTH_CFLAGS)
# smooth driver sources (i.e., C files) # smooth driver sources (i.e., C files)

View File

@ -18,8 +18,15 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ftgrays.c> #ifdef FT_FLAT_COMPILE
#include <ftsmooth.c> #include "ftgrays.c"
#include "ftsmooth.c"
#else
#include <smooth/ftgrays.c>
#include <smooth/ftsmooth.c>
#endif
/* END */ /* END */

View File

@ -19,14 +19,9 @@ TT_DIR := $(SRC_)truetype
TT_DIR_ := $(TT_DIR)$(SEP) TT_DIR_ := $(TT_DIR)$(SEP)
# additional include flags used when compiling the driver
#
TT_INCLUDE := $(TT_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
TT_CFLAGS := $(TT_INCLUDE:%=$I%) TT_COMPILE := $(FT_COMPILE)
TT_COMPILE := $(FT_COMPILE) $(TT_CFLAGS)
# TrueType driver sources (i.e., C files) # TrueType driver sources (i.e., C files)

View File

@ -18,13 +18,26 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ttdriver.c> /* driver interface */ #ifdef FT_FLAT_COMPILE
#include <ttpload.c> /* tables loader */
#include <ttgload.c> /* glyph loader */
#include <ttobjs.c> /* object manager */
#include "ttdriver.c" /* driver interface */
#include "ttpload.c" /* tables loader */
#include "ttgload.c" /* glyph loader */
#include "ttobjs.c" /* object manager */
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include <ttinterp.c> /* bytecode interpreter */ #include "ttinterp.c" /* bytecode interpreter */
#endif
#else
#include <truetype/ttdriver.c> /* driver interface */
#include <truetype/ttpload.c> /* tables loader */
#include <truetype/ttgload.c> /* glyph loader */
#include <truetype/ttobjs.c> /* object manager */
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include <truetype/ttinterp.c> /* bytecode interpreter */
#endif
#endif #endif

View File

@ -21,8 +21,14 @@
#include <freetype/internal/sfnt.h> #include <freetype/internal/sfnt.h>
#include <freetype/ttnameid.h> #include <freetype/ttnameid.h>
#include <ttdriver.h> #ifdef FT_FLAT_COMPILE
#include <ttgload.h> #include "ttdriver.h"
#include "ttgload.h"
#else
#include <truetype/ttdriver.h>
#include <truetype/ttgload.h>
#endif
/*************************************************************************/ /*************************************************************************/

View File

@ -23,13 +23,14 @@
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <freetype/ftoutln.h> #include <freetype/ftoutln.h>
#include <ttgload.h> #ifdef FT_FLAT_COMPILE
#include "ttgload.h"
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #else
#include <ttinterp.h> #include <truetype/ttgload.h>
#endif #endif
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */

View File

@ -19,12 +19,23 @@
#ifndef TTGLOAD_H #ifndef TTGLOAD_H
#define TTGLOAD_H #define TTGLOAD_H
#include <ttobjs.h> #ifdef FT_FLAT_COMPILE
#include "ttobjs.h"
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include <ttinterp.h> #include "ttinterp.h"
#endif #endif
#else
#include <truetype/ttobjs.h>
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include <truetype/ttinterp.h>
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -20,9 +20,14 @@
#include <freetype/internal/ftcalc.h> #include <freetype/internal/ftcalc.h>
#include <freetype/ftsystem.h> #include <freetype/ftsystem.h>
#include <ttobjs.h> #ifdef FT_FLAT_COMPILE
#include "ttinterp.h"
#else
#include <truetype/ttinterp.h>
#endif
#include <freetype/internal/tterrors.h> #include <freetype/internal/tterrors.h>
#include <ttinterp.h>
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER

View File

@ -19,7 +19,12 @@
#ifndef TTINTERP_H #ifndef TTINTERP_H
#define TTINTERP_H #define TTINTERP_H
#include <ttobjs.h> #ifdef FT_FLAT_COMPILE
#include "ttobjs.h"
#else
#include <truetype/ttobjs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -24,15 +24,27 @@
#include <freetype/internal/sfnt.h> #include <freetype/internal/sfnt.h>
#include <freetype/internal/psnames.h> #include <freetype/internal/psnames.h>
#include <ttobjs.h>
#include <ttpload.h> #ifdef FT_FLAT_COMPILE
#include <ttgload.h>
#include "ttgload.h"
#include "ttpload.h"
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include "ttinterp.h"
#endif
#else
#include <truetype/ttgload.h>
#include <truetype/ttpload.h>
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include <truetype/ttinterp.h>
#endif
#endif
#include <freetype/internal/tterrors.h> #include <freetype/internal/tterrors.h>
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include <ttinterp.h>
#endif
/*************************************************************************/ /*************************************************************************/

View File

@ -21,7 +21,12 @@
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/tttags.h> #include <freetype/tttags.h>
#include <ttpload.h> #ifdef FT_FLAT_COMPILE
#include "ttpload.h"
#else
#include <truetype/ttpload.h>
#endif
#include <freetype/internal/tterrors.h> #include <freetype/internal/tterrors.h>

View File

@ -19,14 +19,9 @@ T1_DIR := $(SRC_)type1
T1_DIR_ := $(T1_DIR)$(SEP) T1_DIR_ := $(T1_DIR)$(SEP)
# additional include flags used when compiling the driver
#
T1_INCLUDE := $(T1_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
T1_CFLAGS := $(T1_INCLUDE:%=$I%) T1_COMPILE := $(FT_COMPILE)
T1_COMPILE := $(FT_COMPILE) $(T1_CFLAGS)
# Type1 driver sources (i.e., C files) # Type1 driver sources (i.e., C files)

View File

@ -16,7 +16,12 @@
/***************************************************************************/ /***************************************************************************/
#include <t1afm.h> #ifdef FT_FLAT_COMPILE
#include "t1afm.h"
#else
#include <type1/t1afm.h>
#endif
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>

View File

@ -16,9 +16,15 @@
/***************************************************************************/ /***************************************************************************/
#include <t1driver.h> #ifdef FT_FLAT_COMPILE
#include <t1gload.h> #include "t1driver.h"
#include <t1afm.h> #include "t1gload.h"
#include "t1afm.h"
#else
#include <type1/t1driver.h>
#include <type1/t1gload.h>
#include <type1/t1afm.h>
#endif
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>

View File

@ -16,14 +16,26 @@
/***************************************************************************/ /***************************************************************************/
#include <t1gload.h> #ifdef FT_FLAT_COMPILE
#include <type1/t1gload.h>
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
#include <type1/t1hinter.h>
#endif
#else
#include <type1/t1gload.h>
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
#include <type1/t1hinter.h>
#endif
#endif
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/ftoutln.h> #include <freetype/ftoutln.h>
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
#include <t1hinter.h>
#endif
#include <string.h> /* for strcmp() */ #include <string.h> /* for strcmp() */

View File

@ -19,7 +19,12 @@
#ifndef T1GLOAD_H #ifndef T1GLOAD_H
#define T1GLOAD_H #define T1GLOAD_H
#include <t1objs.h> #ifdef FT_FLAT_COMPILE
#include "t1objs.h"
#else
#include <type1/t1objs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -26,8 +26,14 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <t1objs.h> #ifdef FT_FLAT_COMPILE
#include <t1hinter.h> #include "t1objs.h"
#include "t1hinter.h"
#else
#include <type1/t1objs.h>
#include <type1/t1hinter.h>
#endif
/*************************************************************************/ /*************************************************************************/

View File

@ -19,8 +19,13 @@
#ifndef T1HINTER_H #ifndef T1HINTER_H
#define T1HINTER_H #define T1HINTER_H
#include <t1objs.h> #ifdef FT_FLAT_COMPILE
#include <t1gload.h> #include "t1objs.h"
#include "t1gload.h"
#else
#include <type1/t1objs.h>
#include <type1/t1gload.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -20,8 +20,14 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>
#include <t1tokens.h> #ifdef FT_FLAT_COMPILE
#include <t1parse.h> #include "t1tokens.h"
#include "t1parse.h"
#else
#include <type1/t1tokens.h>
#include <type1/t1parse.h>
#endif
#include <stdio.h> #include <stdio.h>

View File

@ -20,7 +20,13 @@
#define T1LOAD_H #define T1LOAD_H
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <t1parse.h>
#ifdef FT_FLAT_COMPILE
#include "t1parse.h"
#else
#include <type1/t1parse.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -19,14 +19,28 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <t1gload.h> #ifdef FT_FLAT_COMPILE
#include <t1load.h>
#include <t1afm.h>
#include "t1gload.h"
#include "t1load.h"
#include "t1afm.h"
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER #ifndef T1_CONFIG_OPTION_DISABLE_HINTER
#include <t1hinter.h> #include "t1hinter.h"
#endif #endif
#else
#include <type1/t1gload.h>
#include <type1/t1load.h>
#include <type1/t1afm.h>
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
#include <type1/t1hinter.h>
#endif
#endif
#include <freetype/internal/psnames.h> #include <freetype/internal/psnames.h>

View File

@ -18,7 +18,13 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>
#include <t1parse.h>
#ifdef FT_FLAT_COMPILE
#include "t1parse.h"
#else
#include <type1/t1parse.h>
#endif
#include <stdio.h> /* for sscanf() */ #include <stdio.h> /* for sscanf() */
#include <string.h> /* for strncpy() */ #include <string.h> /* for strncpy() */

View File

@ -31,7 +31,13 @@
#define T1PARSE_H #define T1PARSE_H
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <t1tokens.h>
#ifdef FT_FLAT_COMPILE
#include "t1tokens.h"
#else
#include <type1/t1tokens.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -32,8 +32,14 @@
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <t1tokens.h> #ifdef FT_FLAT_COMPILE
#include <t1load.h> #include "t1tokens.h"
#include "t1load.h"
#else
#include <type1/t1tokens.h>
#include <type1/t1load.h>
#endif
#include <string.h> /* for strncmp() */ #include <string.h> /* for strncmp() */

View File

@ -19,7 +19,12 @@
#ifndef T1TOKENS_H #ifndef T1TOKENS_H
#define T1TOKENS_H #define T1TOKENS_H
#include <t1objs.h> #ifdef FT_FLAT_COMPILE
#include "t1objs.h"
#else
#include <type1/t1objs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -18,20 +18,39 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <t1driver.c> #ifdef FT_FLAT_COMPILE
#include <t1objs.c>
#include <t1load.c>
#include <t1gload.c>
#include <t1tokens.c>
#include <t1parse.c>
#include "t1driver.c"
#include "t1objs.c"
#include "t1load.c"
#include "t1gload.c"
#include "t1tokens.c"
#include "t1parse.c"
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER #ifndef T1_CONFIG_OPTION_DISABLE_HINTER
#include <t1hinter.c> #include "t1hinter.c"
#endif
#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.c"
#endif #endif
#ifndef T1_CONFIG_OPTION_NO_AFM #else /* FT_FLAT_COMPILE */
#include <t1afm.c>
#include <type1/t1driver.c>
#include <type1/t1objs.c>
#include <type1/t1load.c>
#include <type1/t1gload.c>
#include <type1/t1tokens.c>
#include <type1/t1parse.c>
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
#include <type1/t1hinter.c>
#endif #endif
#ifndef T1_CONFIG_OPTION_NO_AFM
#include <type1/t1afm.c>
#endif
#endif
/* END */ /* END */

View File

@ -19,14 +19,9 @@ T1Z_DIR := $(SRC_)type1z
T1Z_DIR_ := $(T1Z_DIR)$(SEP) T1Z_DIR_ := $(T1Z_DIR)$(SEP)
# additional include flags used when compiling the driver
#
T1Z_INCLUDE := $(SHARED) $(T1Z_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
T1Z_CFLAGS := $(T1Z_INCLUDE:%=$I%) T1Z_COMPILE := $(FT_COMPILE)
T1Z_COMPILE := $(FT_COMPILE) $(T1Z_CFLAGS)
# Type1 driver sources (i.e., C files) # Type1 driver sources (i.e., C files)

View File

@ -18,14 +18,28 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT #define FT_MAKE_OPTION_SINGLE_OBJECT
#include <z1parse.c> #ifdef FT_FLAT_COMPILE
#include <z1load.c>
#include <z1objs.c>
#include <z1driver.c>
#include <z1gload.c>
#include "z1parse.c"
#include "z1load.c"
#include "z1objs.c"
#include "z1driver.c"
#include "z1gload.c"
#ifndef Z1_CONFIG_OPTION_NO_AFM #ifndef Z1_CONFIG_OPTION_NO_AFM
#include <z1afm.c> #include "z1afm.c"
#endif
#else
#include <type1z/z1parse.c>
#include <type1z/z1load.c>
#include <type1z/z1objs.c>
#include <type1z/z1driver.c>
#include <type1z/z1gload.c>
#ifndef Z1_CONFIG_OPTION_NO_AFM
#include <type1z/z1afm.c>
#endif
#endif #endif

View File

@ -16,7 +16,12 @@
/***************************************************************************/ /***************************************************************************/
#include <z1afm.h> #ifdef FT_FLAT_COMPILE
#include "z1afm.h"
#else
#include <type1z/z1afm.h>
#endif
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>

View File

@ -19,7 +19,12 @@
#ifndef Z1AFM_H #ifndef Z1AFM_H
#define Z1AFM_H #define Z1AFM_H
#include <z1objs.h> #ifdef FT_FLAT_COMPILE
#include "z1objs.h"
#else
#include <type1z/z1objs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -15,10 +15,18 @@
* *
******************************************************************/ ******************************************************************/
#include <z1driver.h> #ifdef FT_FLAT_COMPILE
#include <z1gload.h> #include "z1driver.h"
#include <z1load.h> #include "z1gload.h"
#include <z1afm.h> #include "z1load.h"
#include "z1afm.h"
#else
#include <type1z/z1driver.h>
#include <type1z/z1gload.h>
#include <type1z/z1load.h>
#include <type1z/z1afm.h>
#endif
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>

View File

@ -15,7 +15,12 @@
* *
******************************************************************/ ******************************************************************/
#include <z1gload.h> #ifdef FT_FLAT_COMPILE
#include "z1gload.h"
#else
#include <type1z/z1gload.h>
#endif
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/ftoutln.h> #include <freetype/ftoutln.h>

View File

@ -35,7 +35,12 @@
#ifndef Z1GLOAD_H #ifndef Z1GLOAD_H
#define Z1GLOAD_H #define Z1GLOAD_H
#include <z1objs.h> #ifdef FT_FLAT_COMPILE
#include "z1objs.h"
#else
#include <type1z/z1objs.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -65,7 +65,13 @@
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>
#include <freetype/internal/t1errors.h> #include <freetype/internal/t1errors.h>
#include <z1load.h>
#ifdef FT_FLAT_COMPILE
#include "z1load.h"
#else
#include <type1z/z1load.h>
#endif
#include <stdio.h> #include <stdio.h>
#undef FT_COMPONENT #undef FT_COMPONENT
@ -631,7 +637,11 @@
#define Z1_TOPDICT_NUM_FIXED2(n,f,m) Z1_NEW_FIXED_TABLE2(n,f,m) #define Z1_TOPDICT_NUM_FIXED2(n,f,m) Z1_NEW_FIXED_TABLE2(n,f,m)
/* including this file defines all field variables */ /* including this file defines all field variables */
#include <z1tokens.h> #ifdef FT_FLAT_COMPILE
#include "z1tokens.h"
#else
#include <type1z/z1tokens.h>
#endif
/********************************************************************* /*********************************************************************
* *
@ -1203,7 +1213,11 @@
static static
const Z1_KeyWord t1_keywords[] = const Z1_KeyWord t1_keywords[] =
{ {
#include <z1tokens.h> #ifdef FT_FLAT_COMPILE
#include "z1tokens.h"
#else
#include <type1z/z1tokens.h>
#endif
/* now add the special functions... */ /* now add the special functions... */
Z1_KEYWORD_CALLBACK( "FontName", parse_font_name ), Z1_KEYWORD_CALLBACK( "FontName", parse_font_name ),

View File

@ -21,7 +21,14 @@
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/t1types.h> #include <freetype/internal/t1types.h>
#include <freetype/ftmm.h> #include <freetype/ftmm.h>
#include <z1parse.h>
#ifdef FT_FLAT_COMPILE
#include "z1parse.h"
#else
#include <type1z/z1parse.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -18,10 +18,18 @@
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <z1gload.h> #ifdef FT_FLAT_COMPILE
#include <z1load.h> #include "z1gload.h"
#include "z1load.h"
#include "z1afm.h"
#else
#include <type1z/z1gload.h>
#include <type1z/z1load.h>
#include <type1z/z1afm.h>
#endif
#include <freetype/internal/psnames.h> #include <freetype/internal/psnames.h>
#include <z1afm.h>
/* Required by tracing mode */ /* Required by tracing mode */
#undef FT_COMPONENT #undef FT_COMPONENT

View File

@ -33,7 +33,13 @@
#include <freetype/internal/ftobjs.h> #include <freetype/internal/ftobjs.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/t1errors.h> #include <freetype/internal/t1errors.h>
#include <z1parse.h>
#ifdef FT_FLAT_COMPILE
#include "z1parse.h"
#else
#include <type1z/z1parse.h>
#endif
#undef FT_COMPONENT #undef FT_COMPONENT
#define FT_COMPONENT trace_t1load #define FT_COMPONENT trace_t1load

View File

@ -19,14 +19,7 @@ FNT_DIR := $(SRC_)winfonts
FNT_DIR_ := $(FNT_DIR)$(SEP) FNT_DIR_ := $(FNT_DIR)$(SEP)
# additional include flags used when compiling the driver FNT_COMPILE := $(FT_COMPILE)
#
FNT_INCLUDE := $(FNT_DIR)
# compilation flags for the driver
#
FNT_CFLAGS := $(FNT_INCLUDE:%=$I%)
FNT_COMPILE := $(FT_COMPILE) $(FNT_CFLAGS)
# Windows driver sources (i.e., C files) # Windows driver sources (i.e., C files)

View File

@ -15,7 +15,12 @@
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#include <winfnt.h> #ifdef FT_FLAT_COMPILE
#include "winfnt.h"
#else
#include <winfonts/winfnt.h>
#endif
#include <freetype/fterrors.h> #include <freetype/fterrors.h>
#include <freetype/internal/ftstream.h> #include <freetype/internal/ftstream.h>
#include <freetype/internal/ftdebug.h> #include <freetype/internal/ftdebug.h>
@ -170,6 +175,7 @@
READ_Fields( winmz_header_fields, &mz_header ) ) READ_Fields( winmz_header_fields, &mz_header ) )
goto Exit; goto Exit;
error = FT_Err_Unknown_File_Format;
if ( mz_header.magic == WINFNT_MZ_MAGIC ) if ( mz_header.magic == WINFNT_MZ_MAGIC )
{ {
/* yes, now look for a NE header in the file */ /* yes, now look for a NE header in the file */
@ -179,6 +185,7 @@
READ_Fields( winne_header_fields, &ne_header ) ) READ_Fields( winne_header_fields, &ne_header ) )
goto Exit; goto Exit;
error = FT_Err_Unknown_File_Format;
if ( ne_header.magic == WINFNT_NE_MAGIC ) if ( ne_header.magic == WINFNT_NE_MAGIC )
{ {
/* good, now look in the resource table for each FNT resource */ /* good, now look in the resource table for each FNT resource */