forked from minhngoc25a/freetype2
A complete revision of FreeType 2's GNU makefiles (of the library):
Tons of unnecessary stuff have been removed; only the essential rules have been retained. The source files now depend on all header files in include/freetype, include/freetype/config, and include/freetype/internal. This is not optimal, I know, and I'll try to improve this, but it is better than before (namely no dependencies on `internal'). FTDEBUG_SRC has been added (similar to FTSYS_SRC) -- I don't know exactly whether this is really useful, but it doesn't harm. There is now more documentation in the makefiles itself. io-frames.html: Use of <th>, <code>, and <var> for better tagging. Reactivating of FT_DEBUG_LEVEL_xxx macros. Added a lot of #include directives to make `multi' builds possible -- note that currently the modules cid, t1, and t1z have clashing structures and functions which means that you can only use one of these three modules for a multi build. Added some missing function declarations to (local) header files. Renamed some T1_Open_Face() to CID_Open_Face() in the cid module -- a lot of other functions should be renamed also... Replaced many FT_xxx stuff with T1_xxx in t1z driver -- this isn't finished yet... Fixed FT_Free() to allow a NULL pointer without an assertion (this has always been a valid assumption in FreeType, at least in FT 1.x). A lot of other, minor fixes (mostly documentation).
This commit is contained in:
parent
cb9109fc40
commit
e35cac66c6
4
Makefile
4
Makefile
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -91,7 +91,7 @@ else
|
||||||
|
|
||||||
# A configuration sub-Makefile is present -- simply run it.
|
# A configuration sub-Makefile is present -- simply run it.
|
||||||
#
|
#
|
||||||
all: build_freetype
|
all: single
|
||||||
|
|
||||||
modules: make_module_list
|
modules: make_module_list
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -36,7 +36,7 @@ PLATFORM := ansi
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# The directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# to suit particular needs.
|
# to suit particular needs.
|
||||||
|
@ -121,7 +121,7 @@ ifdef BUILD_FREETYPE
|
||||||
# It is part of the system-specific sub-Makefile because not all
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
# librarians accept a simple syntax like:
|
# librarians accept a simple syntax like:
|
||||||
#
|
#
|
||||||
# librarian library_file {list of object files}
|
# librarian library_file {list of object files}
|
||||||
#
|
#
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
-$(DELETE) $@
|
-$(DELETE) $@
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -40,17 +40,17 @@
|
||||||
# If TOP is not defined, default it to `.'
|
# If TOP is not defined, default it to `.'
|
||||||
#
|
#
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set auto-detection default to `ansi'.
|
# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
|
||||||
# Note that we delay the evaluation of $(BUILD_CONFIG_), $(BUILD), and
|
# Note that we delay the evaluation of $(BUILD_CONFIG_), $(BUILD), and
|
||||||
# $(CONFIG_RULES).
|
# $(CONFIG_RULES).
|
||||||
#
|
#
|
||||||
PLATFORM := ansi
|
PLATFORM := ansi
|
||||||
DELETE := $(RM)
|
DELETE := $(RM)
|
||||||
COPY := cp
|
COPY := cp
|
||||||
SEP := /
|
SEP := /
|
||||||
|
|
||||||
BUILD_CONFIG_ = $(TOP)$(SEP)config$(SEP)
|
BUILD_CONFIG_ = $(TOP)$(SEP)config$(SEP)
|
||||||
BUILD = $(BUILD_CONFIG_)$(PLATFORM)
|
BUILD = $(BUILD_CONFIG_)$(PLATFORM)
|
||||||
|
@ -84,7 +84,7 @@ ifndef CONFIG_FILE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The following targets are equivalent, with the exception that they use
|
# The following targets are equivalent, with the exception that they use
|
||||||
# slightly different syntaxes for the `echo' command.
|
# a slightly different syntax for the `echo' command.
|
||||||
#
|
#
|
||||||
# std_setup: defined for most (i.e. Unix-like) platforms
|
# std_setup: defined for most (i.e. Unix-like) platforms
|
||||||
# dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
|
# dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -25,8 +25,7 @@ ifeq ($(PLATFORM),ansi)
|
||||||
is_dos := $(findstring Dos,$(shell ver))
|
is_dos := $(findstring Dos,$(shell ver))
|
||||||
|
|
||||||
# We try to recognize a Dos session under OS/2. The `ver' command
|
# We try to recognize a Dos session under OS/2. The `ver' command
|
||||||
# returns `Operating System/2 ...' there, so `is_dos' should be empty
|
# returns `Operating System/2 ...' there, so `is_dos' should be empty.
|
||||||
# there.
|
|
||||||
#
|
#
|
||||||
# To recognize a Dos session under OS/2, we check COMSPEC for the
|
# To recognize a Dos session under OS/2, we check COMSPEC for the
|
||||||
# substring `MDOS\COMMAND'
|
# substring `MDOS\COMMAND'
|
||||||
|
@ -49,6 +48,8 @@ ifeq ($(PLATFORM),ansi)
|
||||||
CC := gcc
|
CC := gcc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# additionally, we provide hooks for various other compilers
|
||||||
|
#
|
||||||
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
|
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
|
||||||
CONFIG_FILE := dos-tcc.mk
|
CONFIG_FILE := dos-tcc.mk
|
||||||
SEP := $(BACKSLASH)
|
SEP := $(BACKSLASH)
|
||||||
|
@ -63,14 +64,14 @@ ifeq ($(PLATFORM),ansi)
|
||||||
.PHONY: watcom
|
.PHONY: watcom
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16 bits
|
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
|
||||||
CONFIG_FILE := dos-bcc.mk
|
CONFIG_FILE := dos-bcc.mk
|
||||||
SEP := $(BACKSLASH)
|
SEP := $(BACKSLASH)
|
||||||
CC := bcc
|
CC := bcc
|
||||||
.PHONY: borlandc16
|
.PHONY: borlandc16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32 bits
|
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
|
||||||
CONFIG_FILE := dos-bcc.mk
|
CONFIG_FILE := dos-bcc.mk
|
||||||
SEP := $(BACKSLASH)
|
SEP := $(BACKSLASH)
|
||||||
CC := bcc32
|
CC := bcc32
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -17,27 +17,72 @@
|
||||||
# OTHER MAKEFILES.
|
# OTHER MAKEFILES.
|
||||||
|
|
||||||
|
|
||||||
# The targets `objects' and `library' are defined at the end of this
|
# The following variables (set by other Makefile components, in the
|
||||||
# Makefile when all rules have been included.
|
# environment, or on the command line) are used:
|
||||||
#
|
#
|
||||||
.PHONY: build_freetype objects library
|
# BUILD The architecture dependent directory,
|
||||||
|
# e.g. `$(TOP)/config/unix'.
|
||||||
|
#
|
||||||
|
# OBJ_DIR The directory in which object files are created.
|
||||||
|
#
|
||||||
|
# LIB_DIR The directory in which the library is created.
|
||||||
|
#
|
||||||
|
# INCLUDES A list of directories to be included additionally.
|
||||||
|
# Usually empty.
|
||||||
|
#
|
||||||
|
# CFLAGS Compilation flags. This overrides the default settings
|
||||||
|
# in the platform-specific configuration files.
|
||||||
|
#
|
||||||
|
# FTSYS_SRC If set, its value is used as the name of a replacement
|
||||||
|
# file for `src/base/ftsystem.c'.
|
||||||
|
#
|
||||||
|
# FTDEBUG_SRC If set, its value is used as the name of a replacement
|
||||||
|
# file for `src/base/ftdebug.c'. [For a normal build, this
|
||||||
|
# file does nothing.]
|
||||||
|
#
|
||||||
|
# FT_MODULE_LIST The file which contains the list of modules for the
|
||||||
|
# current build. Usually, this is automatically created by
|
||||||
|
# `modules.mk'.
|
||||||
|
#
|
||||||
|
# BASE_OBJ_S
|
||||||
|
# BASE_OBJ_M A list of base objects (for single object and multiple
|
||||||
|
# object builds, respectively). Set up in
|
||||||
|
# `src/base/rules.mk'.
|
||||||
|
#
|
||||||
|
# BASE_EXT_OBJ A list of base extension objects. Set up in
|
||||||
|
# `src/base/rules.mk'.
|
||||||
|
#
|
||||||
|
# DRV_OBJ_S
|
||||||
|
# DRV_OBJ_M A list of driver objects (for single object and multiple
|
||||||
|
# object builds, respectively). Set up cumulatively in
|
||||||
|
# `src/<driver>/rules.mk'.
|
||||||
|
#
|
||||||
|
# TOP, SEP,
|
||||||
|
# LIBRARY, CC,
|
||||||
|
# A, I, O, T Check `config.mk' for details.
|
||||||
|
|
||||||
# default target -- build objects and library
|
|
||||||
|
# The targets `objects' and `library' are defined at the end of this
|
||||||
|
# Makefile after all other rules have been included.
|
||||||
#
|
#
|
||||||
build_freetype: objects library
|
.PHONY: single objects library
|
||||||
|
|
||||||
|
# default target -- build single objects and library
|
||||||
|
#
|
||||||
|
single: objects library
|
||||||
|
|
||||||
# `multi' target -- build multiple objects and library
|
# `multi' target -- build multiple objects and library
|
||||||
#
|
#
|
||||||
multi: objects library
|
multi: objects library
|
||||||
|
|
||||||
|
|
||||||
# The FreeType source directory.
|
# The FreeType source directory, usually `./src'.
|
||||||
#
|
#
|
||||||
SRC := $(TOP)$(SEP)src
|
SRC := $(TOP)$(SEP)src
|
||||||
|
|
||||||
|
|
||||||
# The directory where the base layer components are placed. By default,
|
# The directory where the base layer components are placed, usually
|
||||||
# this is `freetype/src/base'.
|
# `./src/base'.
|
||||||
#
|
#
|
||||||
BASE_DIR := $(SRC)$(SEP)base
|
BASE_DIR := $(SRC)$(SEP)base
|
||||||
|
|
||||||
|
@ -45,7 +90,7 @@ BASE_DIR := $(SRC)$(SEP)base
|
||||||
# A few short-cuts in order to avoid typing $(SEP) all the time for the
|
# A few short-cuts in order to avoid typing $(SEP) all the time for the
|
||||||
# directory separator.
|
# directory separator.
|
||||||
#
|
#
|
||||||
# For example: SRC_ equals to `./src/' where `.' is $(TOP).
|
# For example: $(SRC_) equals to `./src/' where `.' is $(TOP).
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
SRC_ := $(SRC)$(SEP)
|
SRC_ := $(SRC)$(SEP)
|
||||||
|
@ -57,7 +102,7 @@ INTERNAL_ := $(PUBLIC_)internal$(SEP)
|
||||||
CONFIG_ := $(PUBLIC_)config$(SEP)
|
CONFIG_ := $(PUBLIC_)config$(SEP)
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The final name of the library file.
|
||||||
#
|
#
|
||||||
FT_LIBRARY := $(LIB_)$(LIBRARY).$A
|
FT_LIBRARY := $(LIB_)$(LIBRARY).$A
|
||||||
|
|
||||||
|
@ -76,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 `config/<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)
|
||||||
|
@ -84,72 +129,71 @@ FT_CC = $(CC) $(FT_CFLAGS)
|
||||||
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
|
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# include the `modules' rules file
|
# Include the `modules' rules file.
|
||||||
#
|
#
|
||||||
include $(TOP)/config/modules.mk
|
include $(TOP)/config/modules.mk
|
||||||
|
|
||||||
|
|
||||||
# Free the lists of driver objects.
|
# Initialize the list of objects.
|
||||||
#
|
#
|
||||||
COMPONENTS_LIST :=
|
OBJECTS_LIST :=
|
||||||
DRIVERS_LIST :=
|
|
||||||
OBJECTS_LIST :=
|
|
||||||
|
|
||||||
# Define $(PUBLIC_H) as the list of all public header files located in
|
# Define $(PUBLIC_H) as the list of all public header files located in
|
||||||
# `$(TOP)/include'.
|
# `$(TOP)/include/freetype'. $(BASE_H) and $(CONFIG_H) are defined
|
||||||
|
# similarly.
|
||||||
#
|
#
|
||||||
PUBLIC_H := $(wildcard $(PUBLIC_)*.h)
|
# This is used to simplify the dependency rules -- if one of these files
|
||||||
BASE_H := $(wildcard $(INTERNAL_)*.h)
|
# changes, the whole library is recompiled.
|
||||||
|
#
|
||||||
|
PUBLIC_H := $(wildcard $(PUBLIC_)*.h)
|
||||||
|
BASE_H := $(wildcard $(INTERNAL_)*.h)
|
||||||
|
CONFIG_H := $(wildcard $(CONFIG_)*.h)
|
||||||
|
|
||||||
# System-specific component -- this must be defined in this Makefile for
|
FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H)
|
||||||
# easy updates. The default ANSI ftsystem.c is located in
|
|
||||||
# `freetype/config/ftsystem.c'. However, some system-specific configuration
|
|
||||||
# might define $(FTSYS_SRC) to fetch it in other places, like
|
# ftsystem component
|
||||||
# `freetype/config/<system>/ftsystem.c'.
|
|
||||||
#
|
|
||||||
# $(BASE_H) is defined in `src/base/rules.mk' and contains the list of all
|
|
||||||
# base layer header files.
|
|
||||||
#
|
#
|
||||||
ifndef FTSYS_SRC
|
ifndef FTSYS_SRC
|
||||||
FTSYS_SRC = $(BASE_)ftsystem.c
|
FTSYS_SRC = $(BASE_)ftsystem.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
FTSYS_OBJ = $(OBJ_)ftsystem.$O
|
FTSYS_OBJ = $(OBJ_)ftsystem.$O
|
||||||
|
|
||||||
OBJECTS_LIST += $(FTSYS_OBJ)
|
OBJECTS_LIST += $(FTSYS_OBJ)
|
||||||
|
|
||||||
$(FTSYS_OBJ): $(FTSYS_SRC) $(BASE_H)
|
$(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H)
|
||||||
$(FT_COMPILE) $T$@ $<
|
$(FT_COMPILE) $T$@ $<
|
||||||
|
|
||||||
|
|
||||||
# ftdebug component
|
# ftdebug component
|
||||||
#
|
#
|
||||||
# FTDebug contains code used to print traces and errors. It is normally
|
ifndef FTDEBUG_SRC
|
||||||
# empty for a release build (see ftoption.h).
|
FTDEBUG_SRC = $(BASE_)ftdebug.c
|
||||||
#
|
endif
|
||||||
FTDEBUG_SRC = $(BASE_)ftdebug.c
|
|
||||||
FTDEBUG_OBJ = $(OBJ_)ftdebug.$O
|
FTDEBUG_OBJ = $(OBJ_)ftdebug.$O
|
||||||
|
|
||||||
OBJECTS_LIST += $(FTDEBUG_OBJ)
|
OBJECTS_LIST += $(FTDEBUG_OBJ)
|
||||||
|
|
||||||
$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(BASE_H)
|
$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H)
|
||||||
$(FT_COMPILE) $T$@ $<
|
$(FT_COMPILE) $T$@ $<
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Include all rule files from FreeType components.
|
# Include all rule files from FreeType components.
|
||||||
#
|
#
|
||||||
include $(wildcard $(SRC)/*/rules.mk)
|
include $(wildcard $(SRC)/*/rules.mk)
|
||||||
|
|
||||||
|
|
||||||
# FTInit file
|
# ftinit component
|
||||||
#
|
#
|
||||||
# The C source `ftinit.c' contains the FreeType initialization routines.
|
# The C source `ftinit.c' contains the FreeType initialization routines.
|
||||||
# It is able to automatically register one or more drivers when the API
|
# It is able to automatically register one or more drivers when the API
|
||||||
# function FT_Init_FreeType() is called.
|
# function FT_Init_FreeType() is called.
|
||||||
#
|
#
|
||||||
# The set of initial drivers is determined by the driver Makefiles
|
# The set of initial drivers is determined by the driver Makefiles
|
||||||
# includes above. Each driver Makefile updates the FTINIT_xxxx lists
|
# includes above. Each driver Makefile updates the FTINIT_xxx lists
|
||||||
# which contain additional include paths and macros used to compile the
|
# which contain additional include paths and macros used to compile the
|
||||||
# single `ftinit.c' source.
|
# single `ftinit.c' source.
|
||||||
#
|
#
|
||||||
|
@ -158,7 +202,7 @@ FTINIT_OBJ := $(OBJ_)ftinit.$O
|
||||||
|
|
||||||
OBJECTS_LIST += $(FTINIT_OBJ)
|
OBJECTS_LIST += $(FTINIT_OBJ)
|
||||||
|
|
||||||
$(FTINIT_OBJ): $(FTINIT_SRC) $(PUBLIC_H) $(FT_MODULE_LIST)
|
$(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H) $(FT_MODULE_LIST)
|
||||||
$(FT_COMPILE) $T$@ $<
|
$(FT_COMPILE) $T$@ $<
|
||||||
|
|
||||||
|
|
||||||
|
@ -221,11 +265,10 @@ remove_config_mk:
|
||||||
|
|
||||||
# The `config.mk' file must define `clean_freetype' and
|
# The `config.mk' file must define `clean_freetype' and
|
||||||
# `distclean_freetype'. Implementations may use to relay these to either
|
# `distclean_freetype'. Implementations may use to relay these to either
|
||||||
# the `std' or `dos' versions, or simply provide their own implementation.
|
# the `std' or `dos' versions from above, or simply provide their own
|
||||||
|
# implementation.
|
||||||
#
|
#
|
||||||
clean: clean_freetype
|
clean: clean_freetype
|
||||||
distclean: distclean_freetype remove_config_mk
|
distclean: distclean_freetype remove_config_mk
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -17,12 +17,12 @@
|
||||||
|
|
||||||
|
|
||||||
# This file is in charge of handling the generation of the modules list
|
# This file is in charge of handling the generation of the modules list
|
||||||
# file, normally located in `config/ftmodule.h'.
|
# file.
|
||||||
|
|
||||||
.PHONY: make_module_list clean_module_list remake_module_list
|
.PHONY: make_module_list clean_module_list remake_module_list
|
||||||
|
|
||||||
# MODULE_LIST, as its name suggests, indicates where the modules list
|
# MODULE_LIST, as its name suggests, indicates where the modules list
|
||||||
# resides. For now, it is in `config/ftmodule.h'.
|
# resides. For now, it is in `include/freetype/config/ftmodule.h'.
|
||||||
#
|
#
|
||||||
ifndef FT_MODULE_LIST
|
ifndef FT_MODULE_LIST
|
||||||
FT_MODULE_LIST := $(TOP)$(SEP)include$(SEP)freetype$(SEP)config$(SEP)ftmodule.h
|
FT_MODULE_LIST := $(TOP)$(SEP)include$(SEP)freetype$(SEP)config$(SEP)ftmodule.h
|
||||||
|
@ -30,6 +30,9 @@ endif
|
||||||
|
|
||||||
# To build the modules list, we invoke the `make_module_list' target.
|
# To build the modules list, we invoke the `make_module_list' target.
|
||||||
#
|
#
|
||||||
|
# This rule is commented out by default since FreeType comes already with
|
||||||
|
# a ftmodule.h file.
|
||||||
|
#
|
||||||
#$(FT_MODULE_LIST): make_module_list
|
#$(FT_MODULE_LIST): make_module_list
|
||||||
|
|
||||||
# Before the modules list file can be generated, we must remove the file in
|
# Before the modules list file can be generated, we must remove the file in
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(PLATFORM),ansi)
|
ifeq ($(PLATFORM),ansi)
|
||||||
|
|
||||||
ifdef OS2_SHELL
|
ifdef OS2_SHELL
|
||||||
|
|
||||||
PLATFORM := os2
|
PLATFORM := os2
|
||||||
|
@ -23,6 +24,8 @@ ifeq ($(PLATFORM),ansi)
|
||||||
CONFIG_FILE := os2-gcc.mk # gcc-emx by default
|
CONFIG_FILE := os2-gcc.mk # gcc-emx by default
|
||||||
SEP := /
|
SEP := /
|
||||||
|
|
||||||
|
# additionally, we provide hooks for various other compilers
|
||||||
|
#
|
||||||
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
|
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
|
||||||
CONFIG_FILE := os2-icc.mk
|
CONFIG_FILE := os2-icc.mk
|
||||||
SEP := $(BACKSLASH)
|
SEP := $(BACKSLASH)
|
||||||
|
@ -37,14 +40,14 @@ ifeq ($(PLATFORM),ansi)
|
||||||
.PHONY: watcom
|
.PHONY: watcom
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32 bits
|
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit
|
||||||
CONFIG_FILE := os2-bcc.mk
|
CONFIG_FILE := os2-bcc.mk
|
||||||
SEP := $(BACKSLASH)
|
SEP := $(BACKSLASH)
|
||||||
CC := bcc32
|
CC := bcc32
|
||||||
.PHONY: borlandc
|
.PHONY: borlandc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring devel,$(MAKECMDGOALS)),)
|
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
|
||||||
CONFIG_FILE := os2-dev.mk
|
CONFIG_FILE := os2-dev.mk
|
||||||
CC := gcc
|
CC := gcc
|
||||||
SEP := /
|
SEP := /
|
||||||
|
|
|
@ -1,24 +1,22 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 configuration rules for OS/2 + gcc
|
||||||
#* FreeType 2 Configuration rules for OS/2 + gcc
|
#
|
||||||
#* THIS VERSION TURNS OFF OPTIMIZATIONS FOR DEBUGGING !!
|
# Development version without optimizations.
|
||||||
#*
|
#
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
||||||
#*
|
# Copyright 1996-2000 by
|
||||||
#* This file is part of the FreeType project, and may only be used
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* modified and distributed under the terms of the FreeType project
|
#
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* this file you indicate that you have read the license and
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* understand and accept it fully.
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#*
|
# indicate that you have read the license and understand and accept it
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
# fully.
|
||||||
#* what this file does..
|
|
||||||
#*
|
|
||||||
#*******************************************************************
|
|
||||||
|
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DELETE := del
|
DELETE := del
|
||||||
|
@ -28,129 +26,110 @@ BUILD := $(TOP)/config/os2
|
||||||
PLATFORM := os2
|
PLATFORM := os2
|
||||||
CC := gcc
|
CC := gcc
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f %TOP%/Makefile setup [options]
|
||||||
|
# make -f %TOP%/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := o
|
O := o
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := a
|
A := a
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := libfreetype
|
LIBRARY := libfreetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := -I
|
I := -I
|
||||||
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# Note that this is only used to compile the demo programs, not
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
# the library itself.
|
|
||||||
#
|
|
||||||
L := -l
|
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
|
||||||
#
|
#
|
||||||
D := -D
|
D := -D
|
||||||
|
|
||||||
|
|
||||||
# Target flag - beware, there is a space after the 'o' !!
|
# The link flag used to specify a given library file on link. Note that
|
||||||
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
#
|
||||||
|
L := -l
|
||||||
|
|
||||||
|
|
||||||
|
# Target flag.
|
||||||
#
|
#
|
||||||
T := -o
|
T := -o # Don't remove this comment line! We need the space after `-o'.
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := -c -g -O0 -Wall
|
CFLAGS := -c -g -O0 -Wall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSIFLAGS := -ansi -pedantic
|
ANSIFLAGS := -ansi -pedantic
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_dos
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_dos
|
#
|
||||||
|
clean_freetype: clean_freetype_dos
|
||||||
|
distclean_freetype: distclean_freetype_dos
|
||||||
|
|
||||||
# Librarian to use to build the static library
|
# Librarian to use to build the static library
|
||||||
#
|
#
|
||||||
FT_LIBRARIAN := $(AR) -r
|
FT_LIBRARIAN := $(AR) -r
|
||||||
|
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
|
||||||
# all librarians accept a simple syntax like :
|
|
||||||
#
|
|
||||||
# librarian library_file {list of object files}
|
|
||||||
#
|
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
|
||||||
-$(DELETE) $@
|
|
||||||
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
|
||||||
|
|
||||||
|
|
||||||
# Cleaning rules
|
|
||||||
#
|
|
||||||
DIR_OBJ := $(subst $(SEP),\,$(OBJ_DIR))
|
|
||||||
|
|
||||||
clean_freetype_objects:
|
|
||||||
-del $(DIR_OBJ)\*.$O
|
|
||||||
|
|
||||||
clean_freetype_lib:
|
|
||||||
-del $(subst $(SEP),\,$(FT_LIBRARY))
|
|
||||||
|
|
||||||
clean: clean_freetype_objects
|
|
||||||
|
|
||||||
|
|
||||||
|
# This final rule is used to link all object files into a single library.
|
||||||
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
|
# librarians accept a simple syntax like
|
||||||
|
#
|
||||||
|
# librarian library_file {list of object files}
|
||||||
|
#
|
||||||
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
|
-$(DELETE) $@
|
||||||
|
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 configuration rules for OS/2 + gcc
|
||||||
#* FreeType 2 Configuration rules for OS/2 + gcc
|
#
|
||||||
#*
|
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
# Copyright 1996-2000 by
|
||||||
#*
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* This file is part of the FreeType project, and may only be used
|
#
|
||||||
#* modified and distributed under the terms of the FreeType project
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* this file you indicate that you have read the license and
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#* understand and accept it fully.
|
# indicate that you have read the license and understand and accept it
|
||||||
#*
|
# fully.
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
|
||||||
#* what this file does..
|
|
||||||
#*
|
|
||||||
#*******************************************************************
|
|
||||||
|
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DELETE := del
|
DELETE := del
|
||||||
|
@ -27,129 +24,110 @@ BUILD := $(TOP)/config/os2
|
||||||
PLATFORM := os2
|
PLATFORM := os2
|
||||||
CC := gcc
|
CC := gcc
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f %TOP%/Makefile setup [options]
|
||||||
|
# make -f %TOP%/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := o
|
O := o
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := a
|
A := a
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := libfreetype
|
LIBRARY := libfreetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := -I
|
I := -I
|
||||||
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# Note that this is only used to compile the demo programs, not
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
# the library itself.
|
|
||||||
#
|
|
||||||
L := -l
|
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
|
||||||
#
|
#
|
||||||
D := -D
|
D := -D
|
||||||
|
|
||||||
|
|
||||||
# Target flag - beware, there is a space after the 'o' !!
|
# The link flag used to specify a given library file on link. Note that
|
||||||
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
#
|
||||||
|
L := -l
|
||||||
|
|
||||||
|
|
||||||
|
# Target flag.
|
||||||
#
|
#
|
||||||
T := -o
|
T := -o # Don't remove this comment line! We need the space after `-o'.
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := -c -g -O6 -Wall
|
CFLAGS := -c -g -O6 -Wall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSIFLAGS := -ansi -pedantic
|
ANSIFLAGS := -ansi -pedantic
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_dos
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_dos
|
#
|
||||||
|
clean_freetype: clean_freetype_dos
|
||||||
|
distclean_freetype: distclean_freetype_dos
|
||||||
|
|
||||||
# Librarian to use to build the static library
|
# Librarian to use to build the static library
|
||||||
#
|
#
|
||||||
FT_LIBRARIAN := $(AR) -r
|
FT_LIBRARIAN := $(AR) -r
|
||||||
|
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
|
||||||
# all librarians accept a simple syntax like :
|
|
||||||
#
|
|
||||||
# librarian library_file {list of object files}
|
|
||||||
#
|
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
|
||||||
-$(DELETE) $@
|
|
||||||
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
|
||||||
|
|
||||||
|
|
||||||
# Cleaning rules
|
|
||||||
#
|
|
||||||
DIR_OBJ := $(subst $(SEP),\,$(OBJ_DIR))
|
|
||||||
|
|
||||||
clean_freetype_objects:
|
|
||||||
-del $(DIR_OBJ)\*.$O
|
|
||||||
|
|
||||||
clean_freetype_lib:
|
|
||||||
-del $(subst $(SEP),\,$(FT_LIBRARY))
|
|
||||||
|
|
||||||
clean: clean_freetype_objects
|
|
||||||
|
|
||||||
|
|
||||||
|
# This final rule is used to link all object files into a single library.
|
||||||
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
|
# librarians accept a simple syntax like
|
||||||
|
#
|
||||||
|
# librarian library_file {list of object files}
|
||||||
|
#
|
||||||
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
|
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
|
||||||
|
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -19,10 +19,6 @@
|
||||||
|
|
||||||
ifeq ($(PLATFORM),ansi)
|
ifeq ($(PLATFORM),ansi)
|
||||||
|
|
||||||
# Some Unix systems like *BSD do not have a /etc/inittab so we commented
|
|
||||||
# the line.. (thanks to Yamano-uchi, Hidetoshi for pointing this out)..
|
|
||||||
#
|
|
||||||
# has_inittab := $(strip $(wildcard /etc/inittab))
|
|
||||||
has_init := $(strip $(wildcard /sbin/init))
|
has_init := $(strip $(wildcard /sbin/init))
|
||||||
ifneq ($(has_init),)
|
ifneq ($(has_init),)
|
||||||
|
|
||||||
|
@ -30,14 +26,14 @@ ifeq ($(PLATFORM),ansi)
|
||||||
COPY := cp
|
COPY := cp
|
||||||
DELETE := rm -f
|
DELETE := rm -f
|
||||||
|
|
||||||
# Test whether we're using gcc. If so, we select the `unix-gcc.mk'
|
# Test whether we are using gcc. If so, we select the `unix-gcc.mk'
|
||||||
# configuration file. Otherwise, the standard `unix.mk' is used which
|
# configuration file. Otherwise, the standard `unix.mk' is used which
|
||||||
# simply calls `cc -c' with no extra arguments.
|
# simply calls `cc -c' with no extra arguments.
|
||||||
#
|
#
|
||||||
# Feel free to add support for other platform specific compilers in this
|
# Feel free to add support for other platform specific compilers in this
|
||||||
# directory (e.g. solaris.mk + changes here to detect the platform).
|
# directory (e.g. solaris.mk + changes here to detect the platform).
|
||||||
#
|
#
|
||||||
ifeq ($(CC),gcc)
|
ifeq ($(firstword $(CC)),gcc)
|
||||||
is_gcc := 1
|
is_gcc := 1
|
||||||
else
|
else
|
||||||
ifneq ($(findstring gcc,$(shell $(CC) -v 2>&1)),)
|
ifneq ($(findstring gcc,$(shell $(CC) -v 2>&1)),)
|
||||||
|
|
|
@ -1,24 +1,22 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 configuration rules for the gcc compiler under UNIX
|
||||||
#* FreeType 2 Configuration rules for a standard Unix + GCC
|
#
|
||||||
#* NOTE: THIS VERSION TURNS OFF ALL OPTIMIZATIONS FOR DEBUGGING !!
|
# Development version without optimizations.
|
||||||
#*
|
#
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
||||||
#*
|
# Copyright 1996-2000 by
|
||||||
#* This file is part of the FreeType project, and may only be used
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* modified and distributed under the terms of the FreeType project
|
#
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* this file you indicate that you have read the license and
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* understand and accept it fully.
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#*
|
# indicate that you have read the license and understand and accept it
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
# fully.
|
||||||
#* what this file does..
|
|
||||||
#*
|
|
||||||
#*******************************************************************
|
|
||||||
|
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DELETE := rm -f
|
DELETE := rm -f
|
||||||
|
@ -27,105 +25,110 @@ HOSTSEP := $(SEP)
|
||||||
BUILD := $(TOP)/config/unix
|
BUILD := $(TOP)/config/unix
|
||||||
PLATFORM := unix
|
PLATFORM := unix
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f $TOP/Makefile setup [options]
|
||||||
|
# make -f $TOP/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := o
|
O := o
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := a
|
A := a
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := libfreetype
|
LIBRARY := libfreetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := -I
|
I := -I
|
||||||
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# Note that this is only used to compile the demo programs, not
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
# the library itself.
|
|
||||||
#
|
|
||||||
L := -l
|
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
|
||||||
#
|
#
|
||||||
D := -D
|
D := -D
|
||||||
|
|
||||||
|
|
||||||
# Target flag - beware, there is a space after the 'o' !!
|
# The link flag used to specify a given library file on link. Note that
|
||||||
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
#
|
||||||
|
L := -l
|
||||||
|
|
||||||
|
|
||||||
|
# Target flag.
|
||||||
#
|
#
|
||||||
T := -o
|
T := -o # Don't remove this comment line! We need the space after `-o'.
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := -c -g -O0 -Wall
|
CFLAGS := -c -g -O0 -Wall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSIFLAGS := -ansi -pedantic
|
ANSIFLAGS := -ansi -pedantic
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_std
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_std
|
#
|
||||||
|
clean_freetype: clean_freetype_std
|
||||||
|
distclean_freetype: distclean_freetype_std
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
# Librarian to use to build the static library
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
#
|
||||||
# all librarians accept a simple syntax like :
|
FT_LIBRARIAN := $(AR) -r
|
||||||
#
|
|
||||||
# librarian library_file {list of object files}
|
|
||||||
#
|
# This final rule is used to link all object files into a single library.
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
-$(DELETE) $@
|
# librarians accept a simple syntax like:
|
||||||
$(AR) -r $@ $(OBJECTS_LIST)
|
#
|
||||||
|
# librarian library_file {list of object files}
|
||||||
|
#
|
||||||
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
|
-$(DELETE) $@
|
||||||
|
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -36,7 +36,7 @@ PLATFORM := unix
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# The directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# to suit particular needs.
|
# to suit particular needs.
|
||||||
|
@ -117,11 +117,11 @@ ifdef BUILD_FREETYPE
|
||||||
FT_LIBRARIAN := $(AR) -r
|
FT_LIBRARIAN := $(AR) -r
|
||||||
|
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single library.
|
# This final rule is used to link all object files into a single library.
|
||||||
# It is part of the system-specific sub-Makefile because not all
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
# librarians accept a simple syntax like:
|
# librarians accept a simple syntax like:
|
||||||
#
|
#
|
||||||
# librarian library_file {list of object files}
|
# librarian library_file {list of object files}
|
||||||
#
|
#
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
-$(DELETE) $@
|
-$(DELETE) $@
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 configuration rules for a standard Unix compiler
|
||||||
#* FreeType 2 Configuration rules for a standard Unix compiler
|
#
|
||||||
#*
|
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
# Copyright 1996-2000 by
|
||||||
#*
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* This file is part of the FreeType project, and may only be used
|
#
|
||||||
#* modified and distributed under the terms of the FreeType project
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* this file you indicate that you have read the license and
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#* understand and accept it fully.
|
# indicate that you have read the license and understand and accept it
|
||||||
#*
|
# fully.
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
|
||||||
#* what this file does..
|
|
||||||
#*
|
|
||||||
#*******************************************************************
|
|
||||||
|
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DELETE := rm -f
|
DELETE := rm -f
|
||||||
|
@ -26,105 +23,110 @@ HOSTSEP := $(SEP)
|
||||||
BUILD := $(TOP)/config/unix
|
BUILD := $(TOP)/config/unix
|
||||||
PLATFORM := unix
|
PLATFORM := unix
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f $TOP/Makefile setup [options]
|
||||||
|
# make -f $TOP/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := o
|
O := o
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := a
|
A := a
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := libfreetype
|
LIBRARY := libfreetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := -I
|
I := -I
|
||||||
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# Note that this is only used to compile the demo programs, not
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
# the library itself.
|
|
||||||
#
|
|
||||||
L := -l
|
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
|
||||||
#
|
#
|
||||||
D := -D
|
D := -D
|
||||||
|
|
||||||
|
|
||||||
# Target flag - beware, there is a space after the 'o' !!
|
# The link flag used to specify a given library file on link. Note that
|
||||||
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
#
|
||||||
|
L := -l
|
||||||
|
|
||||||
|
|
||||||
|
# Target flag.
|
||||||
#
|
#
|
||||||
T := -o
|
T := -o # Don't remove this comment line! We need the space after `-o'.
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := -c
|
CFLAGS := -c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSIFLAGS :=
|
ANSIFLAGS :=
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_std
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_std
|
#
|
||||||
|
clean_freetype: clean_freetype_std
|
||||||
|
distclean_freetype: distclean_freetype_std
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
# Librarian to use to build the static library
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
#
|
||||||
# all librarians accept a simple syntax like :
|
FT_LIBRARIAN := $(AR) -r
|
||||||
#
|
|
||||||
# librarian library_file {list of object files}
|
|
||||||
#
|
# This final rule is used to link all object files into a single library.
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
-$(DELETE) $@
|
# librarians accept a simple syntax like:
|
||||||
$(AR) -r $@ $(OBJECTS_LIST)
|
#
|
||||||
|
# librarian library_file {list of object files}
|
||||||
|
#
|
||||||
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
|
-$(DELETE) $@
|
||||||
|
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
|
@ -25,13 +25,13 @@ ifeq ($(PLATFORM),ansi)
|
||||||
# We test for the COMSPEC environment variable, then run the `ver'
|
# We test for the COMSPEC environment variable, then run the `ver'
|
||||||
# command-line program to see if its output contains the word `Windows'.
|
# command-line program to see if its output contains the word `Windows'.
|
||||||
#
|
#
|
||||||
# If this is true, we're running a win32 platform (or an emulation).
|
# If this is true, we are running a win32 platform (or an emulation).
|
||||||
#
|
#
|
||||||
else
|
else
|
||||||
ifdef COMSPEC
|
ifdef COMSPEC
|
||||||
is_windows := $(findstring Windows,$(strip $(shell ver)))
|
is_windows := $(findstring Windows,$(strip $(shell ver)))
|
||||||
endif
|
endif
|
||||||
endif #test NT
|
endif # test NT
|
||||||
|
|
||||||
ifdef is_windows
|
ifdef is_windows
|
||||||
|
|
||||||
|
@ -41,10 +41,12 @@ ifeq ($(PLATFORM),ansi)
|
||||||
|
|
||||||
CONFIG_FILE := w32-gcc.mk # gcc Makefile by default
|
CONFIG_FILE := w32-gcc.mk # gcc Makefile by default
|
||||||
SEP := /
|
SEP := /
|
||||||
ifeq ($(CC),cc)
|
ifeq ($(firstword $(CC)),cc)
|
||||||
CC := gcc
|
CC := gcc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# additionally, we provide hooks for various other compilers
|
||||||
|
#
|
||||||
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
|
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
|
||||||
CONFIG_FILE := w32-vcc.mk
|
CONFIG_FILE := w32-vcc.mk
|
||||||
SEP := $(BACKSLASH)
|
SEP := $(BACKSLASH)
|
||||||
|
@ -73,7 +75,7 @@ ifeq ($(PLATFORM),ansi)
|
||||||
lcc: setup
|
lcc: setup
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring devel,$(MAKECMDGOALS)),)
|
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
|
||||||
CONFIG_FILE := w32-dev.mk
|
CONFIG_FILE := w32-dev.mk
|
||||||
CC := gcc
|
CC := gcc
|
||||||
SEP := /
|
SEP := /
|
||||||
|
|
|
@ -1,28 +1,25 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 Configuration rules for Win32 + GCC
|
||||||
#* FreeType 2 Configuration rules for Win32 + GCC
|
#
|
||||||
#* THIS VERSION DISABLES OPTIMIZATIONS FOR DEBUGGING !!
|
# Development version without optimizations.
|
||||||
#*
|
#
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
||||||
#*
|
# Copyright 1996-2000 by
|
||||||
#* This file is part of the FreeType project, and may only be used
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* modified and distributed under the terms of the FreeType project
|
#
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* this file you indicate that you have read the license and
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* understand and accept it fully.
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#*
|
# indicate that you have read the license and understand and accept it
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
# fully.
|
||||||
#* what this file does..
|
#
|
||||||
#*
|
# NOTE: This version requires that GNU Make be invoked from the Windows
|
||||||
#*
|
# Shell (_not_ Cygwin BASH)!
|
||||||
#* NOTE : This version requires that GNU Make be invoked from the
|
#
|
||||||
#* Windows Shell (_not_ Cygwin BASH !!)
|
|
||||||
#*
|
|
||||||
#*******************************************************************
|
|
||||||
|
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DELETE := del
|
DELETE := del
|
||||||
|
@ -32,111 +29,110 @@ BUILD := $(TOP)/config/win32
|
||||||
PLATFORM := win32
|
PLATFORM := win32
|
||||||
CC := gcc
|
CC := gcc
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f %TOP%/Makefile setup [options]
|
||||||
|
# make -f %TOP%/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := o
|
O := o
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := a
|
A := a
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := libfreetype
|
LIBRARY := libfreetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := -I
|
I := -I
|
||||||
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# Note that this is only used to compile the demo programs, not
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
# the library itself.
|
|
||||||
#
|
|
||||||
L := -l
|
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
|
||||||
#
|
#
|
||||||
D := -D
|
D := -D
|
||||||
|
|
||||||
|
|
||||||
# Target flag - beware, there is a space after the 'o' !!
|
# The link flag used to specify a given library file on link. Note that
|
||||||
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
#
|
||||||
|
L := -l
|
||||||
|
|
||||||
|
|
||||||
|
# Target flag.
|
||||||
#
|
#
|
||||||
T := -o
|
T := -o # Don't remove this comment line! We need the space after `-o'.
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := -c -g -O0 -Wall
|
CFLAGS := -c -g -O0 -Wall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSIFLAGS := -ansi -pedantic
|
ANSIFLAGS := -ansi -pedantic
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_dos
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_dos
|
#
|
||||||
|
clean_freetype: clean_freetype_dos
|
||||||
|
distclean_freetype: distclean_freetype_dos
|
||||||
|
|
||||||
# Librarian to use to build the static library
|
# Librarian to use to build the static library
|
||||||
#
|
#
|
||||||
FT_LIBRARIAN := $(AR) -r
|
FT_LIBRARIAN := $(AR) -r
|
||||||
|
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
# This final rule is used to link all object files into a single library.
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
# all librarians accept a simple syntax like :
|
# librarians accept a simple syntax like
|
||||||
#
|
#
|
||||||
# librarian library_file {list of object files}
|
# librarian library_file {list of object files}
|
||||||
#
|
#
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
|
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
|
||||||
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -1,27 +1,23 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 Configuration rules for Win32 + GCC
|
||||||
#* FreeType 2 Configuration rules for Win32 + GCC
|
#
|
||||||
#*
|
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
# Copyright 1996-2000 by
|
||||||
#*
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* This file is part of the FreeType project, and may only be used
|
#
|
||||||
#* modified and distributed under the terms of the FreeType project
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* this file you indicate that you have read the license and
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#* understand and accept it fully.
|
# indicate that you have read the license and understand and accept it
|
||||||
#*
|
# fully.
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
#
|
||||||
#* what this file does..
|
# NOTE: This version requires that GNU Make be invoked from the Windows
|
||||||
#*
|
# Shell (_not_ Cygwin BASH)!
|
||||||
#*
|
#
|
||||||
#* NOTE : This version requires that GNU Make be invoked from the
|
|
||||||
#* Windows Shell (_not_ Cygwin BASH !!)
|
|
||||||
#*
|
|
||||||
#*******************************************************************
|
|
||||||
|
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DELETE := del
|
DELETE := del
|
||||||
|
@ -31,111 +27,110 @@ BUILD := $(TOP)/config/win32
|
||||||
PLATFORM := win32
|
PLATFORM := win32
|
||||||
CC := gcc
|
CC := gcc
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f %TOP%/Makefile setup [options]
|
||||||
|
# make -f %TOP%/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := o
|
O := o
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := a
|
A := a
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := libfreetype
|
LIBRARY := libfreetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := -I
|
I := -I
|
||||||
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# Note that this is only used to compile the demo programs, not
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
# the library itself.
|
|
||||||
#
|
|
||||||
L := -l
|
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
|
||||||
#
|
#
|
||||||
D := -D
|
D := -D
|
||||||
|
|
||||||
|
|
||||||
# Target flag - beware, there is a space after the 'o' !!
|
# The link flag used to specify a given library file on link. Note that
|
||||||
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
#
|
||||||
|
L := -l
|
||||||
|
|
||||||
|
|
||||||
|
# Target flag.
|
||||||
#
|
#
|
||||||
T := -o
|
T := -o # Don't remove this comment line! We need the space after `-o'.
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := -c -g -O6 -Wall
|
CFLAGS := -c -g -O6 -Wall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSIFLAGS := -ansi -pedantic
|
ANSIFLAGS := -ansi -pedantic
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_dos
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_dos
|
#
|
||||||
|
clean_freetype: clean_freetype_dos
|
||||||
|
distclean_freetype: distclean_freetype_dos
|
||||||
|
|
||||||
# Librarian to use to build the static library
|
# Librarian to use to build the static library
|
||||||
#
|
#
|
||||||
FT_LIBRARIAN := $(AR) -r
|
FT_LIBRARIAN := $(AR) -r
|
||||||
|
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
# This final rule is used to link all object files into a single library.
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
# all librarians accept a simple syntax like :
|
# librarians accept a simple syntax like
|
||||||
#
|
#
|
||||||
# librarian library_file {list of object files}
|
# librarian library_file {list of object files}
|
||||||
#
|
#
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
|
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
|
||||||
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -1,135 +1,127 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 Configuration rules for Win32 + LCC
|
||||||
#* FreeType 2 Configuration rules for Win32 + LCC
|
#
|
||||||
#*
|
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
# Copyright 1996-2000 by
|
||||||
#*
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* This file is part of the FreeType project, and may only be used
|
#
|
||||||
#* modified and distributed under the terms of the FreeType project
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* this file you indicate that you have read the license and
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#* understand and accept it fully.
|
# indicate that you have read the license and understand and accept it
|
||||||
#*
|
# fully.
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
|
||||||
#* what this file does..
|
|
||||||
#*
|
|
||||||
#*******************************************************************
|
|
||||||
|
|
||||||
ifndef TOP
|
ifndef TOP
|
||||||
TOP := .
|
TOP := .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DELETE := del
|
DELETE := del
|
||||||
SEP := /
|
SEP := /
|
||||||
HOSTSEP := \\
|
HOSTSEP := $(strip \ )
|
||||||
BUILD := $(TOP)$(SEP)config$(SEP)win32
|
BUILD := $(TOP)/config/win32
|
||||||
PLATFORM := win32
|
PLATFORM := win32
|
||||||
CC := lcc
|
CC := lcc
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f %TOP%/Makefile setup [options]
|
||||||
|
# make -f %TOP%/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := obj
|
O := obj
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := lib
|
A := lib
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := freetype
|
LIBRARY := freetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := -I
|
I := -I
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
#
|
#
|
||||||
D := -D
|
D := -D
|
||||||
|
|
||||||
|
|
||||||
# Target flag - LCC uses "-Fo" instead of "-o ", what a broken compiler
|
# The link flag used to specify a given library file on link. Note that
|
||||||
#
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
|
||||||
T := -Fo
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
|
||||||
# Note that this is only used to compile the demo programs, not
|
|
||||||
# the library itself.
|
|
||||||
#
|
#
|
||||||
L := -Fl
|
L := -Fl
|
||||||
|
|
||||||
|
|
||||||
|
# Target flag.
|
||||||
|
#
|
||||||
|
T := -Fo
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := -c -g2 -O
|
CFLAGS := -c -g2 -O
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSIFLAGS :=
|
ANSIFLAGS :=
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_dos
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_dos
|
#
|
||||||
|
clean_freetype: clean_freetype_dos
|
||||||
|
distclean_freetype: distclean_freetype_dos
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
# This final rule is used to link all object files into a single library.
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
# all librarians accept a simple syntax like :
|
# librarians accept a simple syntax like
|
||||||
#
|
#
|
||||||
# librarian library_file {list of object files}
|
# librarian library_file {list of object files}
|
||||||
#
|
#
|
||||||
DIR_OBJ := $(subst /,\\,$(OBJ_DIR))
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
|
lcclnk -o $(subst $(SEP),$(HOSTSEP),$@) \
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
$(subst $(SEP),$(HOSTSEP),$(OBJECTS_LIST))
|
||||||
lcclnk -o $(subst /,\\,$@) $(subst /,\\,$(OBJECTS_LIST))
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -1,127 +1,126 @@
|
||||||
#*******************************************************************
|
#
|
||||||
#*
|
# FreeType 2 Configuration rules for Win32 + LCC
|
||||||
#* FreeType 2 Configuration rules for Win32 + Visual C++
|
#
|
||||||
#*
|
|
||||||
#* Copyright 1996-2000 by
|
|
||||||
#* David Turner, Robert Wilhelm, and Werner Lemberg.
|
# Copyright 1996-2000 by
|
||||||
#*
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#* This file is part of the FreeType project, and may only be used
|
#
|
||||||
#* modified and distributed under the terms of the FreeType project
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
#* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
# and distributed under the terms of the FreeType project license,
|
||||||
#* this file you indicate that you have read the license and
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
#* understand and accept it fully.
|
# indicate that you have read the license and understand and accept it
|
||||||
#*
|
# fully.
|
||||||
#* Please read the file "freetype/docs/config.txt" to understand
|
|
||||||
#* what this file does..
|
ifndef TOP
|
||||||
#*
|
TOP := .
|
||||||
#*******************************************************************
|
endif
|
||||||
|
|
||||||
DELETE := del
|
DELETE := del
|
||||||
SEP := /
|
SEP := /
|
||||||
HOSTSEP := $(strip \ )
|
HOSTSEP := $(strip \ )
|
||||||
BUILD := $(TOP)$(SEP)config$(SEP)win32
|
BUILD := $(TOP)/config/win32
|
||||||
PLATFORM := win32
|
PLATFORM := win32
|
||||||
CC := cl
|
CC := cl
|
||||||
|
|
||||||
# the directory where all object files are placed
|
# The directory where all object files are placed.
|
||||||
#
|
#
|
||||||
# Note that this is not $(TOP)/obj !!
|
# Note that this is not $(TOP)/obj!
|
||||||
# This lets you build the library in your own directory
|
# This lets you build the library in your own directory with something like
|
||||||
# with something like :
|
|
||||||
#
|
|
||||||
# set TOP=....../path/to/freetype2/top/dir...
|
|
||||||
# mkdir obj
|
|
||||||
# make -f %TOP%/Makefile setup [options]
|
|
||||||
# make -f %TOP%/Makefile
|
|
||||||
#
|
#
|
||||||
|
# set TOP=.../path/to/freetype2/top/dir...
|
||||||
|
# mkdir obj
|
||||||
|
# make -f %TOP%/Makefile setup [options]
|
||||||
|
# make -f %TOP%/Makefile
|
||||||
#
|
#
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
|
|
||||||
|
|
||||||
# the directory where all library files are placed
|
# The directory where all library files are placed.
|
||||||
#
|
#
|
||||||
# by default, this is the same as OBJ_DIR, however, this can be
|
# By default, this is the same as $(OBJ_DIR), however, this can be changed
|
||||||
# changed to suit particular needs..
|
# to suit particular needs.
|
||||||
#
|
#
|
||||||
LIB_DIR := $(OBJ_DIR)
|
LIB_DIR := $(OBJ_DIR)
|
||||||
|
|
||||||
|
|
||||||
# the object file extension, this can be .o, .tco, .obj, etc..
|
# The object file extension. This can be .o, .tco, .obj, etc., depending on
|
||||||
# depending on the platform
|
# the platform.
|
||||||
#
|
#
|
||||||
O := obj
|
O := obj
|
||||||
|
|
||||||
# the library file extension, this can be .a, .lib, etc..
|
# The library file extension. This can be .a, .lib, etc., depending on the
|
||||||
# depending on the platform
|
# platform.
|
||||||
#
|
#
|
||||||
A := lib
|
A := lib
|
||||||
|
|
||||||
|
|
||||||
# The name of the final library file.
|
# The name of the final library file. Note that the DOS-specific Makefile
|
||||||
# Note that the DOS-specific Makefile uses a shorter (8.3) name
|
# uses a shorter (8.3) name.
|
||||||
#
|
#
|
||||||
LIBRARY := freetype
|
LIBRARY := freetype
|
||||||
|
|
||||||
|
|
||||||
# path inclusion flag.
|
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||||
#
|
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||||
# Some compilers use a different flag than '-I' to specify an
|
|
||||||
# additional include path. Examples are "/i=" or "-J", etc...
|
|
||||||
#
|
#
|
||||||
I := /I
|
I := /I
|
||||||
|
|
||||||
|
|
||||||
# The link flag used to specify a given library file on link.
|
# C flag used to define a macro before the compilation of a given source
|
||||||
# Note that this is only used to compile the demo programs, not
|
# object. Usually is `-D' like in `-DDEBUG'.
|
||||||
# the library itself.
|
#
|
||||||
|
D := /D
|
||||||
|
|
||||||
|
|
||||||
|
# The link flag used to specify a given library file on link. Note that
|
||||||
|
# this is only used to compile the demo programs, not the library itself.
|
||||||
#
|
#
|
||||||
L := /Fl
|
L := /Fl
|
||||||
|
|
||||||
|
|
||||||
# C flag used to define a macro before the compilation of a given
|
# Target flag.
|
||||||
# source object. Usually is '-D' like in "-DDEBUG"
|
|
||||||
#
|
|
||||||
D := /D
|
|
||||||
|
|
||||||
# Target flag - LCC uses "-Fo" instead of "-o ", what a broken compiler
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
T := /Fo
|
T := /Fo
|
||||||
|
|
||||||
|
|
||||||
# C flags
|
# C flags
|
||||||
#
|
#
|
||||||
# These should concern :
|
# These should concern: debug output, optimization & warnings.
|
||||||
#
|
#
|
||||||
# - debug output
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# - optimization
|
# ANSI compliance.
|
||||||
# - warnings
|
|
||||||
# - ansi compliance..
|
|
||||||
#
|
#
|
||||||
ifndef CFLAGS
|
ifndef CFLAGS
|
||||||
CFLAGS := /nologo /c /Ox /G5 /W3 /WX
|
CFLAGS := /nologo /c /Ox /G5 /W3 /WX
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ANSI_FLAGS : put there the flags used to make your compiler ANSI-compliant
|
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||||
# nothing (if it already is by default like LCC).
|
|
||||||
#
|
#
|
||||||
ANSI_FLAGS := /Za
|
ANSIFLAGS := /Za
|
||||||
|
|
||||||
|
|
||||||
ifdef BUILD_FREETYPE
|
ifdef BUILD_FREETYPE
|
||||||
|
|
||||||
include $(TOP)/config/freetype.mk
|
# Now include the main sub-makefile. It contains all the rules used to
|
||||||
|
# build the library with the previous variables defined.
|
||||||
|
#
|
||||||
|
include $(TOP)/config/freetype.mk
|
||||||
|
|
||||||
clean_freetype: clean_freetype_dos
|
# The cleanup targets.
|
||||||
distclean_freetype: distclean_freetype_dos
|
#
|
||||||
|
clean_freetype: clean_freetype_dos
|
||||||
|
distclean_freetype: distclean_freetype_dos
|
||||||
|
|
||||||
# This final rule is used to link all object files into a single
|
# This final rule is used to link all object files into a single library.
|
||||||
# library. It is part of the system-specific sub-Makefile because not
|
# It is part of the system-specific sub-Makefile because not all
|
||||||
# all librarians accept a simple syntax like :
|
# librarians accept a simple syntax like
|
||||||
#
|
#
|
||||||
# librarian library_file {list of object files}
|
# librarian library_file {list of object files}
|
||||||
#
|
#
|
||||||
$(FT_LIBRARY): $(OBJECTS_LIST)
|
$(FT_LIBRARY): $(OBJECTS_LIST)
|
||||||
lib /nologo /out:$@ $(OBJECTS_LIST)
|
lib /nologo /out:$@ $(OBJECTS_LIST)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p>Simply speaking, a frame is an array of bytes in a font file that is
|
<p>Simply speaking, a frame is an array of bytes in a font file that is
|
||||||
"preloaded" into memory in order to be rapidly parsed. Frames are useful
|
`preloaded' into memory in order to be rapidly parsed. Frames are useful
|
||||||
to ensure that every "load" is checked against end-of-file overruns, and
|
to ensure that every `load' is checked against end-of-file overruns, and
|
||||||
provides nice functions to extract data in a variety of distinct
|
provides nice functions to extract data in a variety of distinct
|
||||||
formats.</p>
|
formats.</p>
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
FT_Forget_Frame( stream );</pre>
|
FT_Forget_Frame( stream );</pre>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
<p>Here, the call to <tt>FT_Access_Frame()</tt> will</p>
|
<p>Here, the call to <code>FT_Access_Frame()</code> will</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
@ -91,20 +91,20 @@
|
||||||
stream.</p>
|
stream.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>"Preload" (for disk-based streams) 10 bytes from the current
|
<p>`Preload' (for disk-based streams) 10 bytes from the current
|
||||||
stream position.</p>
|
stream position.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Set the frame "cursor" to the first byte in the frame.</p>
|
<p>Set the frame `cursor' to the first byte in the frame.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>Each <tt>FT_Get_Short()</tt> or <tt>FT_Get_ULong()</tt> call will read
|
<p>Each <code>FT_Get_Short()</code> or <code>FT_Get_ULong()</code> call
|
||||||
a big-endian integer from the stream (2 bytes for
|
will read a big-endian integer from the stream (2 bytes for
|
||||||
<tt>FT_Get_Short()</tt>, 4 bytes for <tt>FT_Get_ULong</tt>) and
|
<code>FT_Get_Short()</code>, 4 bytes for <code>FT_Get_ULong</code>)
|
||||||
advance the frame cursor accordingly.</p>
|
and advance the frame cursor accordingly.</p>
|
||||||
|
|
||||||
<p><tt>FT_Forget_Frame()</tt> "releases" the frame from memory.</p>
|
<p><code>FT_Forget_Frame()</code> `releases' the frame from memory.</p>
|
||||||
|
|
||||||
<p>There are several advantages to using frames:</p>
|
<p>There are several advantages to using frames:</p>
|
||||||
|
|
||||||
|
@ -126,54 +126,55 @@
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p>By convention in the FreeType source code, macros are able to use two
|
<p>By convention in the FreeType source code, macros are able to use two
|
||||||
implicit variables named <tt>error</tt> and <tt>stream</tt>. This is
|
implicit variables named <var>error</var> and <var>stream</var>. This is
|
||||||
useful because these two variables are extremely often used in the
|
useful because these two variables are extremely often used in the
|
||||||
library, and doing this only reduces our typing requirements and make the
|
library, and doing this only reduces our typing requirements and make the
|
||||||
source code much clearer.</p>
|
source code much clearer.</p>
|
||||||
|
|
||||||
<p>Note that <tt>error</tt> must be a local variable of type
|
<p>Note that <var>error</var> must be a local variable of type
|
||||||
<tt>FT_Error</tt>, while <tt>stream</tt> must be a local variable or
|
<code>FT_Error</code>, while <var>stream</var> must be a local variable or
|
||||||
argument of type <tt>FT_Stream</tt>.</p>
|
argument of type <code>FT_Stream</code>.</p>
|
||||||
|
|
||||||
<p>The macro used to access a frame is <font
|
<p>The macro used to access a frame is <font
|
||||||
color="purple"><tt><b>ACCESS_Frame(_size_)</b></tt></font>, it will
|
color="purple"><code><b>ACCESS_Frame(_size_)</b></code></font>, it will
|
||||||
translate to</p>
|
translate to</p>
|
||||||
|
|
||||||
<font color="blue">
|
<font color="blue">
|
||||||
<pre>
|
<pre>
|
||||||
( error = FT_Access_Frame( stream, _size_ ) )
|
( error = FT_Access_Frame( stream, _size_ ) )
|
||||||
!= FT_Err_Ok</tt></pre>
|
!= FT_Err_Ok</pre>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
<p>Similarly, the macro <font
|
<p>Similarly, the macro <font
|
||||||
color="purple"><b><tt>FORGET_Frame()</tt></b></font> translates to</p>
|
color="purple"><b><code>FORGET_Frame()</code></b></font> translates to</p>
|
||||||
|
|
||||||
<font color="blue">
|
<font color="blue">
|
||||||
<pre>
|
<pre>
|
||||||
<tt>FT_Forget_Frame( stream )</tt></pre>
|
FT_Forget_Frame( stream )</pre>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
<p>Extracting integers can be performed with the <tt>GET_xxx()</tt>
|
<p>Extracting integers can be performed with the <code>GET_xxx()</code>
|
||||||
macros, like</p>
|
macros, like</p>
|
||||||
|
|
||||||
<table align=center>
|
<table align=center
|
||||||
|
cellpadding=5>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<th>
|
||||||
<b>Macro name</b>
|
Macro name
|
||||||
</td>
|
</th>
|
||||||
<td>
|
<th>
|
||||||
Translation
|
Translation
|
||||||
</td>
|
</th>
|
||||||
<td>
|
<th>
|
||||||
Description
|
Description
|
||||||
</td>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_Byte()</b></tt></font>
|
<font color="purple"><code><b>GET_Byte()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>FT_Get_Byte(stream)</tt></font>
|
<font color="blue"><code>FT_Get_Byte(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p>Reads an 8-bit unsigned byte.</p>
|
<p>Reads an 8-bit unsigned byte.</p>
|
||||||
|
@ -181,11 +182,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_Char()</b></tt></font>
|
<font color="purple"><code><b>GET_Char()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>(FT_Char)<br>
|
<font color="blue"><code>(FT_Char)<br>
|
||||||
FT_Get_Byte(stream)</tt></font>
|
FT_Get_Byte(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p>Reads an 8-bit <em>signed</em> byte.</p>
|
<p>Reads an 8-bit <em>signed</em> byte.</p>
|
||||||
|
@ -193,10 +194,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_Short()</b></tt></font>
|
<font color="purple"><code><b>GET_Short()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>FT_Get_Short(stream)</tt></font>
|
<font color="blue"><code>FT_Get_Short(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Reads a 16-bit signed big-endian integer.
|
Reads a 16-bit signed big-endian integer.
|
||||||
|
@ -204,11 +205,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_UShort()</b></tt></font>
|
<font color="purple"><code><b>GET_UShort()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>(FT_UShort)<br>
|
<font color="blue"><code>(FT_UShort)<br>
|
||||||
FT_Get_Short(stream)</tt></font>
|
FT_Get_Short(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Reads a 16-bit unsigned big-endian integer.
|
Reads a 16-bit unsigned big-endian integer.
|
||||||
|
@ -216,10 +217,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_Offset()</b></tt></font>
|
<font color="purple"><code><b>GET_Offset()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>FT_Get_Offset(stream)</tt></font>
|
<font color="blue"><code>FT_Get_Offset(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Reads a 24-bit signed big-endian integer.
|
Reads a 24-bit signed big-endian integer.
|
||||||
|
@ -227,11 +228,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_UOffset()</b></tt></font>
|
<font color="purple"><code><b>GET_UOffset()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>(FT_UOffset)<br>
|
<font color="blue"><code>(FT_UOffset)<br>
|
||||||
FT_Get_Offset(stream)</tt></font>
|
FT_Get_Offset(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Reads a 24-bit unsigned big-endian integer.
|
Reads a 24-bit unsigned big-endian integer.
|
||||||
|
@ -239,10 +240,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_Long()</b></tt></font>
|
<font color="purple"><code><b>GET_Long()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>FT_Get_Long(stream)</tt></font>
|
<font color="blue"><code>FT_Get_Long(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Reads a 32-bit signed big-endian integer.
|
Reads a 32-bit signed big-endian integer.
|
||||||
|
@ -250,11 +251,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<font color="purple"><tt><b>GET_ULong()</b></tt></font>
|
<font color="purple"><code><b>GET_ULong()</b></code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<font color="blue"><tt>(FT_ULong)<br>
|
<font color="blue"><code>(FT_ULong)<br>
|
||||||
FT_Get_Long(stream)</tt></font>
|
FT_Get_Long(stream)</code></font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Reads a 32-bit unsigned big-endian integer.
|
Reads a 32-bit unsigned big-endian integer.
|
||||||
|
@ -292,7 +293,7 @@
|
||||||
FORGET_Frame();</pre>
|
FORGET_Frame();</pre>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
<p>Which is clearer. Notice that <tt>error</tt> and <tt>stream</tt>
|
<p>Which is clearer. Notice that <var>error</var> and <var>stream</var>
|
||||||
must be defined locally though for this code to work!</p>
|
must be defined locally though for this code to work!</p>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -304,18 +305,18 @@
|
||||||
<p>It is sometimes useful to read small integers from a font file without
|
<p>It is sometimes useful to read small integers from a font file without
|
||||||
using a frame. Some functions have been introduced in FreeType 2 to
|
using a frame. Some functions have been introduced in FreeType 2 to
|
||||||
do just that, and they are of the form <font
|
do just that, and they are of the form <font
|
||||||
color="blue"><tt>FT_Read_xxxx</tt></font>.</p>
|
color="blue"><code>FT_Read_xxxx</code></font>.</p>
|
||||||
|
|
||||||
<p>For example, <font color="blue"><tt>FT_Read_Short(stream,
|
<p>For example, <font color="blue"><code>FT_Read_Short(stream,
|
||||||
&error)</tt></font> reads and returns a 2-byte big-endian integer from a
|
&error)</code></font> reads and returns a 2-byte big-endian integer from a
|
||||||
<tt>stream</tt>, and places an error code in the <tt>error</tt>
|
<var>stream</var>, and places an error code in the <var>error</var>
|
||||||
variable.</p>
|
variable.</p>
|
||||||
|
|
||||||
<p>Thus, reading a single big-endian integer is shorter than using a frame
|
<p>Thus, reading a single big-endian integer is shorter than using a frame
|
||||||
for it.</p>
|
for it.</p>
|
||||||
|
|
||||||
<p>Note that there are also macros <font
|
<p>Note that there are also macros <font
|
||||||
color="purple"><tt>READ_xxx()</tt></font> which translate to</p>
|
color="purple"><code>READ_xxx()</code></font> which translate to</p>
|
||||||
|
|
||||||
<font color="blue">
|
<font color="blue">
|
||||||
<pre>
|
<pre>
|
||||||
|
@ -331,7 +332,8 @@
|
||||||
goto Fail;</pre>
|
goto Fail;</pre>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
<p>if <tt>error</tt> and <tt>stream</tt> are already defined locally.</p>
|
<p>if <var>error</var> and <var>stream</var> are already defined
|
||||||
|
locally.</p>
|
||||||
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -206,8 +206,8 @@
|
||||||
/* */
|
/* */
|
||||||
/* Don't define any of these macros to compile in `release' mode. */
|
/* Don't define any of these macros to compile in `release' mode. */
|
||||||
/* */
|
/* */
|
||||||
#undef FT_DEBUG_LEVEL_ERROR
|
#define FT_DEBUG_LEVEL_ERROR
|
||||||
#undef FT_DEBUG_LEVEL_TRACE
|
#define FT_DEBUG_LEVEL_TRACE
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#define SFNT_H
|
#define SFNT_H
|
||||||
|
|
||||||
#include <freetype/freetype.h>
|
#include <freetype/freetype.h>
|
||||||
|
#include <freetype/internal/ftdriver.h>
|
||||||
#include <freetype/internal/tttypes.h>
|
#include <freetype/internal/tttypes.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <freetype/internal/ftextend.h>
|
#include <freetype/internal/ftextend.h>
|
||||||
|
#include <freetype/internal/ftdebug.h>
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
|
@ -192,9 +192,7 @@
|
||||||
FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n",
|
FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n",
|
||||||
P, P ? *P : (void*)0 ));
|
P, P ? *P : (void*)0 ));
|
||||||
|
|
||||||
FT_Assert( P != 0 );
|
if ( P && *P )
|
||||||
|
|
||||||
if ( *P )
|
|
||||||
{
|
{
|
||||||
memory->free( memory, *P );
|
memory->free( memory, *P );
|
||||||
*P = 0;
|
*P = 0;
|
||||||
|
|
|
@ -13,39 +13,31 @@
|
||||||
# fully.
|
# fully.
|
||||||
|
|
||||||
|
|
||||||
# It sets the following variables, which are used by the master Makefile
|
# It sets the following variables which are used by the master Makefile
|
||||||
# after the call:
|
# after the call:
|
||||||
#
|
#
|
||||||
# BASE_H: The list of base layer header files on which the rest
|
# BASE_OBJ_S: The single-object base layer.
|
||||||
# of the library (i.e. drivers) rely.
|
# BASE_OBJ_M: A list of all objects for a multiple-objects build.
|
||||||
|
# BASE_EXT_OBJ: A list of base layer extensions, i.e., components found
|
||||||
|
# in `freetype/src/base' which are not compiled within the
|
||||||
|
# base layer proper.
|
||||||
#
|
#
|
||||||
# BASE_OBJ_S: The single-object base layer.
|
# BASE_H is defined in freetype.mk to simplify the dependency rules.
|
||||||
# BASE_OBJ_M: A list of all objects for a multiple-objects build.
|
|
||||||
# BASE_EXT_OBJ: A list of base layer extensions, i.e., components found
|
|
||||||
# in `freetype/lib/base' which are not compiled within the
|
|
||||||
# base layer proper.
|
|
||||||
|
|
||||||
BASE_COMPILE := $(FT_COMPILE) $I$(SRC_)base
|
BASE_COMPILE := $(FT_COMPILE) $I$(SRC_)base
|
||||||
|
|
||||||
|
|
||||||
# Base layer sources
|
# Base layer sources
|
||||||
#
|
#
|
||||||
BASE_SRC := $(BASE_)ftcalc.c \
|
# ftsystem, ftinit, and ftdebug are handled by freetype.mk
|
||||||
$(BASE_)ftextend.c \
|
|
||||||
$(BASE_)ftlist.c \
|
|
||||||
$(BASE_)ftobjs.c \
|
|
||||||
$(BASE_)ftstream.c \
|
|
||||||
$(BASE_)ftoutln.c
|
|
||||||
|
|
||||||
# Base layer headers
|
|
||||||
#
|
#
|
||||||
BASE_H := $(INTERNAL_)ftcalc.h \
|
BASE_SRC := $(BASE_)ftcalc.c \
|
||||||
$(INTERNAL_)ftdebug.h \
|
$(BASE_)ftextend.c \
|
||||||
$(INTERNAL_)ftdriver.h \
|
$(BASE_)ftlist.c \
|
||||||
$(INTERNAL_)ftextend.h \
|
$(BASE_)ftobjs.c \
|
||||||
$(INTERNAL_)ftlist.h \
|
$(BASE_)ftstream.c \
|
||||||
$(INTERNAL_)ftobjs.h \
|
$(BASE_)ftoutln.c
|
||||||
$(INTERNAL_)ftstream.h
|
|
||||||
|
|
||||||
|
|
||||||
# Base layer `extensions' sources
|
# Base layer `extensions' sources
|
||||||
#
|
#
|
||||||
|
@ -58,10 +50,6 @@ BASE_EXT_SRC := $(BASE_)ftraster.c \
|
||||||
$(BASE_)ftmm.c \
|
$(BASE_)ftmm.c \
|
||||||
$(BASE_)ftgrays.c
|
$(BASE_)ftgrays.c
|
||||||
|
|
||||||
# Base layer extensions headers
|
|
||||||
#
|
|
||||||
BASE_EXT_H := $(BASE_EXT_SRC:%c=%h)
|
|
||||||
|
|
||||||
# Default extensions objects
|
# Default extensions objects
|
||||||
#
|
#
|
||||||
BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
|
BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
|
||||||
|
@ -78,21 +66,20 @@ BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
|
||||||
BASE_OBJ_M := $(BASE_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
|
BASE_OBJ_M := $(BASE_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
|
||||||
BASE_OBJ_S := $(OBJ_)ftbase.$O
|
BASE_OBJ_S := $(OBJ_)ftbase.$O
|
||||||
|
|
||||||
# Base layer root source file(s)
|
# Base layer root source file for single build
|
||||||
#
|
#
|
||||||
BASE_SRC_M := $(BASE_SRC)
|
|
||||||
BASE_SRC_S := $(BASE_)ftbase.c
|
BASE_SRC_S := $(BASE_)ftbase.c
|
||||||
|
|
||||||
|
|
||||||
# Multiple objects build + extensions
|
|
||||||
#
|
|
||||||
$(OBJ_)ft%.$O: $(BASE_)ft%.c $(PUBLIC_H) $(BASE_H)
|
|
||||||
$(BASE_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
|
|
||||||
# Base layer - single object build
|
# Base layer - single object build
|
||||||
#
|
#
|
||||||
$(BASE_OBJ_S): $(PUBLIC_H) $(BASE_H) $(BASE_SRC_S) $(BASE_SRC)
|
$(BASE_OBJ_S): $(BASE_SRC_S) $(BASE_SRC) $(FREETYPE_H)
|
||||||
$(BASE_COMPILE) $T$@ $(BASE_SRC_S)
|
$(BASE_COMPILE) $T$@ $(BASE_SRC_S)
|
||||||
|
|
||||||
|
|
||||||
|
# Multiple objects build + extensions
|
||||||
|
#
|
||||||
|
$(OBJ_)%.$O: $(BASE_)%.c $(FREETYPE_H)
|
||||||
|
$(BASE_COMPILE) $T$@ $<
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
|
@ -6,34 +6,22 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
# fully.
|
# fully.
|
||||||
|
|
||||||
|
|
||||||
# Include the rules defined for the SFNT driver, which is heavily used
|
|
||||||
# by the TrueType one.
|
|
||||||
#
|
|
||||||
include $(SRC_)sfnt/rules.mk
|
|
||||||
|
|
||||||
|
|
||||||
# OpenType driver directory
|
# OpenType driver directory
|
||||||
#
|
#
|
||||||
T2_DIR := $(SRC_)cff
|
T2_DIR := $(SRC_)cff
|
||||||
T2_DIR_ := $(T2_DIR)$(SEP)
|
T2_DIR_ := $(T2_DIR)$(SEP)
|
||||||
|
|
||||||
|
|
||||||
# location of all extensions to the driver, if any
|
|
||||||
#
|
|
||||||
T2_EXT_DIR := $(T2_DIR_)extend
|
|
||||||
T2_EXT_DIR_ := $(T2_EXT_DIR)$(SEP)
|
|
||||||
|
|
||||||
# additional include flags used when compiling the driver
|
# additional include flags used when compiling the driver
|
||||||
#
|
#
|
||||||
T2_INCLUDE := $(SFNT_INCLUDE) $(T2_DIR) $(T2_EXT_DIR)
|
T2_INCLUDE := $(T2_DIR)
|
||||||
|
|
||||||
|
|
||||||
# compilation flags for the driver
|
# compilation flags for the driver
|
||||||
#
|
#
|
||||||
|
@ -41,7 +29,7 @@ T2_CFLAGS := $(T2_INCLUDE:%=$I%)
|
||||||
T2_COMPILE := $(FT_COMPILE) $(T2_CFLAGS)
|
T2_COMPILE := $(FT_COMPILE) $(T2_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# driver sources (i.e., C files)
|
# T2 driver sources (i.e., C files)
|
||||||
#
|
#
|
||||||
T2_DRV_SRC := $(T2_DIR_)t2objs.c \
|
T2_DRV_SRC := $(T2_DIR_)t2objs.c \
|
||||||
$(T2_DIR_)t2load.c \
|
$(T2_DIR_)t2load.c \
|
||||||
|
@ -49,58 +37,34 @@ T2_DRV_SRC := $(T2_DIR_)t2objs.c \
|
||||||
$(T2_DIR_)t2parse.c \
|
$(T2_DIR_)t2parse.c \
|
||||||
$(T2_DIR_)t2driver.c
|
$(T2_DIR_)t2driver.c
|
||||||
|
|
||||||
# driver headers
|
# T2 driver headers
|
||||||
#
|
#
|
||||||
T2_DRV_H := $(SFNT_H) \
|
T2_DRV_H := $(T2_DRV_SRC:%.c=%.h) \
|
||||||
$(T2_DRV_SRC:%.c=%.h)
|
$(T2_DIR_)t2tokens.h
|
||||||
|
|
||||||
|
|
||||||
# default extensions headers
|
# T2 driver object(s)
|
||||||
#
|
#
|
||||||
T2_EXT_H := $(T2_EXT_SRC:.c=.h)
|
# T2_DRV_OBJ_M is used during `multi' builds
|
||||||
|
# T2_DRV_OBJ_S is used during `single' builds
|
||||||
|
|
||||||
# driver object(s)
|
|
||||||
#
|
|
||||||
# T2_DRV_OBJ_M is used during `debug' builds
|
|
||||||
# T2_DRV_OBJ_S is used during `release' builds
|
|
||||||
#
|
#
|
||||||
T2_DRV_OBJ_M := $(T2_DRV_SRC:$(T2_DIR_)%.c=$(OBJ_)%.$O)
|
T2_DRV_OBJ_M := $(T2_DRV_SRC:$(T2_DIR_)%.c=$(OBJ_)%.$O)
|
||||||
T2_DRV_OBJ_S := $(OBJ_)cff.$O
|
T2_DRV_OBJ_S := $(OBJ_)cff.$O
|
||||||
|
|
||||||
|
# T2 driver source file for single build
|
||||||
# default extensions objects
|
|
||||||
#
|
#
|
||||||
T2_EXT_OBJ := $(T2_EXT_SRC:$(T2_EXT_DIR_)%.c=$(OBJ_)%.$O)
|
|
||||||
|
|
||||||
|
|
||||||
# driver source file(s)
|
|
||||||
#
|
|
||||||
T2_DRV_SRC_M := $(T2_DRV_SRC) $(SFNT_SRC)
|
|
||||||
T2_DRV_SRC_S := $(T2_DIR_)cff.c
|
T2_DRV_SRC_S := $(T2_DIR_)cff.c
|
||||||
|
|
||||||
|
|
||||||
# driver - single object
|
# T2 driver - single object
|
||||||
#
|
#
|
||||||
# the driver is recompiled if any of the header or source files is changed
|
$(T2_DRV_OBJ_S): $(T2_DRV_SRC_S) $(T2_DRV_SRC) $(FREETYPE_H) $(T2_DRV_H)
|
||||||
# as well as any of the shared source files found in `shared/sfnt'
|
|
||||||
#
|
|
||||||
$(T2_DRV_OBJ_S): $(BASE_H) $(T2_DRV_H) $(T2_DRV_SRC) $(T2_DRV_SRC_S)
|
|
||||||
$(T2_COMPILE) $T$@ $(T2_DRV_SRC_S)
|
$(T2_COMPILE) $T$@ $(T2_DRV_SRC_S)
|
||||||
|
|
||||||
|
|
||||||
|
# T2 driver - multiple objects
|
||||||
# driver - multiple objects
|
|
||||||
#
|
#
|
||||||
# All objects are recompiled if any of the header files is changed
|
$(OBJ_)%.$O: $(T2_DIR_)%.c $(FREETYPE_H) $(T2_DRV_H)
|
||||||
#
|
|
||||||
$(OBJ_)t2%.$O: $(T2_DIR_)t2%.c $(BASE_H) $(T2_DRV_H)
|
|
||||||
$(T2_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
$(OBJ_)t2x%.$O: $(T2_EXT_DIR_)t2x%.c $(BASE_H) $(SFNT_H) $(T2_EXT_H)
|
|
||||||
$(T2_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
$(OBJ_)t2%.$O: $(SFNT_DIR_)t2%.c $(BASE_H) $(SFNT_H)
|
|
||||||
$(T2_COMPILE) $T$@ $<
|
$(T2_COMPILE) $T$@ $<
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#undef FT_COMPONENT
|
#undef FT_COMPONENT
|
||||||
#define FT_COMPONENT trace_t1gload
|
#define FT_COMPONENT trace_t1gload
|
||||||
|
|
||||||
|
#include <t2load.h>
|
||||||
#include <t2gload.h>
|
#include <t2gload.h>
|
||||||
|
|
||||||
typedef enum T2_Operator_
|
typedef enum T2_Operator_
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* t2load.h */
|
/* t2load.c */
|
||||||
/* */
|
/* */
|
||||||
/* TrueType glyph data/program tables loader (body). */
|
/* TrueType glyph data/program tables loader (body). */
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -46,6 +46,14 @@
|
||||||
void T2_Forget_Element( CFF_Index* index,
|
void T2_Forget_Element( CFF_Index* index,
|
||||||
FT_Byte* *pbytes );
|
FT_Byte* *pbytes );
|
||||||
|
|
||||||
|
LOCAL_FUNC
|
||||||
|
FT_Error T2_Load_CFF_Font( FT_Stream stream,
|
||||||
|
FT_Int face_index,
|
||||||
|
CFF_Font* font );
|
||||||
|
|
||||||
|
LOCAL_FUNC
|
||||||
|
void T2_Done_CFF_Font( CFF_Font* font );
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
*
|
*
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include <cidload.h>
|
||||||
#include <cidgload.h>
|
#include <cidgload.h>
|
||||||
#include <freetype/internal/ftdebug.h>
|
#include <freetype/internal/ftdebug.h>
|
||||||
#include <freetype/internal/ftstream.h>
|
#include <freetype/internal/ftstream.h>
|
||||||
|
|
|
@ -477,7 +477,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
LOCAL_FUNC
|
LOCAL_FUNC
|
||||||
FT_Error T1_Open_Face( CID_Face face )
|
FT_Error CID_Open_Face( CID_Face face )
|
||||||
{
|
{
|
||||||
CID_Loader loader;
|
CID_Loader loader;
|
||||||
CID_Parser* parser;
|
CID_Parser* parser;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
FT_UShort seed );
|
FT_UShort seed );
|
||||||
|
|
||||||
LOCAL_DEF
|
LOCAL_DEF
|
||||||
FT_Error T1_Open_Face( CID_Face face );
|
FT_Error CID_Open_Face( CID_Face face );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@
|
||||||
if ( FILE_Seek(0) )
|
if ( FILE_Seek(0) )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
error = T1_Open_Face( face );
|
error = CID_Open_Face( face );
|
||||||
if (error) goto Exit;
|
if (error) goto Exit;
|
||||||
|
|
||||||
/* if we just wanted to check the format, leave successfully now */
|
/* if we just wanted to check the format, leave successfully now */
|
||||||
|
|
|
@ -1,32 +1,19 @@
|
||||||
#
|
#
|
||||||
# FreeType 2 driver configuration rules
|
# FreeType 2 CID driver configuration rules
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
# fully.
|
# fully.
|
||||||
|
|
||||||
|
|
||||||
#****************************************************************************
|
# CID driver directory
|
||||||
#* *
|
|
||||||
#* The "Type1z" driver is an experimental replacement for the current *
|
|
||||||
#* Type 1 driver. It features a very different loading mechanism that *
|
|
||||||
#* is much faster than the one used by the `normal' driver, and also *
|
|
||||||
#* deals nicely with nearly broken Type 1 font files. It is also *
|
|
||||||
#* much smaller... *
|
|
||||||
#* *
|
|
||||||
#* Note that it may become a permanent replacement of the current *
|
|
||||||
#* "src/type1" driver in the future.. *
|
|
||||||
#* *
|
|
||||||
#****************************************************************************
|
|
||||||
|
|
||||||
# Type1z driver directory
|
|
||||||
#
|
#
|
||||||
CID_DIR := $(SRC_)cid
|
CID_DIR := $(SRC_)cid
|
||||||
CID_DIR_ := $(CID_DIR)$(SEP)
|
CID_DIR_ := $(CID_DIR)$(SEP)
|
||||||
|
@ -34,57 +21,51 @@ CID_DIR_ := $(CID_DIR)$(SEP)
|
||||||
|
|
||||||
# additional include flags used when compiling the driver
|
# additional include flags used when compiling the driver
|
||||||
#
|
#
|
||||||
CID_INCLUDE := $(SHARED) $(CID_DIR)
|
CID_INCLUDE := $(CID_DIR)
|
||||||
CID_COMPILE := $(FT_COMPILE) $(CID_INCLUDE:%=$I%)
|
|
||||||
|
# compilation flags for the driver
|
||||||
|
#
|
||||||
|
CID_CFLAGS := $(CID_INCLUDE:%=$I%)
|
||||||
|
CID_COMPILE := $(FT_COMPILE) $(CID_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# Type1 driver sources (i.e., C files)
|
# CID driver sources (i.e., C files)
|
||||||
#
|
#
|
||||||
CID_DRV_SRC := $(CID_DIR_)cidparse.c \
|
CID_DRV_SRC := $(CID_DIR_)cidparse.c \
|
||||||
$(CID_DIR_)cidload.c \
|
$(CID_DIR_)cidload.c \
|
||||||
$(CID_DIR_)cidriver.c \
|
$(CID_DIR_)cidriver.c \
|
||||||
$(CID_DIR_)cidgload.c \
|
$(CID_DIR_)cidgload.c \
|
||||||
$(CID_DIR_)cidafm.c
|
$(CID_DIR_)cidafm.c \
|
||||||
|
$(CID_DIR_)cidobjs.c
|
||||||
|
|
||||||
# Type1 driver headers
|
# CID driver headers
|
||||||
#
|
#
|
||||||
CID_DRV_H := $(CID_DIR_)cidtokens.h \
|
CID_DRV_H := $(CID_DRV_SRC:%.c=%.h) \
|
||||||
$(T1SHARED_H) \
|
$(CID_DIR_)cidtokens.h
|
||||||
$(CID_DRV_SRC:%.c=%.h)
|
|
||||||
|
|
||||||
|
|
||||||
# driver object(s)
|
# CID driver object(s)
|
||||||
#
|
#
|
||||||
# CID_DRV_OBJ_M is used during `debug' builds
|
# CID_DRV_OBJ_M is used during `multi' builds
|
||||||
# CID_DRV_OBJ_S is used during `release' builds
|
# CID_DRV_OBJ_S is used during `single' builds
|
||||||
#
|
#
|
||||||
CID_DRV_OBJ_M := $(CID_DRV_SRC:$(CID_DIR_)%.c=$(OBJ_)%.$O) \
|
CID_DRV_OBJ_M := $(CID_DRV_SRC:$(CID_DIR_)%.c=$(OBJ_)%.$O)
|
||||||
$(T1SHARED:$(T1SHARED_DIR_)%.c=$(OBJ_)%.$O)
|
|
||||||
CID_DRV_OBJ_S := $(OBJ_)type1cid.$O
|
CID_DRV_OBJ_S := $(OBJ_)type1cid.$O
|
||||||
|
|
||||||
|
# CID driver source file for single build
|
||||||
# driver source file(s)
|
|
||||||
#
|
#
|
||||||
CID_DRV_SRC_M := $(CID_DRV_SRC) $(T1SHARED_SRC)
|
|
||||||
CID_DRV_SRC_S := $(CID_DIR_)type1cid.c
|
CID_DRV_SRC_S := $(CID_DIR_)type1cid.c
|
||||||
|
|
||||||
|
|
||||||
# driver - single object
|
# CID driver - single object
|
||||||
#
|
#
|
||||||
# the driver is recompiled if any of the header or source files is changed
|
$(CID_DRV_OBJ_S): $(CID_DRV_SRC_S) $(CID_DRV_SRC) $(FREETYPE_H) $(CID_DRV_H)
|
||||||
#
|
|
||||||
$(CID_DRV_OBJ_S): $(BASE_H) $(CID_DRV_H) $(CID_DRV_SRC) $(CID_DRV_SRC_S)
|
|
||||||
$(CID_COMPILE) $T$@ $(CID_DRV_SRC_S)
|
$(CID_COMPILE) $T$@ $(CID_DRV_SRC_S)
|
||||||
|
|
||||||
|
|
||||||
# driver - multiple objects
|
# CID driver - multiple objects
|
||||||
#
|
#
|
||||||
# All objects are recompiled if any of the header files is changed
|
$(OBJ_)%.$O: $(CID_DIR_)%.c $(FREETYPE_H) $(CID_DRV_H)
|
||||||
#
|
|
||||||
$(OBJ_)t1%.$O: $(CID_DIR_)t1%.c $(BASE_H) $(CID_DRV_H)
|
|
||||||
$(CID_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
$(OBJ_)t1%.$O: $(T1SHARED_DIR_)t1%.c $(BASE_H) $(T1SHARED_H)
|
|
||||||
$(CID_COMPILE) $T$@ $<
|
$(CID_COMPILE) $T$@ $<
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,81 +6,70 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
# fully.
|
# fully.
|
||||||
|
|
||||||
|
|
||||||
ifndef PSNAMES_INCLUDE
|
# PSNames driver directory
|
||||||
# PSNAMES driver directory
|
#
|
||||||
#
|
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
|
# additional include flags used when compiling the driver
|
||||||
#
|
#
|
||||||
PSNAMES_INCLUDE := $(SHARED) $(PSNAMES_DIR)
|
PSNAMES_INCLUDE := $(PSNAMES_DIR)
|
||||||
|
|
||||||
|
|
||||||
# compilation flags for the driver
|
# compilation flags for the driver
|
||||||
#
|
#
|
||||||
PSNAMES_CFLAGS := $(PSNAMES_INCLUDE:%=$I%)
|
PSNAMES_CFLAGS := $(PSNAMES_INCLUDE:%=$I%)
|
||||||
PSNAMES_COMPILE := $(FT_COMPILE) $(PSNAMES_CFLAGS)
|
PSNAMES_COMPILE := $(FT_COMPILE) $(PSNAMES_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# driver sources (i.e., C files)
|
# PSNames driver sources (i.e., C files)
|
||||||
#
|
#
|
||||||
PSNAMES_DRV_SRC := $(PSNAMES_DIR_)psdriver.c
|
PSNAMES_DRV_SRC := $(PSNAMES_DIR_)psdriver.c
|
||||||
|
|
||||||
|
|
||||||
# driver headers
|
# PSNames driver headers
|
||||||
#
|
#
|
||||||
PSNAMES_DRV_H := $(BASE_H) \
|
PSNAMES_DRV_H := $(PSNAMES_DRV_SRC:%.c=%.h) \
|
||||||
$(PSNAMES_DIR_)psdriver.h \
|
$(PSNAMES_DIR_)pstables.h
|
||||||
$(PSNAMES_DIR_)pstables.h
|
|
||||||
|
|
||||||
|
|
||||||
# driver object(s)
|
# PSNames driver object(s)
|
||||||
#
|
#
|
||||||
# PSNAMES_DRV_OBJ_M is used during `debug' builds
|
# PSNAMES_DRV_OBJ_M is used during `multi' builds
|
||||||
# PSNAMES_DRV_OBJ_S is used during `release' builds
|
# PSNAMES_DRV_OBJ_S is used during `single' builds
|
||||||
#
|
#
|
||||||
PSNAMES_DRV_OBJ_M := $(PSNAMES_DRV_SRC:$(PSNAMES_DIR_)%.c=$(OBJ_)%.$O)
|
PSNAMES_DRV_OBJ_M := $(PSNAMES_DRV_SRC:$(PSNAMES_DIR_)%.c=$(OBJ_)%.$O)
|
||||||
PSNAMES_DRV_OBJ_S := $(OBJ_)psnames.$O
|
PSNAMES_DRV_OBJ_S := $(OBJ_)psnames.$O
|
||||||
|
|
||||||
|
# PSNames driver source file for single build
|
||||||
|
#
|
||||||
|
PSNAMES_DRV_SRC_S := $(PSNAMES_DIR_)psdriver.c
|
||||||
|
|
||||||
|
|
||||||
# driver source file(s)
|
# PSNames driver - single object
|
||||||
#
|
#
|
||||||
PSNAMES_DRV_SRC_M := $(PSNAMES_DRV_SRC)
|
$(PSNAMES_DRV_OBJ_S): $(PSNAMES_DRV_SRC_S) $(PSNAMES_DRV_SRC) \
|
||||||
PSNAMES_DRV_SRC_S := $(PSNAMES_DIR_)psdriver.c
|
$(FREETYPE_H) $(PSNAMES_DRV_H)
|
||||||
|
$(PSNAMES_COMPILE) $T$@ $(PSNAMES_DRV_SRC_S)
|
||||||
|
|
||||||
|
|
||||||
# driver - single object
|
# PSNames driver - multiple objects
|
||||||
#
|
#
|
||||||
# the driver is recompiled if any of the header or source files is
|
$(OBJ_)%.$O: $(PSNAMES_DIR_)%.c $(FREETYPE_H) $(PSNAMES_DRV_H)
|
||||||
# changed as well as any of the shared source files found in
|
$(PSNAMES_COMPILE) $T$@ $<
|
||||||
# `shared'
|
|
||||||
#
|
|
||||||
$(PSNAMES_DRV_OBJ_S): $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H) \
|
|
||||||
$(PSNAMES_DRV_SRC) $(PSNAMES_DRV_SRC_S)
|
|
||||||
$(PSNAMES_COMPILE) $T$@ $(PSNAMES_DRV_SRC_S)
|
|
||||||
|
|
||||||
|
|
||||||
# driver - multiple objects
|
# update main driver object lists
|
||||||
#
|
#
|
||||||
# All objects are recompiled if any of the header files is changed.
|
DRV_OBJS_S += $(PSNAMES_DRV_OBJ_S)
|
||||||
#
|
DRV_OBJS_M += $(PSNAMES_DRV_OBJ_M)
|
||||||
$(OBJ_)ps%.$O: $(PSNAMES_DIR_)ps%.c $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H)
|
|
||||||
$(PSNAMES_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
|
|
||||||
# update main driver object lists
|
|
||||||
#
|
|
||||||
DRV_OBJS_S += $(PSNAMES_DRV_OBJ_S)
|
|
||||||
DRV_OBJS_M += $(PSNAMES_DRV_OBJ_M)
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
|
@ -13,84 +13,66 @@
|
||||||
# fully.
|
# fully.
|
||||||
|
|
||||||
|
|
||||||
ifndef SFNT_INCLUDE
|
# SFNT driver directory
|
||||||
# SFNT driver directory
|
#
|
||||||
#
|
SFNT_DIR := $(SRC_)sfnt
|
||||||
SFNT_DIR := $(SRC_)sfnt
|
SFNT_DIR_ := $(SFNT_DIR)$(SEP)
|
||||||
SFNT_DIR_ := $(SFNT_DIR)$(SEP)
|
|
||||||
|
|
||||||
|
|
||||||
# additional include flags used when compiling the driver
|
# additional include flags used when compiling the driver
|
||||||
#
|
#
|
||||||
SFNT_INCLUDE := $(SHARED) $(SFNT_DIR)
|
SFNT_INCLUDE := $(SFNT_DIR)
|
||||||
|
|
||||||
# compilation flags for the driver
|
# compilation flags for the driver
|
||||||
#
|
#
|
||||||
SFNT_CFLAGS := $(SFNT_INCLUDE:%=$I%)
|
SFNT_CFLAGS := $(SFNT_INCLUDE:%=$I%)
|
||||||
SFNT_COMPILE := $(FT_COMPILE) $(SFNT_CFLAGS)
|
SFNT_COMPILE := $(FT_COMPILE) $(SFNT_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# driver sources (i.e., C files)
|
# SFNT driver sources (i.e., C files)
|
||||||
#
|
#
|
||||||
SFNT_DRV_SRC := $(SFNT_DIR_)ttload.c \
|
SFNT_DRV_SRC := $(SFNT_DIR_)ttload.c \
|
||||||
$(SFNT_DIR_)ttcmap.c \
|
$(SFNT_DIR_)ttcmap.c \
|
||||||
$(SFNT_DIR_)ttsbit.c \
|
$(SFNT_DIR_)ttsbit.c \
|
||||||
$(SFNT_DIR_)ttpost.c \
|
$(SFNT_DIR_)ttpost.c \
|
||||||
$(SFNT_DIR_)sfobjs.c \
|
$(SFNT_DIR_)sfobjs.c \
|
||||||
$(SFNT_DIR_)sfdriver.c
|
$(SFNT_DIR_)sfdriver.c
|
||||||
|
|
||||||
# driver headers
|
# SFNT driver headers
|
||||||
#
|
#
|
||||||
SFNT_DRV_H := $(BASE_H) \
|
SFNT_DRV_H := $(SFNT_DRV_SRC:%c=%h)
|
||||||
$(SFNT_DIR_)sfobjs.h \
|
|
||||||
$(SFNT_DIR_)ttload.h \
|
|
||||||
$(SFNT_DIR_)ttsbit.h \
|
|
||||||
$(SFNT_DIR_)ttcmap.h \
|
|
||||||
$(SFNT_DIR_)ttpost.h
|
|
||||||
|
|
||||||
|
|
||||||
# driver object(s)
|
# SFNT driver object(s)
|
||||||
#
|
#
|
||||||
# SFNT_DRV_OBJ_M is used during `debug' builds
|
# SFNT_DRV_OBJ_M is used during `multi' builds.
|
||||||
# SFNT_DRV_OBJ_S is used during `release' builds
|
# SFNT_DRV_OBJ_S is used during `single' builds.
|
||||||
#
|
#
|
||||||
SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR_)%.c=$(OBJ_)%.$O)
|
SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR_)%.c=$(OBJ_)%.$O)
|
||||||
SFNT_DRV_OBJ_S := $(OBJ_)sfnt.$O
|
SFNT_DRV_OBJ_S := $(OBJ_)sfnt.$O
|
||||||
|
|
||||||
|
# SFNT driver source file for single build
|
||||||
|
#
|
||||||
|
SFNT_DRV_SRC_S := $(SFNT_DIR_)sfnt.c
|
||||||
|
|
||||||
|
|
||||||
# driver source file(s)
|
# SFNT driver - single object
|
||||||
#
|
#
|
||||||
SFNT_DRV_SRC_M := $(SFNT_DRV_SRC)
|
$(SFNT_DRV_OBJ_S): $(SFNT_DRV_SRC_S) $(SFNT_DRV_SRC) \
|
||||||
SFNT_DRV_SRC_S := $(SFNT_DIR_)sfnt.c
|
$(FREETYPE_H) $(SFNT_DRV_H)
|
||||||
|
$(SFNT_COMPILE) $T$@ $(SFNT_DRV_SRC_S)
|
||||||
|
|
||||||
|
|
||||||
# driver - single object
|
# SFNT driver - multiple objects
|
||||||
#
|
#
|
||||||
# the driver is recompiled if any of the header or source files is
|
$(OBJ_)%.$O: $(SFNT_DIR_)%.c $(FREETYPE_H) $(SFNT_DRV_H)
|
||||||
# changed as well as any of the shared source files found in
|
$(SFNT_COMPILE) $T$@ $<
|
||||||
# `shared'
|
|
||||||
#
|
|
||||||
$(SFNT_DRV_OBJ_S): $(BASE_H) $(SHARED_H) $(SFNT_DRV_H) \
|
|
||||||
$(SFNT_DRV_SRC) $(SFNT_DRV_SRC_S)
|
|
||||||
$(SFNT_COMPILE) $T$@ $(SFNT_DRV_SRC_S)
|
|
||||||
|
|
||||||
|
|
||||||
# driver - multiple objects
|
# update main driver object lists
|
||||||
#
|
#
|
||||||
# All objects are recompiled if any of the header files is changed
|
DRV_OBJS_S += $(SFNT_DRV_OBJ_S)
|
||||||
#
|
DRV_OBJS_M += $(SFNT_DRV_OBJ_M)
|
||||||
$(OBJ_)tt%.$O: $(SFNT_DIR_)tt%.c $(BASE_H) $(SHARED_H) $(SFNT_DRV_H)
|
|
||||||
$(SFNT_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
$(OBJ_)sf%.$O: $(SFNT_DIR_)sf%.c $(BASE_H) $(SHARED_H) $(SFNT_DRV_H)
|
|
||||||
$(SFNT_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
|
|
||||||
# update main driver object lists
|
|
||||||
#
|
|
||||||
DRV_OBJS_S += $(SFNT_DRV_OBJ_S)
|
|
||||||
DRV_OBJS_M += $(SFNT_DRV_OBJ_M)
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include <freetype/internal/ftobjs.h>
|
||||||
#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>
|
||||||
|
|
|
@ -453,16 +453,14 @@
|
||||||
/* check against the last segment */
|
/* check against the last segment */
|
||||||
seg4 = cmap4->last_segment;
|
seg4 = cmap4->last_segment;
|
||||||
|
|
||||||
/* the following is equivalent to performing two tests, as in : */
|
/* the following is equivalent to performing two tests, as in */
|
||||||
/* */
|
/* */
|
||||||
/* if ( charCode >= seg4->startCount && charCode <= seg4->endCount */
|
/* if ( charCode >= seg4->startCount && charCode <= seg4->endCount ) */
|
||||||
/* */
|
/* */
|
||||||
/* Yes, that's a bit strange, but it's faster, and the idea behind */
|
/* Yes, that's a bit strange, but it's faster, and the idea behind */
|
||||||
/* the cache is to significantly speed up charcode to glyph index */
|
/* the cache is to significantly speed up charcode to glyph index */
|
||||||
/* conversion.. */
|
/* conversion. */
|
||||||
/* */
|
|
||||||
/* Sorry if it isn't clear to your eyes.. */
|
|
||||||
/* */
|
|
||||||
if ( (TT_ULong)(charCode - seg4->startCount) <
|
if ( (TT_ULong)(charCode - seg4->startCount) <
|
||||||
(TT_ULong)(seg4->endCount - seg4->startCount) )
|
(TT_ULong)(seg4->endCount - seg4->startCount) )
|
||||||
goto Found;
|
goto Found;
|
||||||
|
@ -471,6 +469,7 @@
|
||||||
{
|
{
|
||||||
/* the ranges are sorted in increasing order. If we are out of */
|
/* the ranges are sorted in increasing order. If we are out of */
|
||||||
/* the range here, the char code isn't in the charmap, so exit. */
|
/* the range here, the char code isn't in the charmap, so exit. */
|
||||||
|
|
||||||
if ( charCode > seg4->endCount )
|
if ( charCode > seg4->endCount )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -6,34 +6,22 @@
|
||||||
# Copyright 1996-2000 by
|
# Copyright 1996-2000 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used modified
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
# and distributed under the terms of the FreeType project license,
|
# and distributed under the terms of the FreeType project license,
|
||||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
# indicate that you have read the license and understand and accept it
|
# indicate that you have read the license and understand and accept it
|
||||||
# fully.
|
# fully.
|
||||||
|
|
||||||
|
|
||||||
# Include the rules defined for the SFNT driver, which are heavily used
|
|
||||||
# by the TrueType one.
|
|
||||||
#
|
|
||||||
include $(SRC_)sfnt/rules.mk
|
|
||||||
|
|
||||||
|
|
||||||
# TrueType driver directory
|
# TrueType driver directory
|
||||||
#
|
#
|
||||||
TT_DIR := $(SRC_)truetype
|
TT_DIR := $(SRC_)truetype
|
||||||
TT_DIR_ := $(TT_DIR)$(SEP)
|
TT_DIR_ := $(TT_DIR)$(SEP)
|
||||||
|
|
||||||
|
|
||||||
# location of all extensions to the driver, if any
|
|
||||||
#
|
|
||||||
TT_EXT_DIR := $(TT_DIR_)extend
|
|
||||||
TT_EXT_DIR_ := $(TT_EXT_DIR)$(SEP)
|
|
||||||
|
|
||||||
# additional include flags used when compiling the driver
|
# additional include flags used when compiling the driver
|
||||||
#
|
#
|
||||||
TT_INCLUDE := $(SFNT_INCLUDE) $(TT_DIR) $(TT_EXT_DIR)
|
TT_INCLUDE := $(TT_DIR)
|
||||||
|
|
||||||
|
|
||||||
# compilation flags for the driver
|
# compilation flags for the driver
|
||||||
#
|
#
|
||||||
|
@ -41,7 +29,7 @@ TT_CFLAGS := $(TT_INCLUDE:%=$I%)
|
||||||
TT_COMPILE := $(FT_COMPILE) $(TT_CFLAGS)
|
TT_COMPILE := $(FT_COMPILE) $(TT_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# driver sources (i.e., C files)
|
# TrueType driver sources (i.e., C files)
|
||||||
#
|
#
|
||||||
TT_DRV_SRC := $(TT_DIR_)ttobjs.c \
|
TT_DRV_SRC := $(TT_DIR_)ttobjs.c \
|
||||||
$(TT_DIR_)ttpload.c \
|
$(TT_DIR_)ttpload.c \
|
||||||
|
@ -49,65 +37,33 @@ TT_DRV_SRC := $(TT_DIR_)ttobjs.c \
|
||||||
$(TT_DIR_)ttinterp.c \
|
$(TT_DIR_)ttinterp.c \
|
||||||
$(TT_DIR_)ttdriver.c
|
$(TT_DIR_)ttdriver.c
|
||||||
|
|
||||||
# driver headers
|
# TrueType driver headers
|
||||||
#
|
#
|
||||||
TT_DRV_H := $(SFNT_H) \
|
TT_DRV_H := $(TT_DRV_SRC:%.c=%.h)
|
||||||
$(TT_DRV_SRC:%.c=%.h)
|
|
||||||
|
|
||||||
|
|
||||||
# default extensions sources
|
# TrueType driver object(s)
|
||||||
#
|
#
|
||||||
TT_EXT_SRC := $(TT_EXT_DIR_)ttxkern.c \
|
# TT_DRV_OBJ_M is used during `multi' builds
|
||||||
$(TT_EXT_DIR_)ttxgasp.c \
|
# TT_DRV_OBJ_S is used during `single' builds
|
||||||
$(TT_EXT_DIR_)ttxpost.c \
|
|
||||||
$(TT_EXT_DIR_)ttxcmap.c \
|
|
||||||
$(TT_EXT_DIR_)ttxwidth.c
|
|
||||||
|
|
||||||
# default extensions headers
|
|
||||||
#
|
|
||||||
TT_EXT_H := $(TT_EXT_SRC:.c=.h)
|
|
||||||
|
|
||||||
|
|
||||||
# driver object(s)
|
|
||||||
#
|
|
||||||
# TT_DRV_OBJ_M is used during `debug' builds
|
|
||||||
# TT_DRV_OBJ_S is used during `release' builds
|
|
||||||
#
|
#
|
||||||
TT_DRV_OBJ_M := $(TT_DRV_SRC:$(TT_DIR_)%.c=$(OBJ_)%.$O)
|
TT_DRV_OBJ_M := $(TT_DRV_SRC:$(TT_DIR_)%.c=$(OBJ_)%.$O)
|
||||||
TT_DRV_OBJ_S := $(OBJ_)truetype.$O
|
TT_DRV_OBJ_S := $(OBJ_)truetype.$O
|
||||||
|
|
||||||
|
# TrueType driver source file for single build
|
||||||
# default extensions objects
|
|
||||||
#
|
#
|
||||||
TT_EXT_OBJ := $(TT_EXT_SRC:$(TT_EXT_DIR_)%.c=$(OBJ_)%.$O)
|
|
||||||
|
|
||||||
|
|
||||||
# driver source file(s)
|
|
||||||
#
|
|
||||||
TT_DRV_SRC_M := $(TT_DRV_SRC) $(SFNT_SRC)
|
|
||||||
TT_DRV_SRC_S := $(TT_DIR_)truetype.c
|
TT_DRV_SRC_S := $(TT_DIR_)truetype.c
|
||||||
|
|
||||||
|
|
||||||
# driver - single object
|
# TrueType driver - single object
|
||||||
#
|
#
|
||||||
# the driver is recompiled if any of the header or source files is changed
|
$(TT_DRV_OBJ_S): $(TT_DRV_SRC_S) $(TT_DRV_SRC) $(FREETYPE_H) $(TT_DRV_H)
|
||||||
# as well as any of the shared source files found in `shared/sfnt'
|
|
||||||
#
|
|
||||||
$(TT_DRV_OBJ_S): $(BASE_H) $(TT_DRV_H) $(TT_DRV_SRC) $(TT_DRV_SRC_S)
|
|
||||||
$(TT_COMPILE) $T$@ $(TT_DRV_SRC_S)
|
$(TT_COMPILE) $T$@ $(TT_DRV_SRC_S)
|
||||||
|
|
||||||
|
|
||||||
# driver - multiple objects
|
# driver - multiple objects
|
||||||
#
|
#
|
||||||
# All objects are recompiled if any of the header files is changed
|
$(OBJ_)%.$O: $(TT_DIR_)%.c $(FREETYPE_H) $(TT_DRV_H)
|
||||||
#
|
|
||||||
$(OBJ_)tt%.$O: $(TT_DIR_)tt%.c $(BASE_H) $(TT_DRV_H)
|
|
||||||
$(TT_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
$(OBJ_)ttx%.$O: $(TT_EXT_DIR_)ttx%.c $(BASE_H) $(SFNT_H) $(TT_EXT_H)
|
|
||||||
$(TT_COMPILE) $T$@ $<
|
|
||||||
|
|
||||||
$(OBJ_)tt%.$O: $(SFNT_DIR_)tt%.c $(BASE_H) $(SFNT_H)
|
|
||||||
$(TT_COMPILE) $T$@ $<
|
$(TT_COMPILE) $T$@ $<
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -115,10 +115,10 @@
|
||||||
|
|
||||||
/* parse an AFM file - for now, only read the kerning pairs */
|
/* parse an AFM file - for now, only read the kerning pairs */
|
||||||
LOCAL_FUNC
|
LOCAL_FUNC
|
||||||
FT_Error T1_Read_AFM( FT_Face t1_face,
|
T1_Error T1_Read_AFM( FT_Face t1_face,
|
||||||
FT_Stream stream )
|
FT_Stream stream )
|
||||||
{
|
{
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
FT_Memory memory = stream->memory;
|
FT_Memory memory = stream->memory;
|
||||||
FT_Byte* start;
|
FT_Byte* start;
|
||||||
FT_Byte* limit;
|
FT_Byte* limit;
|
||||||
|
|
|
@ -8,40 +8,43 @@
|
||||||
#ifndef T1AFM_H
|
#ifndef T1AFM_H
|
||||||
#define T1AFM_H
|
#define T1AFM_H
|
||||||
|
|
||||||
|
#include <freetype/internal/ftstream.h>
|
||||||
#include <freetype/internal/ftobjs.h>
|
#include <freetype/internal/ftobjs.h>
|
||||||
|
#include <freetype/internal/t1types.h>
|
||||||
|
#include <freetype/internal/t1errors.h>
|
||||||
|
|
||||||
/* In this version, we only read the kerning table from the */
|
/* In this version, we only read the kerning table from the */
|
||||||
/* AFM file. We may add support for ligatures a bit later.. */
|
/* AFM file. We may add support for ligatures a bit later.. */
|
||||||
|
|
||||||
typedef struct T1_Kern_Pair_
|
typedef struct T1_Kern_Pair_
|
||||||
{
|
{
|
||||||
FT_UInt glyph1;
|
T1_UInt glyph1;
|
||||||
FT_UInt glyph2;
|
T1_UInt glyph2;
|
||||||
FT_Vector kerning;
|
T1_Vector kerning;
|
||||||
|
|
||||||
} T1_Kern_Pair;
|
} T1_Kern_Pair;
|
||||||
|
|
||||||
|
|
||||||
typedef struct T1_AFM_
|
typedef struct T1_AFM_
|
||||||
{
|
{
|
||||||
FT_Int num_pairs;
|
T1_Int num_pairs;
|
||||||
T1_Kern_Pair* kern_pairs;
|
T1_Kern_Pair* kern_pairs;
|
||||||
|
|
||||||
} T1_AFM;
|
} T1_AFM;
|
||||||
|
|
||||||
|
|
||||||
LOCAL_DEF
|
LOCAL_DEF
|
||||||
FT_Error T1_Read_AFM( FT_Face face,
|
T1_Error T1_Read_AFM( FT_Face face,
|
||||||
FT_Stream stream );
|
FT_Stream stream );
|
||||||
|
|
||||||
LOCAL_DEF
|
LOCAL_DEF
|
||||||
void T1_Done_AFM( FT_Memory memory,
|
void T1_Done_AFM( FT_Memory memory,
|
||||||
T1_AFM* afm );
|
T1_AFM* afm );
|
||||||
|
|
||||||
LOCAL_DEF
|
LOCAL_DEF
|
||||||
void T1_Get_Kerning( T1_AFM* afm,
|
void T1_Get_Kerning( T1_AFM* afm,
|
||||||
FT_UInt glyph1,
|
T1_UInt glyph1,
|
||||||
FT_UInt glyph2,
|
T1_UInt glyph2,
|
||||||
FT_Vector* kerning );
|
T1_Vector* kerning );
|
||||||
|
|
||||||
#endif /* T1AFM_H */
|
#endif /* T1AFM_H */
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include <t1driver.h>
|
#include <t1driver.h>
|
||||||
#include <t1gload.h>
|
#include <t1gload.h>
|
||||||
|
#include <t1load.h>
|
||||||
#include <t1afm.h>
|
#include <t1afm.h>
|
||||||
|
|
||||||
#include <freetype/internal/ftdebug.h>
|
#include <freetype/internal/ftdebug.h>
|
||||||
|
@ -435,7 +436,7 @@
|
||||||
|
|
||||||
EXPORT_FUNC(FT_DriverInterface*) getDriverInterface( void )
|
EXPORT_FUNC(FT_DriverInterface*) getDriverInterface( void )
|
||||||
{
|
{
|
||||||
return &t1_driver_interface;
|
return &t1z_driver_interface;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FT_CONFIG_OPTION_DYNAMIC_DRIVERS */
|
#endif /* FT_CONFIG_OPTION_DYNAMIC_DRIVERS */
|
||||||
|
|
|
@ -148,14 +148,14 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOCAL_FUNC FT_Error T1_Get_Multi_Master( T1_Face face,
|
LOCAL_FUNC T1_Error T1_Get_Multi_Master( T1_Face face,
|
||||||
FT_Multi_Master* master )
|
FT_Multi_Master* master )
|
||||||
{
|
{
|
||||||
T1_Blend* blend = face->blend;
|
T1_Blend* blend = face->blend;
|
||||||
T1_UInt n;
|
T1_UInt n;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
|
|
||||||
error = FT_Err_Invalid_Argument;
|
error = T1_Err_Invalid_Argument;
|
||||||
if (blend)
|
if (blend)
|
||||||
{
|
{
|
||||||
master->num_axis = blend->num_axis;
|
master->num_axis = blend->num_axis;
|
||||||
|
@ -175,15 +175,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL_FUNC FT_Error T1_Set_MM_Blend( T1_Face face,
|
LOCAL_FUNC T1_Error T1_Set_MM_Blend( T1_Face face,
|
||||||
T1_UInt num_coords,
|
T1_UInt num_coords,
|
||||||
T1_Fixed* coords )
|
T1_Fixed* coords )
|
||||||
{
|
{
|
||||||
T1_Blend* blend = face->blend;
|
T1_Blend* blend = face->blend;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
T1_UInt n, m;
|
T1_UInt n, m;
|
||||||
|
|
||||||
error = FT_Err_Invalid_Argument;
|
error = T1_Err_Invalid_Argument;
|
||||||
if (blend && blend->num_axis == num_coords)
|
if (blend && blend->num_axis == num_coords)
|
||||||
{
|
{
|
||||||
/* recompute the weight vector from the blend coordinates */
|
/* recompute the weight vector from the blend coordinates */
|
||||||
|
@ -213,15 +213,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL_FUNC FT_Error T1_Set_MM_Design( T1_Face face,
|
LOCAL_FUNC T1_Error T1_Set_MM_Design( T1_Face face,
|
||||||
T1_UInt num_coords,
|
T1_UInt num_coords,
|
||||||
T1_Long* coords )
|
T1_Long* coords )
|
||||||
{
|
{
|
||||||
T1_Blend* blend = face->blend;
|
T1_Blend* blend = face->blend;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
T1_UInt n, p;
|
T1_UInt n, p;
|
||||||
|
|
||||||
error = FT_Err_Invalid_Argument;
|
error = T1_Err_Invalid_Argument;
|
||||||
if (blend && blend->num_axis == num_coords)
|
if (blend && blend->num_axis == num_coords)
|
||||||
{
|
{
|
||||||
/* compute the blend coordinates through the blend design map */
|
/* compute the blend coordinates through the blend design map */
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
{
|
{
|
||||||
T1_Token_Rec axis_tokens[ T1_MAX_MM_AXIS ];
|
T1_Token_Rec axis_tokens[ T1_MAX_MM_AXIS ];
|
||||||
T1_Int n, num_axis;
|
T1_Int n, num_axis;
|
||||||
FT_Error error = 0;
|
T1_Error error = 0;
|
||||||
T1_Blend* blend;
|
T1_Blend* blend;
|
||||||
FT_Memory memory;
|
FT_Memory memory;
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1.parse_blend_axis_types: incorrect number of axis: %d\n",
|
FT_ERROR(( "T1.parse_blend_axis_types: incorrect number of axis: %d\n",
|
||||||
num_axis ));
|
num_axis ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@
|
||||||
len = token->limit - token->start;
|
len = token->limit - token->start;
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
{
|
{
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@
|
||||||
T1_Int num_axis;
|
T1_Int num_axis;
|
||||||
T1_Parser* parser = &loader->parser;
|
T1_Parser* parser = &loader->parser;
|
||||||
|
|
||||||
FT_Error error = 0;
|
T1_Error error = 0;
|
||||||
T1_Blend* blend;
|
T1_Blend* blend;
|
||||||
|
|
||||||
/* get the array of design tokens - compute number of designs */
|
/* get the array of design tokens - compute number of designs */
|
||||||
|
@ -396,7 +396,7 @@
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1.design positions: incorrect number of designs: %d\n",
|
FT_ERROR(( "T1.design positions: incorrect number of designs: %d\n",
|
||||||
num_designs ));
|
num_designs ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@
|
||||||
else if (n_axis != num_axis)
|
else if (n_axis != num_axis)
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1.design_positions: incorrect table\n" ));
|
FT_ERROR(( "T1.design_positions: incorrect table\n" ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@
|
||||||
|
|
||||||
static void parse_blend_design_map( T1_Face face, T1_Loader* loader )
|
static void parse_blend_design_map( T1_Face face, T1_Loader* loader )
|
||||||
{
|
{
|
||||||
FT_Error error = 0;
|
T1_Error error = 0;
|
||||||
T1_Parser* parser = &loader->parser;
|
T1_Parser* parser = &loader->parser;
|
||||||
T1_Blend* blend;
|
T1_Blend* blend;
|
||||||
T1_Token_Rec axis_tokens[ T1_MAX_MM_AXIS ];
|
T1_Token_Rec axis_tokens[ T1_MAX_MM_AXIS ];
|
||||||
|
@ -466,7 +466,7 @@
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1.design map: incorrect number of axis: %d\n",
|
FT_ERROR(( "T1.design map: incorrect number of axis: %d\n",
|
||||||
num_axis ));
|
num_axis ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
old_cursor = parser->cursor;
|
old_cursor = parser->cursor;
|
||||||
|
@ -500,7 +500,7 @@
|
||||||
if (num_points <= 0 || num_points > T1_MAX_MM_MAP_POINTS)
|
if (num_points <= 0 || num_points > T1_MAX_MM_MAP_POINTS)
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1.design map: incorrect table\n" ));
|
FT_ERROR(( "T1.design map: incorrect table\n" ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@
|
||||||
|
|
||||||
static void parse_weight_vector( T1_Face face, T1_Loader* loader )
|
static void parse_weight_vector( T1_Face face, T1_Loader* loader )
|
||||||
{
|
{
|
||||||
FT_Error error = 0;
|
T1_Error error = 0;
|
||||||
T1_Parser* parser = &loader->parser;
|
T1_Parser* parser = &loader->parser;
|
||||||
T1_Blend* blend = face->blend;
|
T1_Blend* blend = face->blend;
|
||||||
T1_Token_Rec master;
|
T1_Token_Rec master;
|
||||||
|
@ -536,7 +536,7 @@
|
||||||
if (!blend || blend->num_designs == 0)
|
if (!blend || blend->num_designs == 0)
|
||||||
{
|
{
|
||||||
FT_ERROR(( "t1.weight_vector: too early !!\n" ));
|
FT_ERROR(( "t1.weight_vector: too early !!\n" ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@
|
||||||
if (master.type != t1_token_array)
|
if (master.type != t1_token_array)
|
||||||
{
|
{
|
||||||
FT_ERROR(( "t1.weight_vector: incorrect format !!\n" ));
|
FT_ERROR(( "t1.weight_vector: incorrect format !!\n" ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -839,7 +839,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
FT_ERROR(( "type1.read_binary_data: invalid size field\n" ));
|
FT_ERROR(( "type1.read_binary_data: invalid size field\n" ));
|
||||||
parser->error = FT_Err_Invalid_File_Format;
|
parser->error = T1_Err_Invalid_File_Format;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -852,7 +852,7 @@
|
||||||
void parse_font_name( T1_Face face, T1_Loader* loader )
|
void parse_font_name( T1_Face face, T1_Loader* loader )
|
||||||
{
|
{
|
||||||
T1_Parser* parser = &loader->parser;
|
T1_Parser* parser = &loader->parser;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
FT_Memory memory = parser->memory;
|
FT_Memory memory = parser->memory;
|
||||||
T1_Int len;
|
T1_Int len;
|
||||||
T1_Byte* cur;
|
T1_Byte* cur;
|
||||||
|
@ -926,7 +926,7 @@
|
||||||
if (cur >= limit)
|
if (cur >= limit)
|
||||||
{
|
{
|
||||||
FT_ERROR(( "type1.parse_encoding: out of bounds !!\n" ));
|
FT_ERROR(( "type1.parse_encoding: out of bounds !!\n" ));
|
||||||
parser->error = FT_Err_Invalid_File_Format;
|
parser->error = T1_Err_Invalid_File_Format;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -939,7 +939,7 @@
|
||||||
T1_Int count, n;
|
T1_Int count, n;
|
||||||
T1_Table* char_table = &loader->encoding_table;
|
T1_Table* char_table = &loader->encoding_table;
|
||||||
FT_Memory memory = parser->memory;
|
FT_Memory memory = parser->memory;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
|
|
||||||
/* read the number of entries in the encoding, should be 256 */
|
/* read the number of entries in the encoding, should be 256 */
|
||||||
count = T1_ToInt( parser );
|
count = T1_ToInt( parser );
|
||||||
|
@ -1042,7 +1042,7 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FT_ERROR(( "type1.parse_encoding: invalid token !!\n" ));
|
FT_ERROR(( "type1.parse_encoding: invalid token !!\n" ));
|
||||||
parser->error = FT_Err_Invalid_File_Format;
|
parser->error = T1_Err_Invalid_File_Format;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1054,7 +1054,7 @@
|
||||||
T1_Parser* parser = &loader->parser;
|
T1_Parser* parser = &loader->parser;
|
||||||
T1_Table* table = &loader->subrs;
|
T1_Table* table = &loader->subrs;
|
||||||
FT_Memory memory = parser->memory;
|
FT_Memory memory = parser->memory;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
T1_Int n;
|
T1_Int n;
|
||||||
|
|
||||||
loader->num_subrs = T1_ToInt( parser );
|
loader->num_subrs = T1_ToInt( parser );
|
||||||
|
@ -1100,7 +1100,7 @@
|
||||||
T1_Table* code_table = &loader->charstrings;
|
T1_Table* code_table = &loader->charstrings;
|
||||||
T1_Table* name_table = &loader->glyph_names;
|
T1_Table* name_table = &loader->glyph_names;
|
||||||
FT_Memory memory = parser->memory;
|
FT_Memory memory = parser->memory;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
|
|
||||||
T1_Byte* cur;
|
T1_Byte* cur;
|
||||||
T1_Byte* limit = parser->limit;
|
T1_Byte* limit = parser->limit;
|
||||||
|
@ -1352,7 +1352,7 @@
|
||||||
T1_Loader loader;
|
T1_Loader loader;
|
||||||
T1_Parser* parser;
|
T1_Parser* parser;
|
||||||
T1_Font* type1 = &face->type1;
|
T1_Font* type1 = &face->type1;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
|
|
||||||
t1_init_loader( &loader, face );
|
t1_init_loader( &loader, face );
|
||||||
|
|
||||||
|
@ -1379,13 +1379,13 @@
|
||||||
if ( !loader.subrs.init )
|
if ( !loader.subrs.init )
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1.Open_Face: no subrs array in face !!\n" ));
|
FT_ERROR(( "T1.Open_Face: no subrs array in face !!\n" ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !loader.charstrings.init )
|
if ( !loader.charstrings.init )
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1.Open_Face: no charstrings array in face !!\n" ));
|
FT_ERROR(( "T1.Open_Face: no charstrings array in face !!\n" ));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
}
|
}
|
||||||
|
|
||||||
loader.subrs.init = 0;
|
loader.subrs.init = 0;
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#define T1LOAD_H
|
#define T1LOAD_H
|
||||||
|
|
||||||
#include <freetype/internal/ftstream.h>
|
#include <freetype/internal/ftstream.h>
|
||||||
|
#include <freetype/internal/t1types.h>
|
||||||
|
#include <freetype/ftmm.h>
|
||||||
#include <t1parse.h>
|
#include <t1parse.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -48,19 +50,21 @@
|
||||||
|
|
||||||
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
|
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
|
||||||
LOCAL_DEF
|
LOCAL_DEF
|
||||||
FT_Error T1_Get_Multi_Master( T1_Face face,
|
T1_Error T1_Get_Multi_Master( T1_Face face,
|
||||||
FT_Multi_Master* master );
|
FT_Multi_Master* master );
|
||||||
|
|
||||||
LOCAL_DEF FT_Error T1_Set_MM_Blend( T1_Face face,
|
|
||||||
T1_UInt num_coords,
|
|
||||||
T1_Fixed* coords );
|
|
||||||
|
|
||||||
LOCAL_DEF FT_Error T1_Set_MM_Design( T1_Face face,
|
|
||||||
T1_UInt num_coords,
|
|
||||||
T1_Long* coords );
|
|
||||||
|
|
||||||
LOCAL_DEF
|
LOCAL_DEF
|
||||||
void T1_Done_Blend( T1_Face face );
|
T1_Error T1_Set_MM_Blend( T1_Face face,
|
||||||
|
T1_UInt num_coords,
|
||||||
|
T1_Fixed* coords );
|
||||||
|
|
||||||
|
LOCAL_DEF
|
||||||
|
T1_Error T1_Set_MM_Design( T1_Face face,
|
||||||
|
T1_UInt num_coords,
|
||||||
|
T1_Long* coords );
|
||||||
|
|
||||||
|
LOCAL_DEF
|
||||||
|
void T1_Done_Blend( T1_Face face );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
FT_Size_Metrics* metrics = &size->root.metrics;
|
FT_Size_Metrics* metrics = &size->root.metrics;
|
||||||
|
|
||||||
if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 )
|
if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 )
|
||||||
return FT_Err_Invalid_Argument;
|
return T1_Err_Invalid_Argument;
|
||||||
|
|
||||||
/* Compute root ascender, descender, test height, and max_advance */
|
/* Compute root ascender, descender, test height, and max_advance */
|
||||||
metrics->ascender = ( FT_MulFix( face->root.ascender,
|
metrics->ascender = ( FT_MulFix( face->root.ascender,
|
||||||
|
|
|
@ -629,7 +629,7 @@
|
||||||
T1_Int len = 0;
|
T1_Int len = 0;
|
||||||
T1_Int count;
|
T1_Int count;
|
||||||
T1_String* result;
|
T1_String* result;
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
|
|
||||||
/* XXX : some stupid fonts have a "Notice" or "Copyright" string */
|
/* XXX : some stupid fonts have a "Notice" or "Copyright" string */
|
||||||
/* that simply doesn't begin with an opening parenthesis, even */
|
/* that simply doesn't begin with an opening parenthesis, even */
|
||||||
|
@ -913,9 +913,9 @@
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
FT_Error read_pfb_tag( FT_Stream stream, T1_UShort *tag, T1_Long* size )
|
T1_Error read_pfb_tag( FT_Stream stream, T1_UShort *tag, T1_Long* size )
|
||||||
{
|
{
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
|
|
||||||
if (READ_UShort(*tag)) goto Exit;
|
if (READ_UShort(*tag)) goto Exit;
|
||||||
if (*tag == 0x8001 || *tag == 0x8002)
|
if (*tag == 0x8001 || *tag == 0x8002)
|
||||||
|
@ -942,7 +942,7 @@
|
||||||
FT_Stream stream,
|
FT_Stream stream,
|
||||||
FT_Memory memory )
|
FT_Memory memory )
|
||||||
{
|
{
|
||||||
FT_Error error;
|
T1_Error error;
|
||||||
T1_UShort tag;
|
T1_UShort tag;
|
||||||
T1_Long size;
|
T1_Long size;
|
||||||
|
|
||||||
|
@ -1095,7 +1095,7 @@
|
||||||
{
|
{
|
||||||
FT_Stream stream = parser->stream;
|
FT_Stream stream = parser->stream;
|
||||||
FT_Memory memory = parser->memory;
|
FT_Memory memory = parser->memory;
|
||||||
FT_Error error = 0;
|
T1_Error error = 0;
|
||||||
T1_Long size;
|
T1_Long size;
|
||||||
|
|
||||||
if (parser->in_pfb)
|
if (parser->in_pfb)
|
||||||
|
@ -1182,7 +1182,7 @@
|
||||||
if (cur >= limit)
|
if (cur >= limit)
|
||||||
{
|
{
|
||||||
FT_ERROR(("T1.Open_Private: could not find 'eexec' keyword\n"));
|
FT_ERROR(("T1.Open_Private: could not find 'eexec' keyword\n"));
|
||||||
error = FT_Err_Invalid_File_Format;
|
error = T1_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,6 +300,12 @@
|
||||||
void T1_ToToken( T1_Parser* parser,
|
void T1_ToToken( T1_Parser* parser,
|
||||||
T1_Token_Rec* token );
|
T1_Token_Rec* token );
|
||||||
|
|
||||||
|
LOCAL_FUNC
|
||||||
|
void T1_ToTokenArray( T1_Parser* parser,
|
||||||
|
T1_Token_Rec* tokens,
|
||||||
|
T1_UInt max_tokens,
|
||||||
|
T1_Int* pnum_tokens );
|
||||||
|
|
||||||
LOCAL_DEF
|
LOCAL_DEF
|
||||||
T1_Error T1_Load_Field( T1_Parser* parser,
|
T1_Error T1_Load_Field( T1_Parser* parser,
|
||||||
const T1_Field_Rec* field,
|
const T1_Field_Rec* field,
|
||||||
|
|
Loading…
Reference in New Issue