- Freetype Update to 2.1.10. Reduces memory usage, increases speed and fixes drawing bugs.

- Enable Bytecode. Weird_W's fonts finally look humanly readable.

Thanks to Waxdragon for testing.
 
<http://www.freetype.org>

LATEST CHANGES BETWEEN 2.1.10 and 2.1.9

  I. IMPORTANT BUG FIXES

    - The size comparison for BDF and PCF files could fail sometimes.

    - Some  CFF files  were still not  loaded  correctly.   Patch from
      Derek Noonburg.

    - The stroker still had some serious bugs.

    - Boris  Letocha  fixed a  bug in  the  TrueType interpreter:  The
      NPUSHW instruction wasn't skipped correctly in IF clauses.  Some
      fonts like `Helvetica 75 Bold' failed.

    - Another  serious  bug  in  handling  TrueType hints  caused many
      distortions.  It has been introduced in version 2.1.8, and it is
      highly recommended to upgrade.

    - FreeType didn't properly parse empty Type 1 glyphs.
    
    - An unbound dynamic buffer growth was fixed in the PFR loader.
    
    - Several bugs have been fixed in the cache sub-system.

    - FreeType behaved incorrectly when resizing two distinct but very
      close character pixel sizes through `FT_Set_Char_Size' (Savannah
      bug #12263).
      
    - The auto-hinter didn't work properly for fonts without a Unicode
      charmap -- it even refused to load the glyphs.


  II. IMPORTANT CHANGES

    - Many fixes have been applied to drastically reduce the amount of
      heap   memory   used   by   FreeType,   especially   when  using
      memory-mapped font files  (which is the default on Unix  systems
      which support them).

    - The auto-hinter  has been replaced with a new module, called the
      `auto-fitter'.  It consumes  less memory  than its  predecessor,
      and it is  prepared to support non-latin scripts  better in next
      releases.

    - George Williams  contributed code to read  kerning data from PFM
      files.

    - FreeType   now   uses    the   TT_NAME_ID_PREFERRED_FAMILY   and
      TT_NAME_ID_PREFERRED_SUBFAMILY   strings   (if   available)  for
      setting  family  and  style in SFNT  fonts  (patch from Kornfeld
      Eliyahu Peter).

    - A  new  API `FT_Sfnt_Table_Info'  (in FT_TRUETYPE_TABLES_H)  has
      been added to retrieve name and size information of SFNT tables.

    - A new API `FT_OpenType_Validate' (in FT_OPENTYPE_VALIDATE_H) has
      been added to validate OpenType tables  (BASE, GDEF, GPOS, GSUB,
      JSTF).   After validation  it is  no longer  necessary to  check
      for errors in those tables while accessing them.

      Note that  this module might  be moved to another library in the
      future  to avoid  a tight  dependency between  FreeType and  the
      OpenType specification.

    - A new API in FT_BITMAP_H  (`FT_Bitmap_New', `FT_Bitmap_Convert',
      `FT_Bitmap_Copy',  `FT_Bitmap_Embolden',  `FT_Bitmap_Done')  has
      been added.   Its  use is  to convert an  FT_Bitmap structure in
      1bpp, 2bpp,  4bpp, or 8bpp  format into  another 8bpp FT_Bitmap,
      probably using a different pitch, and to further manipulate it.

    - A new  API `FT_Outline_Embolden'  (in FT_OUTLINE_H) gives  finer
      control how  outlines are embolded.

    - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H)  now handles bitmaps
      also (code contributed  by Chia I Wu).  Note that this  function
      is still experimental and may be replaced with a better API.

    - The method  how BDF and PCF  bitmap fonts  are accessed has been
      refined.   Formerly,   FT_Set_Pixel_Sizes  and  FT_Set_Char_Size
      were  synonyms in  FreeType's  BDF and PCF interface.  This  has
      changed now.  FT_Set_Pixel_Sizes  should be  used to  select the
      actual  font dimensions  (the `strike',  which is the sum of the
      `FONT_ASCENT'    and    `FONT_DESCENT'    properties),     while
      FT_Set_Char_Size  selects  the  `nominal' size  (the `PIXELSIZE'
      property).  In both functions, the width parameter is ignored.


  III. MISCELLANEOUS

    - The BDF driver  no longer converts  all returned bitmaps  with a
      depth of 2bpp or 4bpp to a depth of 8bpp.  The documentation has
      not  mentioned  this  explicitly,  but  implementors  might have
      relied on this after looking into the source files.

    - A new option `--ftversion' has been  added to freetype-config to
      return the FreeType version.

    - The  memory  debugger  has  been  updated   to  dump  allocation
      statistics on  all allocation  sources in the library.   This is
      useful to  spot greedy  allocations when  loading and processing
      fonts.

    - We removed a huge array of constant pointers to constant strings
      in the `psnames' module.   The problem was that  compilations in
      PIC mode (i.e.,  when generating a  Unix shared object/dll)  put
      the array  into the non-shared  writable section of  the library
      since absolute pointers are not relocatable by nature.
      
      This reduces the memory consumption by approximately 16KByte per
      process linked  to FreeType.   We now also store  the array in a
      compressed form (as a trie) which saves about 20KByte of code as
      well.

    - Kirill  Smelkov provided  patches to make  src/raster/ftraster.c
      compile stand-alone again.

svn path=/trunk/; revision=16675
This commit is contained in:
Alex Ionescu 2005-07-21 04:38:26 +00:00
parent e4549de4a3
commit c6262e3b0f
278 changed files with 27574 additions and 21522 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,14 @@
# FreeType 2 top Jamfile (c) 2001, 2002, 2003, 2004 David Turner
# FreeType 2 top Jamfile.
#
# Copyright 2001, 2002, 2003, 2004 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# The HDRMACRO is already defined in FTJam and is used to add
# the content of certain macros to the list of included header
@ -62,7 +71,6 @@ FT2_BUILD_INCLUDE ?= ;
# if you modify this list or provide your own.
#
FT2_COMPONENTS ?= autofit # auto-fitter
autohint # auto-hinter
base # base component (public APIs)
bdf # BDF font driver
cache # cache sub-system
@ -70,6 +78,7 @@ FT2_COMPONENTS ?= autofit # auto-fitter
cid # PostScript CID-keyed font driver
gzip # support for gzip-compressed files
lzw # support for LZW-compressed files
#otvalid # validation of OpenType tables
pcf # PCF font driver
pfr # PFR/TrueDoc font driver
psaux # common PostScript routines module
@ -148,7 +157,7 @@ if $(DEBUG_HINTER)
actions RefDoc
{
python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.1.9 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h $(FT2_INCLUDE)/freetype/cache/*.h
python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.1.10 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h $(FT2_INCLUDE)/freetype/cache/*.h
}
RefDoc refdoc ;

View file

@ -1,5 +1,15 @@
# FreeType 2 JamRules (c) 2001, 2002, 2003 David Turner
# FreeType 2 JamRules.
#
# Copyright 2001, 2002, 2003 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# This file contains the Jam rules needed to build the FreeType 2 library.
# It is shared by all Jamfiles and is included only once in the build
# process.

View file

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2002 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View file

@ -9,8 +9,8 @@
is called `libttf'. They are *not* compatible!
FreeType 2.1.9
==============
FreeType 2.1.10
===============
Please read the docs/CHANGES file, it contains IMPORTANT INFORMATION.
@ -19,9 +19,9 @@
Note that the FreeType 2 documentation is now available as a
separate package from our sites. See:
ftp://ftp.freetype.org/freetype/freetype2/ftdocs-2.1.9.tar.bz2
ftp://ftp.freetype.org/freetype/freetype2/ftdocs-2.1.9.tar.gz
ftp://ftp.freetype.org/freetype/freetype2/ftdoc219.zip
ftp://ftp.freetype.org/freetype/freetype2/ftdocs-2.1.10.tar.bz2
ftp://ftp.freetype.org/freetype/freetype2/ftdocs-2.1.10.tar.gz
ftp://ftp.freetype.org/freetype/freetype2/ftdoc2110.zip
Bugs
@ -37,3 +37,17 @@
The FreeType Team
----------------------------------------------------------------------
Copyright 2001, 2002, 2003, 2004 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
license, LICENSE.TXT. By continuing to use, modify, or distribute
this file you indicate that you have read the license and understand
and accept it fully.
--- end of README ---

View file

@ -0,0 +1,25 @@
The CVS archive doesn't contain pre-built configuration scripts for
UNIXish platforms. To generate them say
sh autogen.sh
which in turn depends on the following packages:
automake (1.9.4)
libtool (1.5.16)
autoconf (2.59b)
The versions given in parentheses are known to work. Note that autogen.sh
also sets up proper file permissions for the configure and auxiliary
scripts.
For static builds which don't use platform specific optimizations no
configure script is necessary at all; saying
make setup ansi
make
should work on all platforms which have GNU make (or makepp).
--- end of README.CVS ---

View file

@ -0,0 +1,42 @@
#!/bin/sh
# Copyright 2005 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
run ()
{
echo "running \`$*'"
eval $*
if test $? != 0 ; then
echo "error while running \`$*'"
exit 1
fi
}
if test ! -f ./builds/unix/configure.ac; then
echo "You must be in the same directory as \`autogen.sh'."
echo "Bootstrapping doesn't work if srcdir != builddir."
exit 1
fi
cd builds/unix
run aclocal -I . --force
run libtoolize --force --copy
run autoconf --force
chmod +x mkinstalldirs
chmod +x install-sh
cd ../..
chmod +x ./configure
# EOF

View file

@ -1,90 +1,110 @@
The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted
on 68k-Amiga producing MorphOS-PPC-binaries from
http://www.morphos.de). To use it, type "make assign", then "make";
it produces a link library libft2_ppc.a.
README for the builds/amiga subdirectory.
Copyright 2005 by
Werner Lemberg and Detlef Würkner.
This file is part of the FreeType project, and may only be used, modified,
and distributed under the terms of the FreeType project license,
LICENSE.TXT. By continuing to use, modify, or distribute this file you
indicate that you have read the license and understand and accept it
fully.
The makefile.os4 is for the AmigaOS4 SDK. To use it, type
"make -f makefile.os4", it produces a link library libft2_ppc.a.
The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted on
68k-Amiga producing MorphOS-PPC-binaries from http://www.morphos.de).
To use it, type "make assign", then "make"; it produces a link library
libft2_ppc.a.
The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
latest sold version was 6.50, updates can be found in Aminet). It is
based on the version found in the sourcecode of ttf.library 0.83b for
FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
latest sold version was 6.50, updates can be found in Aminet). It is
based on the version found in the sourcecode of ttf.library 0.83b for
FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
http://ragriffi.home.sprynet.com).
You will also need the latest include files and amiga.lib from the
Amiga web site (http://www.amiga.com/3.9/download/NDK3.9.lha) for
You will also need the latest include files and amiga.lib from the
Amiga web site (http://www.amiga.com/3.9/download/NDK3.9.lha) for
AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
To use it, call "smake assign" and then "smake" from the builds/amiga
To use it, call "smake assign" and then "smake" from the builds/amiga
directory. The results are:
- A link library "ft2_680x0.lib" (where x depends on the setting of
the CPU entry in the smakefile) containing all FreeType2 parts
except of the init code, debugging code, and the system interface
- A link library "ft2_680x0.lib" (where x depends on the setting of
the CPU entry in the smakefile) containing all FreeType2 parts
except of the init code, debugging code, and the system interface
code.
- ftsystem.o, an object module containing the standard version of the
system interface code which uses fopen() fclose() fread() fseek()
- ftsystem.o, an object module containing the standard version of the
system interface code which uses fopen() fclose() fread() fseek()
ftell() malloc() realloc() and free() from lib:sc.lib (not pure).
- ftsystempure.o, an object module containing the pure version of the
system interface code which uses Open() Close() Read() Seek()
ExamineFH() AsmAllocPooled() AsmFreePooled() etc. This version can
be used in both normal programs and in Amiga run-time shared system
librarys (can be linked with lib:libinit.o, no copying of DATA and
BSS hunks for each OpenLibrary() necessary). Source code is in
- ftsystempure.o, an object module containing the pure version of the
system interface code which uses Open() Close() Read() Seek()
ExamineFH() AsmAllocPooled() AsmFreePooled() etc. This version can
be used in both normal programs and in Amiga run-time shared system
librarys (can be linked with lib:libinit.o, no copying of DATA and
BSS hunks for each OpenLibrary() necessary). Source code is in
src/base/ftsystem.c.
- ftdebug.o, an object module containing the standard version of the
debugging code which uses vprintf() and exit() (not pure).
Debugging can be turned on in FT:include/freetype/config/ftoption.h
- ftdebug.o, an object module containing the standard version of the
debugging code which uses vprintf() and exit() (not pure).
Debugging can be turned on in FT:include/freetype/config/ftoption.h
and with FT_SetTraceLevel().
- ftdebugpure.o, an object module containing the pure version of the
debugging code which uses KVPrintf() from lib:debug.lib and no
exit(). For debugging of Amiga run-time shared system libraries.
- ftdebugpure.o, an object module containing the pure version of the
debugging code which uses KVPrintf() from lib:debug.lib and no
exit(). For debugging of Amiga run-time shared system libraries.
Source code is in src/base/ftdebug.c.
- NO ftinit.o. Since linking with a link library should result in
linking only the needed object modules in it, but standard
ftsystem.o would force ALL FreeType2 modules to be linked to your
program, I decided to use a different scheme: You must #include
FT:src/base/ftinit.c in your sourcecode and specify with #define
statements which modules you need. See
- NO ftinit.o. Because linking with a link library should result in
linking only the needed object modules in it, but standard
ftsystem.o would force ALL FreeType2 modules to be linked to your
program, I decided to use a different scheme: You must #include
FT:src/base/ftinit.c in your sourcecode and specify with #define
statements which modules you need. See
include/freetype/config/ftmodule.h.
To use in your own programs:
- Insert the #define and #include statements from top of
- Insert the #define and #include statements from top of
include/freetype/config/ftmodule.h in your source code and uncomment
the #define statements for the FreeType2 modules you need.
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
calling the FreeType2 functions, since the link library and the
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
calling the FreeType2 functions, because the link library and the
object files are compiled with PARAMETERS=BOTH.
- "smake assign" (assign "FT:" to the FreeType2 main directory).
- Compile your program.
- Link with either ftsystem.o or ftsystempure.o, if debugging enabled
- Link with either ftsystem.o or ftsystempure.o, if debugging enabled
with either ftdebug.o or (ftdebugpure.o and lib:debug.lib), and with
ft2_680x0.lib as link library.
To adapt to other compilers:
- The standard ANSI C maximum length of 31 significant characters in
- The standard ANSI C maximum length of 31 significant characters in
identifiers is not enough for FreeType2. Check if your compiler has
a minimum length of 40 significant characters or can be switched to
it. "idlen=40" is the option for SAS/C. Setting #define
a minimum length of 40 significant characters or can be switched to
it. "idlen=40" is the option for SAS/C. Setting #define
HAVE_LIMIT_ON_IDENTS in an include file may also work (not tested).
- Make sure that the include directory in builds/amiga is searched
before the normal FreeType2 include directory, so you are able to
- Make sure that the include directory in builds/amiga is searched
before the normal FreeType2 include directory, so you are able to
replace problematic include files with your own version (same may be
useful for the src directory).
- An example of how to replace/workaround a problematic include file
is include/config/ftconfig.h; it changes a #define that would
prevent SAS/C from generating XDEF's where it should do that and
- An example of how to replace/workaround a problematic include file
is include/config/ftconfig.h; it changes a #define that would
prevent SAS/C from generating XDEF's where it should do that and
then includes the standard FreeType2 include file.
Local Variables:
coding: latin-1
End:

View file

@ -1,20 +1,59 @@
// TetiSoft: We must change FT_BASE_DEF and FT_EXPORT_DEF
/***************************************************************************/
/* */
/* ftconfig.h */
/* */
/* Amiga-specific configuration file (specification only). */
/* */
/* Copyright 2005 by */
/* Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
/*
* This is an example how to override the default FreeType2 header files
* with Amiga-specific changes. When the compiler searches this directory
* before the default directory, we can do some modifications.
*
* Here we must change FT_BASE_DEF and FT_EXPORT_DEF so that SAS/C does
* generate the needed XDEFs.
*/
#if 0
#define FT_BASE_DEF( x ) extern x
#define FT_EXPORT_DEF( x ) extern x
#endif
//#define FT_BASE_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
//#define FT_EXPORT_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
#undef FT_BASE_DEF
#define FT_BASE_DEF( x ) x
#undef FT_EXPORT_DEF
#define FT_EXPORT_DEF( x ) x
// TetiSoft: now include original file
/* Now include the original file */
#ifndef __MORPHOS__
#ifdef __SASC
#include "FT:include/freetype/config/ftconfig.h"
#else
// We must define that, it seems that
// lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
// ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
// binaries from http://www.morphos.de)
#include "/FT/include/freetype/config/ftconfig.h"
#endif
#else
/* We must define that, it seems that
* lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
* ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
* binaries from http://www.morphos.de)
*/
#define _LIBC_LIMITS_H_
#include "/FT/include/freetype/config/ftconfig.h"
#endif
/*
Local Variables:
coding: latin-1
End:
*/

View file

@ -1,24 +1,46 @@
// TetiSoft: To specify which modules you need,
// insert the following in your source file and uncomment as needed:
/***************************************************************************/
/* */
/* ftmodule.h */
/* */
/* Amiga-specific FreeType module selection. */
/* */
/* Copyright 2005 by */
/* Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
/*
//#define FT_USE_AUTOHINT // autohinter
//#define FT_USE_RASTER // monochrome rasterizer
//#define FT_USE_SMOOTH // anti-aliasing rasterizer
//#define FT_USE_TT // truetype font driver
//#define FT_USE_T1 // type1 font driver
//#define FT_USE_T42 // type42 font driver
//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support
//#define FT_USE_CFF // opentype font driver
//#define FT_USE_BDF // bdf bitmap font driver
//#define FT_USE_PCF // pcf bitmap font driver
//#define FT_USE_PFR // pfr font driver
//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
* To avoid that all your programs include all FreeType modules,
* you copy the following piece of source code into your own
* source file and specify which modules you really need in your
* application by uncommenting the appropriate lines.
*/
/*
//#define FT_USE_AUTOFIT // autofitter
//#define FT_USE_RASTER // monochrome rasterizer
//#define FT_USE_SMOOTH // anti-aliasing rasterizer
//#define FT_USE_TT // truetype font driver
//#define FT_USE_T1 // type1 font driver
//#define FT_USE_T42 // type42 font driver
//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support
//#define FT_USE_CFF // opentype font driver
//#define FT_USE_BDF // bdf bitmap font driver
//#define FT_USE_PCF // pcf bitmap font driver
//#define FT_USE_PFR // pfr font driver
//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
//#define FT_USE_OTV // opentype validator
#include "FT:src/base/ftinit.c"
*/
// TetiSoft: make sure that needed support modules are built in.
// Dependencies can be found by searching for FT_Get_Module.
/* Make sure that the needed support modules are built in.
* Dependencies can be found by searching for FT_Get_Module.
*/
#ifdef FT_USE_T42
#define FT_USE_TT
@ -54,14 +76,18 @@
#define FT_USE_PSNAMES
#endif
// TetiSoft: Now include the modules
/* Now include the modules */
#ifdef FT_USE_AUTOHINT
FT_USE_MODULE(autohint_module_class)
#ifdef FT_USE_AUTOFIT
FT_USE_MODULE(autofit_module_class)
#endif
#ifdef FT_USE_PSHINT
FT_USE_MODULE(pshinter_module_class)
#ifdef FT_USE_TT
FT_USE_MODULE(tt_driver_class)
#endif
#ifdef FT_USE_T1
FT_USE_MODULE(t1_driver_class)
#endif
#ifdef FT_USE_CFF
@ -72,18 +98,22 @@ FT_USE_MODULE(cff_driver_class)
FT_USE_MODULE(t1cid_driver_class)
#endif
#ifdef FT_USE_BDF
FT_USE_MODULE(bdf_driver_class)
#ifdef FT_USE_PFR
FT_USE_MODULE(pfr_driver_class)
#endif
#ifdef FT_USE_T42
FT_USE_MODULE(t42_driver_class)
#endif
#ifdef FT_USE_WINFNT
FT_USE_MODULE(winfnt_driver_class)
#endif
#ifdef FT_USE_PCF
FT_USE_MODULE(pcf_driver_class)
#endif
#ifdef FT_USE_PFR
FT_USE_MODULE(pfr_driver_class)
#endif
#ifdef FT_USE_PSAUX
FT_USE_MODULE(psaux_module_class)
#endif
@ -92,6 +122,10 @@ FT_USE_MODULE(psaux_module_class)
FT_USE_MODULE(psnames_module_class)
#endif
#ifdef FT_USE_PSHINT
FT_USE_MODULE(pshinter_module_class)
#endif
#ifdef FT_USE_RASTER
FT_USE_MODULE(ft_raster1_renderer_class)
#endif
@ -106,18 +140,16 @@ FT_USE_MODULE(ft_smooth_lcd_renderer_class)
FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
#endif
#ifdef FT_USE_TT
FT_USE_MODULE(tt_driver_class)
#ifdef FT_USE_OTV
FT_USE_MODULE(otv_module_class)
#endif
#ifdef FT_USE_T1
FT_USE_MODULE(t1_driver_class)
#ifdef FT_USE_BDF
FT_USE_MODULE(bdf_driver_class)
#endif
#ifdef FT_USE_T42
FT_USE_MODULE(t42_driver_class)
#endif
#ifdef FT_USE_WINFNT
FT_USE_MODULE(winfnt_driver_class)
#endif
/*
Local Variables:
coding: latin-1
End:
*/

View file

@ -0,0 +1,265 @@
#
# Makefile for FreeType2 link library using ppc-morphos-gcc-2.95.3-bin.tgz
# (gcc 2.95.3 hosted on 68k-Amiga producing MorphOS-PPC-binaries from
# http://www.morphos.de)
#
# Copyright 2005 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
#
# to build from the builds/amiga directory call
#
# make assign
# make
#
# Your programs source code should start with this
# (uncomment the parts you do not need to keep the program small):
# ---8<---
#define FT_USE_AUTOFIT // autofitter
#define FT_USE_RASTER // monochrome rasterizer
#define FT_USE_SMOOTH // anti-aliasing rasterizer
#define FT_USE_TT // truetype font driver
#define FT_USE_T1 // type1 font driver
#define FT_USE_T42 // type42 font driver
#define FT_USE_T1CID // cid-keyed type1 font driver
#define FT_USE_CFF // opentype font driver
#define FT_USE_BDF // bdf bitmap font driver
#define FT_USE_PCF // pcf bitmap font driver
#define FT_USE_PFR // pfr font driver
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#define FT_USE_OTV // opentype validator
#include "FT:src/base/ftinit.c"
# ---8<---
#
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
assign:
assign FT: //
FTSRC = /FT/src
CC = ppc-morphos-gcc
AR = ppc-morphos-ar rc
RANLIB = ppc-morphos-ranlib
LD = ppc-morphos-ld
CFLAGS = -O2 -I/emu/emulinclude/includegcc -I/emu/include -Iinclude -I$(FTSRC) -I/FT/include
#
# FreeType2 library base
#
ftbase.ppc.o: $(FTSRC)/base/ftbase.c
$(CC) -c $(CFLAGS) -o $@ $<
ftinit.ppc.o: $(FTSRC)/base/ftinit.c
$(CC) -c $(CFLAGS) -o $@ $<
ftsystem.ppc.o: $(FTSRC)/base/ftsystem.c
$(CC) -c $(CFLAGS) -o $@ $<
# pure version for use in run-time library etc
ftsystempure.ppc.o: src/base/ftsystem.c
$(CC) -c $(CFLAGS) -o $@ $<
ftdebug.ppc.o: $(FTSRC)/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ $<
# pure version for use in run-time library etc
ftdebugpure.ppc.o: src/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library base extensions
#
ftbbox.ppc.o: $(FTSRC)/base/ftbbox.c
$(CC) -c $(CFLAGS) -o $@ $<
ftbdf.ppc.o: $(FTSRC)/base/ftbdf.c
$(CC) -c $(CFLAGS) -o $@ $<
ftbitmap.ppc.o: $(FTSRC)/base/ftbitmap.c
$(CC) -c $(CFLAGS) -o $@ $<
ftglyph.ppc.o: $(FTSRC)/base/ftglyph.c
$(CC) -c $(CFLAGS) -o $@ $<
ftmm.ppc.o: $(FTSRC)/base/ftmm.c
$(CC) -c $(CFLAGS) -o $@ $<
ftotval.ppc.o: $(FTSRC)/base/ftotval.c
$(CC) -c $(CFLAGS) -o $@ $<
ftpfr.ppc.o: $(FTSRC)/base/ftpfr.c
$(CC) -c $(CFLAGS) -o $@ $<
ftstroke.ppc.o: $(FTSRC)/base/ftstroke.c
$(CC) -c $(CFLAGS) -o $@ $<
ftsynth.ppc.o: $(FTSRC)/base/ftsynth.c
$(CC) -c $(CFLAGS) -o $@ $<
fttype1.ppc.o: $(FTSRC)/base/fttype1.c
$(CC) -c $(CFLAGS) -o $@ $<
ftwinfnt.ppc.o: $(FTSRC)/base/ftwinfnt.c
$(CC) -c $(CFLAGS) -o $@ $<
ftxf86.ppc.o: $(FTSRC)/base/ftxf86.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library autofitting module
#
autofit.ppc.o: $(FTSRC)/autofit/autofit.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library postscript hinting module
#
pshinter.ppc.o: $(FTSRC)/pshinter/pshinter.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PS support module
#
psaux.ppc.o: $(FTSRC)/psaux/psaux.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PS glyph names module
#
psnames.ppc.o: $(FTSRC)/psnames/psnames.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library monochrome raster module
#
raster.ppc.o: $(FTSRC)/raster/raster.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library anti-aliasing raster module
#
smooth.ppc.o: $(FTSRC)/smooth/smooth.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library 'sfnt' module
#
sfnt.ppc.o: $(FTSRC)/sfnt/sfnt.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library glyph and image caching system
#
ftcache.ppc.o: $(FTSRC)/cache/ftcache.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library OpenType font driver
#
cff.ppc.o: $(FTSRC)/cff/cff.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library TrueType font driver
#
truetype.ppc.o: $(FTSRC)/truetype/truetype.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library Type1 font driver
#
type1.ppc.o: $(FTSRC)/type1/type1.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library Type42 font driver
#
type42.ppc.o: $(FTSRC)/type42/type42.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library CID-keyed Type1 font driver
#
type1cid.ppc.o: $(FTSRC)/cid/type1cid.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library BDF bitmap font driver
#
bdf.ppc.o: $(FTSRC)/bdf/bdf.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PCF bitmap font driver
#
pcf.ppc.o: $(FTSRC)/pcf/pcf.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library gzip support for compressed PCF bitmap fonts
#
gzip.ppc.o: $(FTSRC)/gzip/ftgzip.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library compress support for compressed PCF bitmap fonts
#
lzw.ppc.o: $(FTSRC)/lzw/ftlzw.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PFR font driver
#
pfr.ppc.o: $(FTSRC)/pfr/pfr.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library Windows FNT/FON bitmap font driver
#
winfnt.ppc.o: $(FTSRC)/winfonts/winfnt.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library OpenType validator
#
otvalid.ppc.o: $(FTSRC)/otvalid/otvalid.c
$(CC) -c $(CFLAGS) -o $@ $<
BASEPPC = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftglyph.ppc.o \
ftmm.ppc.o ftotval.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o ftxf86.ppc.o
DEBUGPPC = ftdebug.ppc.o ftdebugpure.ppc.o
AFITPPC = autofit.ppc.o
OTVPPC = otvalid.ppc.o
PSPPC = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
RASTERPPC = raster.ppc.o smooth.ppc.o
FONTDPPC = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
libft2_ppc.a: $(BASEPPC) $(AFITPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o lzw.ppc.o
$(AR) $@ $(BASEPPC) $(AFITPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o lzw.ppc.o
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
#Local Variables:
#coding: latin-1
#End:

View file

@ -0,0 +1,270 @@
#
# Makefile for FreeType2 link library using gcc 3.4.3 from the
# AmigaOS4 SDK
#
# Copyright 2005 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# to build from the builds/amiga directory call
#
# make
#
# Your programs source code should start with this
# (uncomment the parts you do not need to keep the program small):
# ---8<---
#define FT_USE_AUTOFIT // autofitter
#define FT_USE_RASTER // monochrome rasterizer
#define FT_USE_SMOOTH // anti-aliasing rasterizer
#define FT_USE_TT // truetype font driver
#define FT_USE_T1 // type1 font driver
#define FT_USE_T42 // type42 font driver
#define FT_USE_T1CID // cid-keyed type1 font driver
#define FT_USE_CFF // opentype font driver
#define FT_USE_BDF // bdf bitmap font driver
#define FT_USE_PCF // pcf bitmap font driver
#define FT_USE_PFR // pfr font driver
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#define FT_USE_OTV // opentype validator
#include "FT:src/base/ftinit.c"
# ---8<---
#
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
assign:
assign FT: //
CC = ppc-amigaos-gcc
AR = ppc-amigaos-ar
RANLIB = ppc-amigaos-ranlib
DIRFLAGS = -Iinclude -I/FT/src -I/FT/include -I/SDK/include
WARNINGS = -Wall -W -Wundef -Wpointer-arith -Wbad-function-cast \
-Waggregate-return -Wshadow
CPU = -mcpu=604e
OPTIONS = -DNDEBUG -fno-builtin
OPTIMIZE = -O2 -fomit-frame-pointer -fstrength-reduce -finline-functions
CFLAGS = $(DIRFLAGS) $(WARNINGS) $(FT2FLAGS) $(CPU) $(OPTIONS) $(OPTIMIZE)
#
# FreeType2 library base
#
ftbase.ppc.o: FT:src/base/ftbase.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbase.c
ftinit.ppc.o: FT:src/base/ftinit.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftinit.c
ftsystem.ppc.o: FT:src/base/ftsystem.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsystem.c
# pure version for use in run-time library etc
ftsystempure.ppc.o: src/base/ftsystem.c
$(CC) -c $(CFLAGS) -o $@ src/base/ftsystem.c
#
# FreeType2 library base extensions
#
ftbbox.ppc.o: FT:src/base/ftbbox.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbbox.c
ftbdf.ppc.o: FT:src/base/ftbdf.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbdf.c
ftbitmap.ppc.o: FT:src/base/ftbitmap.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbitmap.c
ftdebug.ppc.o: FT:src/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftdebug.c
# pure version for use in run-time library etc
ftdebugpure.ppc.o: src/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ src/base/ftdebug.c
ftglyph.ppc.o: FT:src/base/ftglyph.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftglyph.c
ftmm.ppc.o: FT:src/base/ftmm.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftmm.c
ftotval.ppc.o: FT:src/base/ftotval.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftotval.c
ftpfr.ppc.o: FT:src/base/ftpfr.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftpfr.c
ftstroke.ppc.o: FT:src/base/ftstroke.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftstroke.c
ftsynth.ppc.o: FT:src/base/ftsynth.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsynth.c
fttype1.ppc.o: FT:src/base/fttype1.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/fttype1.c
ftwinfnt.ppc.o: FT:src/base/ftwinfnt.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftwinfnt.c
ftxf86.ppc.o: FT:src/base/ftxf86.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftxf86.c
#
# FreeType2 library autofitting module
#
autofit.ppc.o: FT:src/autofit/autofit.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/autofit/autofit.c
#
# FreeType2 library postscript hinting module
#
pshinter.ppc.o: FT:src/pshinter/pshinter.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/pshinter/pshinter.c
#
# FreeType2 library PS support module
#
psaux.ppc.o: FT:src/psaux/psaux.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/psaux/psaux.c
#
# FreeType2 library PS glyph names module
#
psnames.ppc.o: FT:src/psnames/psnames.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/psnames/psnames.c
#
# FreeType2 library monochrome raster module
#
raster.ppc.o: FT:src/raster/raster.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/raster/raster.c
#
# FreeType2 library anti-aliasing raster module
#
smooth.ppc.o: FT:src/smooth/smooth.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/smooth/smooth.c
#
# FreeType2 library 'sfnt' module
#
sfnt.ppc.o: FT:src/sfnt/sfnt.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/sfnt/sfnt.c
#
# FreeType2 library glyph and image caching system
#
ftcache.ppc.o: FT:src/cache/ftcache.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/cache/ftcache.c
#
# FreeType2 library OpenType font driver
#
cff.ppc.o: FT:src/cff/cff.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/cff/cff.c
#
# FreeType2 library TrueType font driver
#
truetype.ppc.o: FT:src/truetype/truetype.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/truetype/truetype.c
#
# FreeType2 library Type1 font driver
#
type1.ppc.o: FT:src/type1/type1.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/type1/type1.c
#
# FreeType2 library Type42 font driver
#
type42.ppc.o: FT:src/type42/type42.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/type42/type42.c
#
# FreeType2 library CID-keyed Type1 font driver
#
type1cid.ppc.o: FT:src/cid/type1cid.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/cid/type1cid.c
#
# FreeType2 library BDF bitmap font driver
#
bdf.ppc.o: FT:src/bdf/bdf.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/bdf/bdf.c
#
# FreeType2 library PCF bitmap font driver
#
pcf.ppc.o: FT:src/pcf/pcf.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/pcf/pcf.c
#
# FreeType2 library gzip support for compressed PCF bitmap fonts
#
gzip.ppc.o: FT:src/gzip/ftgzip.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/gzip/ftgzip.c
#
# FreeType2 library compress support for compressed PCF bitmap fonts
#
lzw.ppc.o: FT:src/lzw/ftlzw.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/lzw/ftlzw.c
#
# FreeType2 library PFR font driver
#
pfr.ppc.o: FT:src/pfr/pfr.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/pfr/pfr.c
#
# FreeType2 library Windows FNT/FON bitmap font driver
#
winfnt.ppc.o: FT:src/winfonts/winfnt.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/winfonts/winfnt.c
#
# FreeType2 library OpenType validator
#
otvalid.ppc.o: FT:src/otvalid/otvalid.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/otvalid/otvalid.c
BASE = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftglyph.ppc.o \
ftmm.ppc.o ftotval.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o ftxf86.ppc.o
DEBUG = ftdebug.ppc.o ftdebugpure.ppc.o
AFIT = autofit.ppc.o
OTV = otvalid.ppc.o
PS = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
RASTER = raster.ppc.o smooth.ppc.o
FONTD = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
libft2_ppc.a: $(BASE) $(AFIT) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
$(AR) r $@ $(BASE) $(AFIT) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
$(RANLIB) $@
#Local Variables:
#coding: latin-1
#End:

View file

@ -1,6 +1,18 @@
#
# Makefile for FreeType2 link library using Amiga SAS/C 6.58
#
# Copyright 2005 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# to build from the builds/amiga directory call
#
# smake assign
@ -9,18 +21,19 @@
# Your programs source code should start with this
# (uncomment the parts you do not need to keep the program small):
# ---8<---
#define FT_USE_AUTOHINT // autohinter
#define FT_USE_RASTER // monochrome rasterizer
#define FT_USE_SMOOTH // anti-aliasing rasterizer
#define FT_USE_TT // truetype font driver
#define FT_USE_T1 // type1 font driver
#define FT_USE_T42 // type42 font driver
#define FT_USE_T1CID // cid-keyed type1 font driver
#define FT_USE_CFF // opentype font driver
#define FT_USE_BDF // bdf bitmap font driver
#define FT_USE_PCF // pcf bitmap font driver
#define FT_USE_PFR // pfr font driver
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#define FT_USE_AUTOFIT // autofitter
#define FT_USE_RASTER // monochrome rasterizer
#define FT_USE_SMOOTH // anti-aliasing rasterizer
#define FT_USE_TT // truetype font driver
#define FT_USE_T1 // type1 font driver
#define FT_USE_T42 // type42 font driver
#define FT_USE_T1CID // cid-keyed type1 font driver
#define FT_USE_CFF // opentype font driver
#define FT_USE_BDF // bdf bitmap font driver
#define FT_USE_PCF // pcf bitmap font driver
#define FT_USE_PFR // pfr font driver
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#define FT_USE_OTV // opentype validator
#include "FT:src/base/ftinit.c"
# ---8<---
#
@ -28,32 +41,25 @@
# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
OBJBASE = ftbase.o ftglyph.o ftbbox.o ftmm.o ftsynth.o
OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftglyph.o ftmm.o ftotval.o \
ftpfr.o ftstroke.o ftsynth.o fttype1.o ftwinfnt.o ftxf86.o
OBJSYSTEM = ftsystem.o ftsystempure.o
OBJDEBUG = ftdebug.o ftdebugpure.o
OBJAHINT = autohint.o ahoptim.o
OBJAFIT = autofit.o
OBJPSHINT = pshinter.o
OBJOTV = otvalid.o
OBJPSAUX = psaux.o
OBJPS = psaux.o psnames.o pshinter.o
OBJPSNAM = psnames.o
OBJRAST = raster.o
OBJSMOOTH = smooth.o
OBJRASTER = raster.o smooth.o
OBJSFNT = sfnt.o
OBJCACHE = ftcache.o
OBJPS = $(OBJPSAUX) $(OBJPSNAM) $(OBJPSHINT)
OBJRASTER = $(OBJRAST) $(OBJSMOOTH)
OBJFONTD = cff.o type1.o type42.o type1cid.o\
truetype.o winfnt.o bdf.o pcf.o pfr.o
@ -88,8 +94,8 @@ assign:
# uses separate object modules in lib to make for easier debugging
# also, can make smaller programs if entire engine is not used
ft2_$(CPU).lib: $(OBJBASE) $(OBJAHINT) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD)
oml $@ r $(OBJBASE) $(OBJAHINT) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD)
ft2_$(CPU).lib: $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o # gzip.o
oml $@ r $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o
clean:
-delete \#?.o
@ -115,24 +121,35 @@ ftdebugpure.o: src/base/ftdebug.c ## pure version for use in run-time library et
#
# freetype library base extensions
#
ftglyph.o: $(CORE)base/ftglyph.c
sc $(SCFLAGS) objname=$@ $<
ftbbox.o: $(CORE)base/ftbbox.c
sc $(SCFLAGS) objname=$@ $<
ftbdf.o: $(CORE)base/ftbdf.c
sc $(SCFLAGS) objname=$@ $<
ftbitmap.o: $(CORE)base/ftbitmap.c
sc $(SCFLAGS) objname=$@ $<
ftglyph.o: $(CORE)base/ftglyph.c
sc $(SCFLAGS) objname=$@ $<
ftmm.o: $(CORE)base/ftmm.c
sc $(SCFLAGS) objname=$@ $<
ftotval.o: $(CORE)base/ftotval.c
sc $(SCFLAGS) objname=$@ $<
ftpfr.o: $(CORE)base/ftpfr.c
sc $(SCFLAGS) objname=$@ $<
ftstroke.o: $(CORE)base/ftstroke.c
sc $(SCFLAGS) objname=$@ $<
ftsynth.o: $(CORE)base/ftsynth.c
sc $(SCFLAGS) objname=$@ $<
fttype1.o: $(CORE)base/fttype1.c
sc $(SCFLAGS) objname=$@ $<
ftwinfnt.o: $(CORE)base/ftwinfnt.c
sc $(SCFLAGS) objname=$@ $<
ftxf86.o: $(CORE)base/ftxf86.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library autohinting module
# freetype library autofitter module
#
autohint.o: $(CORE)autohint/autohint.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library autohinting module extensions
#
ahoptim.o: $(CORE)autohint/ahoptim.c
autofit.o: $(CORE)autofit/autofit.c
sc $(SCFLAGS) objname=$@ $<
#
@ -223,6 +240,18 @@ bdf.o: $(CORE)bdf/bdf.c
pcf.o: $(CORE)pcf/pcf.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library gzip support for compressed PCF bitmap fonts
#
gzip.o: $(CORE)gzip/ftgzip.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library compress support for compressed PCF bitmap fonts
#
lzw.o: $(CORE)lzw/ftlzw.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library PFR font driver
#
@ -234,3 +263,13 @@ pfr.o: $(CORE)pfr/pfr.c
#
winfnt.o: $(CORE)winfonts/winfnt.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library OpenType validator
#
otvalid.o: $(CORE)otvalid/otvalid.c
sc $(SCFLAGS) objname=$@ $<
#Local Variables:
#coding: latin-1
#End:

View file

@ -1,14 +1,11 @@
// TetiSoft: replaced vprintf() with KVPrintF() and commented out exit()
extern void __stdargs KVPrintF( const char *formatString, const void *values );
/***************************************************************************/
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component (body). */
/* */
/* Copyright 1996-2001 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 1996-2001, 2002, 2004, 2005 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@ -44,21 +41,38 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
/*************************************************************************/
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
/*
* Based on the default ftdebug.c,
* replaced vprintf() with KVPrintF(),
* commented out exit(),
* replaced getenv() with GetVar().
*/
#include <exec/types.h>
#include <utility/tagitem.h>
#include <dos/exall.h>
#include <dos/var.h>
#define __NOLIBBASE__
#define __NOLOBALIFACE__
#define __USE_INLINE__
#include <proto/dos.h>
#include <clib/debug_protos.h>
#ifdef FT_DEBUG_LEVEL_TRACE
char ft_trace_levels[trace_max];
#ifndef __amigaos4__
extern struct Library *DOSBase;
#else
extern struct DOSIFace *IDOS;
#endif
#if defined( FT_DEBUG_LEVEL_ERROR ) || defined( FT_DEBUG_LEVEL_TRACE )
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_DEBUG_H
#include <stdarg.h>
#include <stdlib.h>
#if defined( FT_DEBUG_LEVEL_ERROR )
/* documentation is in ftdebug.h */
FT_EXPORT_DEF( void )
FT_Message( const char* fmt, ... )
@ -67,12 +81,14 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
va_start( ap, fmt );
// vprintf( fmt, ap );
/* vprintf( fmt, ap ); */
KVPrintF( fmt, ap );
va_end( ap );
}
/* documentation is in ftdebug.h */
FT_EXPORT_DEF( void )
FT_Panic( const char* fmt, ... )
{
@ -80,29 +96,87 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
va_start( ap, fmt );
// vprintf( fmt, ap );
/* vprintf( fmt, ap ); */
KVPrintF( fmt, ap );
va_end( ap );
// exit( EXIT_FAILURE );
/* exit( EXIT_FAILURE ); */
}
#endif /* FT_DEBUG_LEVEL_ERROR */
#ifdef FT_DEBUG_LEVEL_TRACE
/* array of trace levels, initialized to 0 */
int ft_trace_levels[trace_count];
/* define array of trace toggle names */
#define FT_TRACE_DEF( x ) #x ,
static const char* ft_trace_toggles[trace_count + 1] =
{
#include FT_INTERNAL_TRACE_H
NULL
};
#undef FT_TRACE_DEF
/* documentation is in ftdebug.h */
FT_EXPORT_DEF( FT_Int )
FT_Trace_Get_Count( void )
{
return trace_count;
}
/* documentation is in ftdebug.h */
/* since I don't know wether "getenv" is available on the Amiga */
/* I prefer to simply disable this code for now in all builds */
/* */
FT_EXPORT_DEF( const char * )
FT_Trace_Get_Name( FT_Int idx )
{
int max = FT_Trace_Get_Count();
/* #ifdef FT_DEBUG_LEVEL_TRACE */
#if 0
if ( idx < max )
return ft_trace_toggles[idx];
else
return NULL;
}
/*************************************************************************/
/* */
/* Initialize the tracing sub-system. This is done by retrieving the */
/* value of the `FT2_DEBUG' environment variable. It must be a list of */
/* toggles, separated by spaces, `;', or `,'. Example: */
/* */
/* export FT2_DEBUG="any:3 memory:7 stream:5" */
/* */
/* This requests that all levels be set to 3, except the trace level for */
/* the memory and stream components which are set to 7 and 5, */
/* respectively. */
/* */
/* See the file <include/freetype/internal/fttrace.h> for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 7; 0 means quiet (except for serious */
/* runtime errors), and 7 means _very_ verbose. */
/* */
FT_BASE_DEF( void )
ft_debug_init( void )
{
const char* ft2_debug = getenv( "FT2_DEBUG" );
/* const char* ft2_debug = getenv( "FT2_DEBUG" ); */
char buf[256];
const char* ft2_debug = &buf[0];
if ( ft2_debug )
/* if ( ft2_debug ) */
if ( GetVar( "FT2_DEBUG", (STRPTR)ft2_debug, 256, LV_VAR ) > 0 )
{
const char* p = ft2_debug;
const char* q;
@ -114,15 +188,15 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
continue;
/* read toggle name, followed by '=' */
/* read toggle name, followed by ':' */
q = p;
while ( *p && *p != ':' )
p++;
if ( *p == ':' && p > q )
{
int n, i, len = p - q;
int level = -1, found = -1;
FT_Int n, i, len = (FT_Int)( p - q );
FT_Int level = -1, found = -1;
for ( n = 0; n < trace_count; n++ )
@ -148,7 +222,7 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
if ( *p )
{
level = *p++ - '0';
if ( level < 0 || level > 6 )
if ( level < 0 || level > 7 )
level = -1;
}
@ -156,7 +230,7 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
{
if ( found == trace_any )
{
/* special case for "any" */
/* special case for `any' */
for ( n = 0; n < trace_count; n++ )
ft_trace_levels[n] = level;
}
@ -179,7 +253,27 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
}
FT_EXPORT_DEF( FT_Int )
FT_Trace_Get_Count( void )
{
return 0;
}
FT_EXPORT_DEF( const char * )
FT_Trace_Get_Name( FT_Int idx )
{
FT_UNUSED( idx );
return NULL;
}
#endif /* !FT_DEBUG_LEVEL_TRACE */
/*
Local Variables:
coding: latin-1
End:
*/
/* END */

View file

@ -4,8 +4,8 @@
/* */
/* Amiga-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 1996-2001, 2002, 2005 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@ -24,66 +24,58 @@
/*************************************************************************/
// Maintained by Detlef Würkner <TetiSoft@apg.lahn.de>
// TetiSoft: Modified to avoid fopen() fclose() fread() fseek() ftell()
// malloc() realloc() and free() which can't be used in an amiga
// shared run-time library linked with libinit.o
#include <exec/memory.h>
#ifdef __GNUC__
// Avoid warnings "struct X declared inside parameter list"
#include <exec/devices.h>
#include <exec/io.h>
#include <exec/semaphores.h>
#include <dos/exall.h>
#endif
// Necessary with OS3.9 includes
#define __USE_SYSBASE
/*************************************************************************/
/* */
/* Maintained by Detlef Würkner <TetiSoft@apg.lahn.de> */
/* */
/* Based on the original ftsystem.c, */
/* modified to avoid fopen(), fclose(), fread(), fseek(), ftell(), */
/* malloc(), realloc(), and free(). */
/* */
/* Those C library functions are often not thread-safe or cant be */
/* used in a shared Amiga library. If thats not a problem for you, */
/* you can of course use the default ftsystem.c with C library calls */
/* instead. */
/* */
/* This implementation needs exec V39+ because it uses AllocPooled() etc */
/* */
/*************************************************************************/
#define __NOLIBBASE__
#define __NOGLOBALIFACE__
#define __USE_INLINE__
#include <proto/exec.h>
#include <dos/stdio.h>
#include <proto/dos.h>
#ifndef __GNUC__
/* TetiSoft: Missing in alib_protos.h, see amiga.lib autodoc
* (These amiga.lib functions work under AmigaOS V33 and up)
*/
extern APTR __asm
AsmCreatePool( register __d0 ULONG memFlags,
register __d1 ULONG puddleSize,
register __d2 ULONG threshSize,
register __a6 struct ExecBase* SysBase );
extern VOID __asm
AsmDeletePool( register __a0 APTR poolHeader,
register __a6 struct ExecBase* SysBase );
extern APTR __asm
AsmAllocPooled( register __a0 APTR poolHeader,
register __d0 ULONG memSize,
register __a6 struct ExecBase* SysBase );
extern VOID __asm
AsmFreePooled( register __a0 APTR poolHeader,
register __a1 APTR memory,
register __d0 ULONG memSize,
register __a6 struct ExecBase* SysBase);
#ifdef __amigaos4__
extern struct ExecIFace *IExec;
extern struct DOSIFace *IDOS;
#else
extern struct Library *SysBase;
extern struct Library *DOSBase;
#endif
#define IOBUF_SIZE 512
// TetiSoft: C implementation of AllocVecPooled (see autodoc exec/AllocPooled)
/* structure that helps us to avoid
* useless calls of Seek() and Read()
*/
struct SysFile
{
BPTR file;
ULONG iobuf_start;
ULONG iobuf_end;
UBYTE iobuf[IOBUF_SIZE];
};
#ifndef __amigaos4__
/* C implementation of AllocVecPooled (see autodoc exec/AllocPooled) */
APTR
AllocVecPooled( APTR poolHeader,
ULONG memSize )
Alloc_VecPooled( APTR poolHeader,
ULONG memSize )
{
ULONG newSize = memSize + sizeof ( ULONG );
#ifdef __GNUC__
ULONG *mem = AllocPooled( poolHeader, newSize );
#else
ULONG *mem = AsmAllocPooled( poolHeader, newSize, SysBase );
#endif
if ( !mem )
return NULL;
@ -91,21 +83,16 @@ AllocVecPooled( APTR poolHeader,
return mem + 1;
}
// TetiSoft: C implementation of FreeVecPooled (see autodoc exec/AllocPooled)
/* C implementation of FreeVecPooled (see autodoc exec/AllocPooled) */
void
FreeVecPooled( APTR poolHeader,
APTR memory )
Free_VecPooled( APTR poolHeader,
APTR memory )
{
ULONG *realmem = (ULONG *)memory - 1;
#ifdef __GNUC__
FreePooled( poolHeader, realmem, *realmem );
#else
AsmFreePooled( poolHeader, realmem, *realmem, SysBase );
#endif
}
#endif
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
@ -154,10 +141,11 @@ FreeVecPooled( APTR poolHeader,
ft_alloc( FT_Memory memory,
long size )
{
// FT_UNUSED( memory );
// return malloc( size );
#ifdef __amigaos4__
return AllocVecPooled( memory->user, size );
#else
return Alloc_VecPooled( memory->user, size );
#endif
}
@ -187,19 +175,22 @@ FreeVecPooled( APTR poolHeader,
long new_size,
void* block )
{
// FT_UNUSED( memory );
// FT_UNUSED( cur_size );
// return realloc( block, new_size );
void* new_block;
#ifdef __amigaos4__
new_block = AllocVecPooled ( memory->user, new_size );
#else
new_block = Alloc_VecPooled ( memory->user, new_size );
#endif
if ( new_block != NULL )
{
CopyMem ( block, new_block,
( new_size > cur_size ) ? cur_size : new_size );
#ifdef __amigaos4__
FreeVecPooled ( memory->user, block );
#else
Free_VecPooled ( memory->user, block );
#endif
}
return new_block;
}
@ -214,19 +205,19 @@ FreeVecPooled( APTR poolHeader,
/* The memory release function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* memory :: A pointer to the memory object. */
/* */
/* block :: The address of block in memory to be freed. */
/* block :: The address of block in memory to be freed. */
/* */
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
void* block )
{
// FT_UNUSED( memory );
// free( block );
#ifdef __amigaos4__
FreeVecPooled( memory->user, block );
#else
Free_VecPooled( memory->user, block );
#endif
}
@ -248,14 +239,13 @@ FreeVecPooled( APTR poolHeader,
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
// #define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
#define STREAM_FILE( stream ) ( (BPTR)stream->descriptor.pointer ) // TetiSoft
#define STREAM_FILE( stream ) ( (struct SysFile *)stream->descriptor.pointer )
/*************************************************************************/
/* */
/* <Function> */
/* ft_close_stream */
/* ft_amiga_stream_close */
/* */
/* <Description> */
/* The function to close a stream. */
@ -264,10 +254,13 @@ FreeVecPooled( APTR poolHeader,
/* stream :: A pointer to the stream object. */
/* */
FT_CALLBACK_DEF( void )
ft_close_stream( FT_Stream stream )
ft_amiga_stream_close( FT_Stream stream )
{
// fclose( STREAM_FILE( stream ) );
Close( STREAM_FILE( stream ) ); // TetiSoft
struct SysFile* sysfile;
sysfile = STREAM_FILE( stream );
Close ( sysfile->file );
FreeMem ( sysfile, sizeof ( struct SysFile ));
stream->descriptor.pointer = NULL;
stream->size = 0;
@ -278,7 +271,7 @@ FreeVecPooled( APTR poolHeader,
/*************************************************************************/
/* */
/* <Function> */
/* ft_io_stream */
/* ft_amiga_stream_io */
/* */
/* <Description> */
/* The function to open a stream. */
@ -296,22 +289,89 @@ FreeVecPooled( APTR poolHeader,
/* The number of bytes actually read. */
/* */
FT_CALLBACK_DEF( unsigned long )
ft_io_stream( FT_Stream stream,
unsigned long offset,
unsigned char* buffer,
unsigned long count )
ft_amiga_stream_io( FT_Stream stream,
unsigned long offset,
unsigned char* buffer,
unsigned long count )
{
// FILE* file;
BPTR file; // TetiSoft
struct SysFile* sysfile;
unsigned long read_bytes;
if ( count != 0 )
{
sysfile = STREAM_FILE( stream );
file = STREAM_FILE( stream );
/* handle the seek */
if ( (offset < sysfile->iobuf_start) || (offset + count > sysfile->iobuf_end) )
{
/* requested offset implies we need a buffer refill */
if ( !sysfile->iobuf_end || offset != (sysfile->iobuf_end + 1) )
{
/* a physical seek is necessary */
Seek( sysfile->file, offset, OFFSET_BEGINNING );
}
sysfile->iobuf_start = offset;
sysfile->iobuf_end = 0; /* trigger a buffer refill */
}
// fseek( file, offset, SEEK_SET );
Seek( file, offset, OFFSET_BEGINNING ); // TetiSoft
/* handle the read */
if ( offset + count <= sysfile->iobuf_end )
{
/* we have buffer and requested bytes are all inside our buffer */
CopyMem( &sysfile->iobuf[offset - sysfile->iobuf_start], buffer, count );
read_bytes = count;
}
else
{
/* (re)fill buffer */
if ( count <= IOBUF_SIZE )
{
/* requested bytes is a subset of the buffer */
read_bytes = Read( sysfile->file, sysfile->iobuf, IOBUF_SIZE );
if ( read_bytes == -1UL )
{
/* error */
read_bytes = 0;
}
else
{
sysfile->iobuf_end = offset + read_bytes;
CopyMem( sysfile->iobuf, buffer, count );
if ( read_bytes > count )
{
read_bytes = count;
}
}
}
else
{
/* we actually need more than our buffer can hold, so we decide
** to do a single big read, and then copy the last IOBUF_SIZE
** bytes of that to our internal buffer for later use */
read_bytes = Read( sysfile->file, buffer, count );
if ( read_bytes == -1UL )
{
/* error */
read_bytes = 0;
}
else
{
ULONG bufsize;
// return (unsigned long)fread( buffer, 1, count, file );
return (unsigned long)FRead( file, buffer, 1, count);
bufsize = ( read_bytes > IOBUF_SIZE ) ? IOBUF_SIZE : read_bytes;
sysfile->iobuf_end = offset + read_bytes;
sysfile->iobuf_start = sysfile->iobuf_end - bufsize;
CopyMem( &buffer[read_bytes - bufsize] , sysfile->iobuf, bufsize );
}
}
}
}
else
{
read_bytes = 0;
}
return read_bytes;
}
@ -321,40 +381,50 @@ FreeVecPooled( APTR poolHeader,
FT_Stream_Open( FT_Stream stream,
const char* filepathname )
{
// FILE* file;
BPTR file; // TetiSoft
struct FileInfoBlock* fib; // TetiSoft
struct FileInfoBlock* fib;
struct SysFile* sysfile;
if ( !stream )
return FT_Err_Invalid_Stream_Handle;
// file = fopen( filepathname, "rb" );
file = Open( filepathname, MODE_OLDFILE ); // TetiSoft
if ( !file )
#ifdef __amigaos4__
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_SHARED );
#else
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_PUBLIC );
#endif
if ( !sysfile )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
sysfile->file = Open( (STRPTR)filepathname, MODE_OLDFILE );
if ( !sysfile->file )
{
FreeMem ( sysfile, sizeof ( struct SysFile ));
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
// fseek( file, 0, SEEK_END );
// astream->size = ftell( file );
// fseek( file, 0, SEEK_SET );
fib = AllocDosObject( DOS_FIB, NULL );
if ( !fib )
{
Close ( file );
Close ( sysfile->file );
FreeMem ( sysfile, sizeof ( struct SysFile ));
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
if ( !( ExamineFH( file, fib ) ) )
if ( !( ExamineFH( sysfile->file, fib ) ) )
{
FreeDosObject( DOS_FIB, fib );
Close ( file );
Close ( sysfile->file );
FreeMem ( sysfile, sizeof ( struct SysFile ));
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
@ -363,17 +433,17 @@ FreeVecPooled( APTR poolHeader,
stream->size = fib->fib_Size;
FreeDosObject( DOS_FIB, fib );
// stream->descriptor.pointer = file;
stream->descriptor.pointer = (void *)file;
stream->descriptor.pointer = (void *)sysfile;
stream->pathname.pointer = (char*)filepathname;
sysfile->iobuf_start = 0;
sysfile->iobuf_end = 0;
stream->pos = 0;
stream->read = ft_io_stream;
stream->close = ft_close_stream;
stream->read = ft_amiga_stream_io;
stream->close = ft_amiga_stream_close;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;
@ -387,7 +457,7 @@ FreeVecPooled( APTR poolHeader,
extern void
ft_mem_debug_done( FT_Memory memory );
#endif
@ -399,15 +469,17 @@ FreeVecPooled( APTR poolHeader,
FT_Memory memory;
// memory = (FT_Memory)malloc( sizeof ( *memory ) );
#ifdef __amigaos4__
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_SHARED );
#else
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_PUBLIC );
#endif
if ( memory )
{
// memory->user = 0;
#ifdef __GNUC__
memory->user = CreatePool( MEMF_PUBLIC, 2048, 2048 );
#ifdef __amigaos4__
memory->user = CreatePool( MEMF_SHARED, 16384, 16384 );
#else
memory->user = AsmCreatePool( MEMF_PUBLIC, 2048, 2048, SysBase );
memory->user = CreatePool( MEMF_PUBLIC, 16384, 16384 );
#endif
if ( memory->user == NULL )
{
@ -421,7 +493,7 @@ FreeVecPooled( APTR poolHeader,
memory->free = ft_free;
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_init( memory );
#endif
#endif
}
}
@ -436,15 +508,15 @@ FreeVecPooled( APTR poolHeader,
{
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_done( memory );
#endif
#endif
#ifdef __GNUC__
DeletePool( memory->user );
#else
AsmDeletePool( memory->user, SysBase );
#endif
FreeVec( memory );
}
/*
Local Variables:
coding: latin-1
End:
*/
/* END */

View file

@ -1,16 +1,32 @@
#ifndef ATARI_H
#define ATARI_H
#pragma warn -stu
/* PureC doesn't like 32bit enumerations */
#ifndef FT_IMAGE_TAG
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
#endif /* FT_IMAGE_TAG */
#ifndef FT_ENC_TAG
#define FT_ENC_TAG( value, a, b, c, d ) value
#endif /* FT_ENC_TAG */
#endif /* ATARI_H */

View file

@ -1,37 +1,74 @@
/* the following changes file names for PureC projects */
if (argc > 0)
{
ordner = argv[0];
if (basename(ordner) == "") /* ist Ordner */
{
ChangeFilenames(ordner);
}
}
proc ChangeFilenames(folder)
local i,entries,directory,file;
{
entries = filelist(directory,folder);
for (i = 0; i < entries; ++i)
{
file = directory[i,0];
if ((directory[i,3]&16) > 0) /* subdirectory */
{
ChangeFilenames(folder+file+"\\");
}
else
{
if ((stricmp(suffix(file),".h")==0)|(stricmp(suffix(file),".c")==0))
ChangeFilename(folder,file);
}
}
}
proc ChangeFilename(path,datei)
local newfile,err;
{
newfile=datei;
newfile[0]=(newfile[0] | 32) ^ 32;
err=files.rename("-q",path+datei,newfile);
}

View file

@ -1,33 +1,66 @@
;FreeType project file
FREETYPE.LIB
.C [-K -P -R -A]
.L [-J -V]
.S
=
..\..\src\base\ftsystem.c
..\..\src\base\ftdebug.c
..\..\src\base\ftinit.c
..\..\src\base\ftglyph.c
..\..\src\base\ftmm
..\..\src\base\ftbbox
..\..\src\base\ftbase.c
..\..\src\autohint\autohint.c
;..\..\src\cache\ftcache.c
..\..\src\cff\cff.c
..\..\src\cid\type1cid.c
..\..\src\psaux\psaux.c
..\..\src\pshinter\pshinter.c
..\..\src\psnames\psnames.c
..\..\src\raster\raster.c
..\..\src\sfnt\sfnt.c
..\..\src\smooth\smooth.c
..\..\src\truetype\truetype.c
..\..\src\type1\type1.c
..\..\src\type42\type42.c

View file

@ -1,51 +1,102 @@
Compiling FreeType 2 with PureC compiler
========================================
[See below for a German version.]
To compile FreeType 2 as a library the following changes must be applied:
- All *.c files must start with an uppercase letter.
(In case GEMSCRIPT is available:
Simply drag the whole FreeType 2 directory to the file `FNames.SIC'.)
- You have to change the INCLUDE directory in PureC's compiler options
to contain both the `INCLUDE' and `freetype2\include' directory.
Example:
INCLUDE;E:\freetype2\include
- The file `freetype2/include/Ft2build.h' must be patched as follows to
include ATARI.H:
#ifndef __FT2_BUILD_GENERIC_H__
#define __FT2_BUILD_GENERIC_H__
#include "ATARI.H"
Compilieren von FreeType 2 mit PureC
====================================
Um FreeType 2 als eine Bibliothek (library) zu compilieren, muss folgendes
ge„ndert werden:
- Alle *.c-files m<>ssen mit einem GROSSBUCHSTABEN beginnen.
(Falls GEMSCRIPT zur Verf<72>gung steht:
Den kompletten Ordner freetype2 auf die Datei `FNames.SIC' draggen.)
- In den Compiler-Optionen von PureC muss das INCLUDE directory auf INCLUDE
und freetype2\include verweisen. Z.B.:
INCLUDE;E:\freetype2\include
- In der Datei freetype2/include/Ft2build.h muss zu Beginn
ein #include "ATARI.H" wie folgt eingef<65>gt werden:
#ifndef __FT2_BUILD_GENERIC_H__
#define __FT2_BUILD_GENERIC_H__
#include "ATARI.H"
--- end of README.TXT ---

View file

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2004, 2005 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -63,8 +63,11 @@ T := -o$(space)
# ANSI compliance.
#
ifndef CFLAGS
ifeq ($(findstring g++,$(CC)),)
nested_externs := -Wnested-externs
endif
CFLAGS := -c -g -O0 \
-fno-strict-aliasing \
-Wall \
-W \
-Wundef \
@ -73,8 +76,8 @@ ifndef CFLAGS
-Wwrite-strings \
-Wstrict-prototypes \
-Wredundant-decls \
-Wnested-externs \
-Wno-long-long
-Wno-long-long \
$(nested_externs)
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.

View file

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2005 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -62,7 +62,7 @@ T := -o$(space)
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall -fno-strict-aliasing
CFLAGS := -c -g -O6 -Wall
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.

View file

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -43,6 +43,21 @@ ifeq ($(PLATFORM),ansi)
ifeq ($(is_dos),)
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
endif
# We also try to recognize Dos 7.x without Windows 9X launched.
# See builds/win32/detect.mk for explanations about the logic.
#
ifeq ($(is_dos),)
ifdef winbootdir
#ifneq ($(OS),Windows_NT)
# If win32 is available, do not trigger this test.
ifndef windir
is_dos := $(findstring Windows,$(strip $(shell ver)))
endif
#endif
endif
endif
endif # test COMSPEC
ifneq ($(is_dos),)
@ -107,7 +122,17 @@ ifeq ($(PLATFORM),dos)
else
SEP := $(BACKSLASH)
DELETE := del
COPY := copy
# Setting COPY is a bit trickier. We can be running DJGPP on some
# Windows NT derivatives, like XP. See builds/win32/detect.mk for
# explanations why we need hacking here.
#
ifeq ($(OS),Windows_NT)
COPY := cmd.exe /c copy
else
COPY := copy
endif # test NT
setup: dos_setup
endif

View file

@ -3,6 +3,9 @@
#
# Copyright 2003 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you

View file

@ -254,7 +254,7 @@ library: $(PROJECT_LIBRARY)
refdoc:
python $(SRC_DIR)/tools/docmaker/docmaker.py \
--prefix=ft2 \
--title=FreeType-2.1.9 \
--title=FreeType-2.1.10 \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2004-03-12'
timestamp='2005-05-12'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -21,14 +21,15 @@ timestamp='2004-03-12'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@ -70,7 +71,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -83,11 +84,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit 0 ;;
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit 0 ;;
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@ -99,7 +100,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
exit 0;;
exit ;;
* )
break ;;
@ -145,7 +146,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis)
-apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@ -231,13 +232,14 @@ case $basic_machine in
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | mcore \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -262,12 +264,13 @@ case $basic_machine in
| pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@ -298,9 +301,9 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
@ -310,7 +313,7 @@ case $basic_machine in
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -326,8 +329,9 @@ case $basic_machine in
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@ -335,15 +339,16 @@ case $basic_machine in
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
@ -445,6 +450,10 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
@ -452,6 +461,9 @@ case $basic_machine in
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
@ -481,6 +493,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@ -659,10 +675,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@ -743,10 +755,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -1029,6 +1037,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@ -1059,6 +1071,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@ -1167,7 +1182,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1294,6 +1309,9 @@ case $os in
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-none)
;;
*)
@ -1374,6 +1392,9 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
@ -1539,7 +1560,7 @@ case $basic_machine in
esac
echo $basic_machine$os
exit 0
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,15 @@
# This file is part of the FreeType project.
#
# Process this file with autoconf to produce a configure script.
#
# Copyright 2001, 2002, 2003, 2004, 2005 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
AC_INIT
AC_CONFIG_SRCDIR([ftconfig.in])
@ -8,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update docs/VERSION.DLL!
version_info='9:7:3'
version_info='9:8:3'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])

View file

@ -1,4 +1,13 @@
#! /bin/sh
#
# Copyright 2000, 2001, 2002, 2003, 2004, 2005 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
prefix=@prefix@
exec_prefix=@exec_prefix@
@ -23,6 +32,7 @@ Options:
the FreeType library
--exec-prefix=EPREFIX override \`--exec-prefix' value with EPREFIX
--version display libtool version of the FreeType library
--ftversion display FreeType version number
--libs display flags for linking with the FreeType library
--libtool display library name for linking with libtool
--cflags display flags for compiling with the FreeType
@ -65,6 +75,19 @@ while test $# -gt 0 ; do
echo @ft_version@
exit 0
;;
--ftversion)
major=`grep define @prefix@/include/freetype2/freetype/freetype.h \
| grep FREETYPE_MAJOR \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
minor=`grep define @prefix@/include/freetype2/freetype/freetype.h \
| grep FREETYPE_MINOR \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
patch=`grep define @prefix@/include/freetype2/freetype/freetype.h \
| grep FREETYPE_PATCH \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
echo $major.$minor.$patch
exit 0
;;
--cflags)
echo_cflags=yes
;;
@ -119,7 +142,7 @@ if test "$echo_libs" = "yes" ; then
eval "rpath=\"$hardcode_libdir_flag_spec\""
fi
libs="-lfreetype @LIBZ@"
if test "$libdir" != "/usr/lib" ; then
if test "$libdir" != "/usr/lib" && test "$libdir" != "/usr/lib64"; then
echo -L$libdir $rpath $libs
else
echo $libs

View file

@ -1,6 +1,15 @@
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
#
# Copyright 2001, 2003 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
#
# serial 2
# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])

View file

@ -1,4 +1,13 @@
## FreeType specific autoconf tests
#
# Copyright 2002, 2003, 2004 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 license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# serial 2

View file

@ -285,7 +285,7 @@
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
stream->base = ft_alloc( NULL, stream->size );
stream->base = (unsigned char*)ft_alloc( NULL, stream->size );
if ( !stream->base )
{
@ -315,7 +315,7 @@
total_read_count += read_count;
} while ( total_read_count != stream->size );
} while ( (unsigned long)total_read_count != stream->size );
stream->close = ft_close_stream_by_free;
}

View file

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2004-02-15.20
scriptversion=2005-02-02.21
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -58,9 +58,6 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=
transform_arg=
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
@ -70,23 +67,27 @@ mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 -d DIRECTORIES...
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
In the second, create the directory path DIR.
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-b=TRANSFORMBASENAME
-c copy source (using $cpprog) instead of moving (using $mvprog).
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrp installed files to GROUP.
-m MODE $chmod installed files to MODE.
-o USER $chown installed files to USER.
-s strip installed files (using $stripprog).
-t=TRANSFORM
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
@ -96,12 +97,7 @@ Environment variables override the default commands:
while test -n "$1"; do
case $1 in
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
-c) instcmd=$cpprog
shift
-c) shift
continue;;
-d) dir_arg=true
@ -113,7 +109,7 @@ while test -n "$1"; do
shift
continue;;
--help) echo "$usage"; exit 0;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
@ -129,14 +125,20 @@ while test -n "$1"; do
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
--version) echo "$0 $scriptversion"; exit 0;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
test -n "$dir_arg" && break
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
@ -174,13 +176,13 @@ do
src=
if test -d "$dst"; then
instcmd=:
mkdircmd=:
chmodcmd=
else
instcmd=$mkdirprog
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
@ -202,12 +204,16 @@ do
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
@ -220,7 +226,8 @@ do
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
@ -229,83 +236,83 @@ do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp" || lasterr=$?
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $instcmd "$dst" \
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
# If we're going to rename the final executable, determine the name now.
if test -z "$transformarg"; then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename \
| sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename.
test -z "$dstfile" && dstfile=`basename "$dst"`
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now remove or move aside any old file at destination location. We
# try this two ways since rm can't unlink itself on some systems and
# the destination file might be busy for other reasons. In this case,
# the final cleanup might fail but the new file should still install
# successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi || { (exit 1); exit; }
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
(exit 0); exit 0
}
# Local variables:

View file

@ -51,7 +51,7 @@ install: $(PROJECT_LIBRARY)
done
$(INSTALL_DATA) $(BUILD_DIR)/ft2unix.h \
$(DESTDIR)$(includedir)/ft2build.h
$(INSTALL_DATA) $(BUILD_DIR)/ftconfig.h \
$(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
$(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
$(DESTDIR)$(bindir)/freetype-config

View file

@ -1,7 +1,7 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -43,9 +43,14 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.6
TIMESTAMP=" (1.1220.2.94 2004/04/10 16:27:27)"
VERSION=1.5.18
TIMESTAMP=" (1.1220.2.245 2005/05/16 08:55:27)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@ -107,8 +112,9 @@ if test "${LANG+set}" = set; then
fi
# Make sure IFS has a sensible default
: ${IFS="
"}
lt_nl='
'
IFS=" $lt_nl"
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2
@ -127,6 +133,7 @@ show_help=
execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
quote_scanset='[[~#^*{};<>?'"'"' ]'
#####################################
# Shell function definitions:
@ -138,7 +145,8 @@ o2lo="s/\\.${objext}\$/.lo/"
# Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
func_win32_libid () {
func_win32_libid ()
{
win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
@ -178,12 +186,13 @@ func_win32_libid () {
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
# arg is usually of the form 'gcc ...'
func_infer_tag () {
func_infer_tag ()
{
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -204,7 +213,7 @@ func_infer_tag () {
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -235,6 +244,108 @@ func_infer_tag () {
esac
fi
}
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
f_ex_an_ar_dir="$1"; shift
f_ex_an_ar_oldlib="$1"
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
exit $EXIT_FAILURE
fi
}
# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
my_gentop="$1"; shift
my_oldlibs=${1+"$@"}
my_oldobjs=""
my_xlib=""
my_xabs=""
my_xdir=""
my_status=""
$show "${rm}r $my_gentop"
$run ${rm}r "$my_gentop"
$show "$mkdir $my_gentop"
$run $mkdir "$my_gentop"
my_status=$?
if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
exit $my_status
fi
for my_xlib in $my_oldlibs; do
# Extract the objects.
case $my_xlib in
[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
my_xdir="$my_gentop/$my_xlib"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$my_xdir"; then
exit $status
fi
case $host in
*-darwin*)
$show "Extracting $my_xabs"
# Do not bother doing anything if just a dry run
if test -z "$run"; then
darwin_orig_dir=`pwd`
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
if test -n "$darwin_arches"; then
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
darwin_arch=
$show "$darwin_base_archive has multiple architectures $darwin_arches"
for darwin_arch in $darwin_arches ; do
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
func_extract_an_archive "`pwd`" "${darwin_base_archive}"
cd "$darwin_curdir"
$rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
done # $darwin_arches
## Okay now we have a bunch of thin objects, gotta fatten them up :)
darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
darwin_file=
darwin_files=
for darwin_file in $darwin_filelist; do
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
lipo -create -output "$darwin_file" $darwin_files
done # $darwin_filelist
${rm}r unfat-$$
cd "$darwin_orig_dir"
else
cd "$darwin_orig_dir"
func_extract_an_archive "$my_xdir" "$my_xabs"
fi # $darwin_arches
fi # $run
;;
*)
func_extract_an_archive "$my_xdir" "$my_xabs"
;;
esac
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives_result="$my_oldobjs"
}
# End of Shell function definitions
#####################################
@ -305,10 +416,10 @@ do
--version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
$echo
$echo "Copyright (C) 2003 Free Software Foundation, Inc."
$echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $EXIT_SUCCESS
exit $?
;;
--config)
@ -317,7 +428,7 @@ do
for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done
exit $EXIT_SUCCESS
exit $?
;;
--debug)
@ -342,7 +453,7 @@ do
else
$echo "disable static libraries"
fi
exit $EXIT_SUCCESS
exit $?
;;
--finish) mode="finish" ;;
@ -399,7 +510,7 @@ if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
$echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
$echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
case $nonopt in
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link
@ -516,7 +627,7 @@ if test -z "$show_help"; then
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -547,8 +658,11 @@ if test -z "$show_help"; then
case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
# in scan sets, and some SunOS ksh mistreat backslash-escaping
# in scan sets (worked around with variable expansion),
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
# at all, so we specify them separately.
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
lastarg="\"$lastarg\""
;;
esac
@ -621,6 +735,15 @@ if test -z "$show_help"; then
esac
done
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qlibobj="\"$qlibobj\"" ;;
esac
if test "X$libobj" != "X$qlibobj"; then
$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
exit $EXIT_FAILURE
fi
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@ -693,12 +816,17 @@ compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
$echo $srcfile > "$lockfile"
$echo "$srcfile" > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qsrcfile="\"$qsrcfile\"" ;;
esac
$run $rm "$libobj" "${libobj}T"
@ -720,10 +848,10 @@ EOF
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
command="$base_compile $srcfile $pic_flag"
command="$base_compile $qsrcfile $pic_flag"
else
# Don't build PIC code
command="$base_compile $srcfile"
command="$base_compile $qsrcfile"
fi
if test ! -d "${xdir}$objdir"; then
@ -803,9 +931,9 @@ EOF
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
command="$base_compile $srcfile"
command="$base_compile $qsrcfile"
else
command="$base_compile $srcfile $pic_flag"
command="$base_compile $qsrcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
@ -983,7 +1111,7 @@ EOF
arg="$1"
shift
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;;
*) qarg=$arg ;;
@ -1227,6 +1355,13 @@ EOF
prev=
continue
;;
darwin_framework)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
continue
;;
*)
eval "$prev=\"\$arg\""
prev=
@ -1285,6 +1420,14 @@ EOF
continue
;;
-framework)
prev=darwin_framework
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
-inst-prefix-dir)
prev=inst_prefix
continue
@ -1345,7 +1488,7 @@ EOF
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
*-*-openbsd* | *-*-freebsd*)
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
@ -1356,7 +1499,7 @@ EOF
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
*-*-openbsd* | *-*-freebsd*)
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@ -1366,8 +1509,20 @@ EOF
continue
;;
# Tru64 UNIX uses -model [arg] to determine the layout of C++
# classes, name mangling, and exception handling.
-model)
compile_command="$compile_command $arg"
compiler_flags="$compiler_flags $arg"
finalize_command="$finalize_command $arg"
prev=xcompiler
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
deplibs="$deplibs $arg"
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
@ -1376,18 +1531,19 @@ EOF
continue
;;
# gcc -m* arguments should be passed to the linker via $compiler_flags
# in order to pass architecture information to the linker
# (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
# but this is not reliable with gcc because gcc may use -mfoo to
# select a different linker, different libraries, etc, while
# -Wl,-mfoo simply passes -mfoo to the linker.
-m*)
# -64, -mips[0-9] enable 64-bit mode on the SGI compiler
# -r[0-9][0-9]* specifies the processor on the SGI compiler
# -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -1503,7 +1659,7 @@ EOF
for flag in $args; do
IFS="$save_ifs"
case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
flag="\"$flag\""
;;
esac
@ -1521,7 +1677,7 @@ EOF
for flag in $args; do
IFS="$save_ifs"
case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
flag="\"$flag\""
;;
esac
@ -1554,7 +1710,7 @@ EOF
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -1688,7 +1844,7 @@ EOF
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -1855,7 +2011,7 @@ EOF
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
compiler_flags="$compiler_flags $deplib"
fi
continue
;;
@ -1864,10 +2020,6 @@ EOF
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
for search_ext in .la $std_shrext .so .a; do
@ -1978,7 +2130,22 @@ EOF
fi
case $linkmode in
lib)
if test "$deplibs_check_method" != pass_all; then
valid_a_lib=no
case $deplibs_check_method in
match_pattern*)
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
if eval $echo \"$deplib\" 2>/dev/null \
| $SED 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
valid_a_lib=yes
fi
;;
pass_all)
valid_a_lib=yes
;;
esac
if test "$valid_a_lib" != yes; then
$echo
$echo "*** Warning: Trying to link with static lib archive $deplib."
$echo "*** I have the capability to make that library automatically link in when"
@ -2052,6 +2219,8 @@ EOF
# it will not redefine variables installed, or shouldnotlink
installed=yes
shouldnotlink=no
avoidtemprpath=
# Read the .la file
case $lib in
@ -2150,11 +2319,19 @@ EOF
dir="$libdir"
absdir="$libdir"
fi
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
dir="$ladir"
absdir="$abs_ladir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
else
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
fi
fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
@ -2227,7 +2404,7 @@ EOF
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var"; then
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
@ -2671,12 +2848,12 @@ EOF
*) continue ;;
esac
case " $deplibs " in
*" $depdepl "*) ;;
*) deplibs="$depdepl $deplibs" ;;
*" $path "*) ;;
*) deplibs="$path $deplibs" ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$deplibs $path" ;;
*" $depdepl "*) ;;
*) deplibs="$depdepl $deplibs" ;;
esac
done
fi # link_all_deplibs != no
@ -2941,27 +3118,27 @@ EOF
# Check that each of the things are valid numbers.
case $current in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $revision in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $age in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
@ -2987,7 +3164,7 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
;;
freebsd-aout)
@ -3193,7 +3370,7 @@ EOF
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
*-*-openbsd* | *-*-freebsd*)
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
@ -3675,67 +3852,13 @@ EOF
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
for xlib in $convenience; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives $gentop $convenience
libobjs="$libobjs $func_extract_archives_result"
fi
fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag"
@ -3784,6 +3907,7 @@ EOF
save_libobjs=$libobjs
fi
save_output=$output
output_la=`$echo "X$output" | $Xsed -e "$basename"`
# Clear the reloadable object creation command queue and
# initialize k to one.
@ -3793,7 +3917,7 @@ EOF
delfiles=
last_robj=
k=1
output=$output_objdir/$save_output-${k}.$objext
output=$output_objdir/$output_la-${k}.$objext
# Loop over the list of objects to be linked.
for obj in $save_libobjs
do
@ -3813,9 +3937,9 @@ EOF
# the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi
last_robj=$output_objdir/$save_output-${k}.$objext
last_robj=$output_objdir/$output_la-${k}.$objext
k=`expr $k + 1`
output=$output_objdir/$save_output-${k}.$objext
output=$output_objdir/$output_la-${k}.$objext
objlist=$obj
len=1
fi
@ -3835,13 +3959,13 @@ EOF
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi
# Set up a command to remove the reloadale object files
# Set up a command to remove the reloadable object files
# after they are used.
i=0
while test "$i" -lt "$k"
do
i=`expr $i + 1`
delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
done
$echo "creating a temporary reloadable object file: $output"
@ -3973,64 +4097,10 @@ EOF
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
for xlib in $convenience; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives $gentop $convenience
reload_conv_objs="$reload_objs $func_extract_archives_result"
fi
fi
@ -4292,12 +4362,12 @@ extern \"C\" {
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
export_symbols="$output_objdir/$output.exp"
export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
else
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
$run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
fi
fi
@ -4349,7 +4419,26 @@ extern \"C\" {
#endif
/* The mapping between symbol names and symbols. */
"
case $host in
*cygwin* | *mingw* )
$echo >> "$output_objdir/$dlsyms" "\
/* DATA imports from DLLs on WIN32 can't be const, because
runtime relocations are performed -- see ld's documentation
on pseudo-relocs */
struct {
"
;;
* )
$echo >> "$output_objdir/$dlsyms" "\
const struct {
"
;;
esac
$echo >> "$output_objdir/$dlsyms" "\
const char *name;
lt_ptr address;
}
@ -4578,7 +4667,7 @@ static const void *lt_preloaded_setup() {
esac
case $host in
*cygwin* | *mingw* )
cwrappersource=`$echo ${objdir}/lt-${output}.c`
cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
cwrapper=`$echo ${output}.exe`
$rm $cwrappersource $cwrapper
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
@ -4811,7 +4900,7 @@ sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=\"$relink_command\"
@ -4988,71 +5077,73 @@ fi\
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
# Add in members from convenience archives.
for xlib in $addlibs; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives $gentop $addlibs
oldobjs="$oldobjs $func_extract_archives_result"
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds
else
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
# might have to extract them afterwards, e.g., when creating a
# static archive out of a convenience library, or when linking
# the entirety of a libtool archive into another (currently
# not supported by libtool).
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
if test -z "$gentop"; then
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
fi
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
$run ln "$obj" "$gentop/$newobj" ||
$run cp "$obj" "$gentop/$newobj"
oldobjs="$oldobjs $gentop/$newobj"
;;
*) oldobjs="$oldobjs $obj" ;;
esac
done
fi
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
@ -5066,20 +5157,7 @@ fi\
objlist=
concat_cmds=
save_oldobjs=$oldobjs
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
# encoded into archives. This makes 'ar r' malfunction in
# this piecewise linking case whenever conflicting object
# names appear in distinct ar calls; check, warn and compensate.
if (for obj in $save_oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
AR_FLAGS=cq
fi
# Is there a better way of finding the last object in the list?
for obj in $save_oldobjs
do
@ -5291,7 +5369,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -5307,7 +5385,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -5355,7 +5433,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\""
;;
esac
@ -6394,7 +6472,7 @@ esac
$echo
$echo "Try \`$modename --help' for more information about other modes."
exit $EXIT_SUCCESS
exit $?
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting

View file

@ -1,7 +1,7 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
scriptversion=2005-02-02.21
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
@ -27,7 +27,7 @@ while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
exit $?
;;
-m) # -m PERM arg
shift
@ -37,7 +37,7 @@ while test $# -gt 0 ; do
;;
--version)
echo "$0 $scriptversion"
exit 0
exit $?
;;
--) # stop option processing
shift

View file

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -19,37 +19,72 @@
ifeq ($(PLATFORM),ansi)
# Detecting Windows NT is easy, as the OS variable must be defined and
# contains `Windows_NT'. Untested with Windows 2K, but I guess it should
# work...
# contains `Windows_NT'. This also works with Windows 2000 and XP.
#
ifeq ($(OS),Windows_NT)
is_windows := 1
# We test for the COMSPEC environment variable, then run the `ver'
# command-line program to see if its output contains the word `Windows'.
#
# If this is true, we are running a win32 platform (or an emulation).
#
else
ifdef COMSPEC
is_windows := $(findstring Windows,$(strip $(shell ver)))
endif
endif # test NT
ifdef is_windows
PLATFORM := win32
endif
else
# Detecting Windows 9X
# We used to run the `ver' command to see if its output contains the
# word `Windows'. If this is true, we are running Windows 95 or later:
#
# ifdef COMSPEC
# # First, check if we have the COMSPEC environment variable, which
# # indicates we can use COMMAND.COM's internal commands
# is_windows := $(findstring Windows,$(strip $(shell ver)))
# endif
#
# Unfortunately, this also detects the case when one is running
# DOS 7.x (the MS-DOS version that lies below Windows) without actually
# launching the GUI.
#
# A better test is to check whether there are both the environment
# variables `winbootdir' and `windir'. The first indicates an
# underlying DOS 7.x, while the second is set only if win32 is available.
#
# Note that on Windows NT, such an environment variable will not be seen
# from DOS-based tools like DJGPP's make; this is not actually a problem
# since NT is detected independantly above. But do not try to be clever!
#
ifdef winbootdir
ifdef windir
PLATFORM := win32
endif
endif
endif # test NT
endif # test PLATFORM ansi
ifeq ($(PLATFORM),win32)
DELETE := del
COPY := copy
SEP := $(BACKSLASH)
# Setting COPY is a bit trickier. Plain COPY on NT will not work
# correctly, because it will uppercase 8.3 filenames, creating a
# `CONFIG.MK' file which isn't found later on by `make'.
# Since we do not want that, we need to force execution of CMD.EXE.
# Unfortunately, CMD.EXE is not available on Windows 9X.
# So we need to hack.
#
# Kudos to Eli Zaretskii (DJGPP guru) that helped debug it.
# Details are available in threads of the freetype mailing list
# (2004-11-11), and then in the devel mailing list (2004-11-20 to -23).
#
ifeq ($(OS),Windows_NT)
COPY := cmd.exe /c copy
else
COPY := copy
endif # test NT
# gcc Makefile by default
CONFIG_FILE := w32-gcc.mk
ifeq ($(firstword $(CC)),cc)

View file

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype219.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype2110.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype219_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype2110_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype219MT_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype2110MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype219MT.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype2110MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@ -152,7 +152,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype219ST.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype2110ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@ -178,7 +178,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype219ST_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype2110ST_D.lib"
!ENDIF

File diff suppressed because it is too large Load diff

View file

@ -10,20 +10,20 @@
FreeType&nbsp;2 Project Files for Visual&nbsp;C++ and VS.NET&nbsp;2003
</h1>
<p>This directory contains a project files for Visual C++, named
<p>This directory contains project files for Visual C++, named
<tt>freetype.dsp</tt>, and Visual Studio, called <tt>freetype.sln</tt>. It
will compile the following libraries from the FreeType 2.1.9 sources:</p>
will compile the following libraries from the FreeType 2.1.10 sources:</p>
<ul>
<pre>
freetype219.lib - release build; single threaded
freetype219_D.lib - debug build; single threaded
freetype219MT.lib - release build; multi-threaded
freetype219MT_D.lib - debug build; multi-threaded</pre>
freetype2110.lib - release build; single threaded
freetype2110_D.lib - debug build; single threaded
freetype2110MT.lib - release build; multi-threaded
freetype2110MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
archives are already stored this way, so no further step is required. If
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
archives are already stored this way, so no further action is required. If
you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
tool to convert the line endings. For example, with <a
href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR

View file

@ -1,12 +1,19 @@
#!/bin/sh
#
# Call the 'configure' script located in 'builds/unix'.
# Copyright 2002, 2003, 2004, 2005 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This should re-generate the following files:
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
#
# config.mk
# install
#
# Call the `configure' script located in `builds/unix'.
#
rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk
if test "x$GNUMAKE" = x; then
GNUMAKE=make
@ -51,12 +58,19 @@ abs_ft2_dir=`cd "$ft2_dir" && pwd`
if test "$abs_curr_dir" != "$abs_ft2_dir"; then
mkdir reference
echo "TOP_DIR=$abs_ft2_dir" > Makefile
echo "OBJ_DIR=$abs_curr_dir" >> Makefile
echo "OBJ_BUILD=$abs_curr_dir" >> Makefile
echo "DOC_DIR=$abs_curr_dir/reference" >> Makefile
echo "LIBTOOL=$abs_curr_dir/libtool" >> Makefile
echo "include $abs_ft2_dir/Makefile" >> Makefile
echo "TOP_DIR := $abs_ft2_dir" > Makefile
echo "OBJ_DIR := $abs_curr_dir" >> Makefile
echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile
echo "DOC_DIR := \$(OBJ_DIR)/reference" >> Makefile
echo "LIBTOOL := \$(OBJ_DIR)/libtool" >> Makefile
echo "ifndef FT2DEMOS" >> Makefile
echo " include \$(TOP_DIR)/Makefile" >> Makefile
echo "else" >> Makefile
echo " TOP_DIR_2 := \$(TOP_DIR)/../ft2demos" >> Makefile
echo " PROJECT := freetype" >> Makefile
echo " CONFIG_MK := \$(OBJ_DIR)/config.mk" >> Makefile
echo " include \$(TOP_DIR_2)/Makefile" >> Makefile
echo "endif" >> Makefile
fi
# call make

View file

@ -1,10 +1,10 @@
/***************************************************************************/
/* */
/* ftoption.h */
/* ftoption.h (for development) */
/* */
/* User-selectable configuration macros (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -446,9 +446,9 @@ FT_BEGIN_HEADER
/* work-around hinting system. Note that for the moment, the algorithm */
/* is only used when selected at runtime through the parameter tag */
/* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived */
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated. */
/* */
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
/*************************************************************************/
@ -550,23 +550,12 @@ FT_BEGIN_HEADER
/* */
/*
* The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
* improvements to the auto-hinter contributed by David Chester. They will
* most likely disappear completely in the next release. For now, you
* should always keep them defined.
* This temporary macro is used to control various optimizations for
* reducing the heap footprint of memory-mapped TrueType files.
*
*/
#define FT_CONFIG_OPTION_CHESTER_HINTS
/* #define FT_OPTIMIZE_MEMORY */
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
#define FT_CONFIG_CHESTER_SMALL_F
#define FT_CONFIG_CHESTER_ASCENDER
#define FT_CONFIG_CHESTER_SERIF
#define FT_CONFIG_CHESTER_STEM
#define FT_CONFIG_CHESTER_BLUE_SCALE
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
FT_END_HEADER

View file

@ -1,3 +1,122 @@
LATEST CHANGES BETWEEN 2.1.10 and 2.1.9
I. IMPORTANT BUG FIXES
- The size comparison for BDF and PCF files could fail sometimes.
- Some CFF files were still not loaded correctly. Patch from
Derek Noonburg.
- The stroker still had some serious bugs.
- Boris Letocha fixed a bug in the TrueType interpreter: The
NPUSHW instruction wasn't skipped correctly in IF clauses. Some
fonts like `Helvetica 75 Bold' failed.
- Another serious bug in handling TrueType hints caused many
distortions. It has been introduced in version 2.1.8, and it is
highly recommended to upgrade.
- FreeType didn't properly parse empty Type 1 glyphs.
- An unbound dynamic buffer growth was fixed in the PFR loader.
- Several bugs have been fixed in the cache sub-system.
- FreeType behaved incorrectly when resizing two distinct but very
close character pixel sizes through `FT_Set_Char_Size' (Savannah
bug #12263).
- The auto-hinter didn't work properly for fonts without a Unicode
charmap -- it even refused to load the glyphs.
II. IMPORTANT CHANGES
- Many fixes have been applied to drastically reduce the amount of
heap memory used by FreeType, especially when using
memory-mapped font files (which is the default on Unix systems
which support them).
- The auto-hinter has been replaced with a new module, called the
`auto-fitter'. It consumes less memory than its predecessor,
and it is prepared to support non-latin scripts better in next
releases.
- George Williams contributed code to read kerning data from PFM
files.
- FreeType now uses the TT_NAME_ID_PREFERRED_FAMILY and
TT_NAME_ID_PREFERRED_SUBFAMILY strings (if available) for
setting family and style in SFNT fonts (patch from Kornfeld
Eliyahu Peter).
- A new API `FT_Sfnt_Table_Info' (in FT_TRUETYPE_TABLES_H) has
been added to retrieve name and size information of SFNT tables.
- A new API `FT_OpenType_Validate' (in FT_OPENTYPE_VALIDATE_H) has
been added to validate OpenType tables (BASE, GDEF, GPOS, GSUB,
JSTF). After validation it is no longer necessary to check
for errors in those tables while accessing them.
Note that this module might be moved to another library in the
future to avoid a tight dependency between FreeType and the
OpenType specification.
- A new API in FT_BITMAP_H (`FT_Bitmap_New', `FT_Bitmap_Convert',
`FT_Bitmap_Copy', `FT_Bitmap_Embolden', `FT_Bitmap_Done') has
been added. Its use is to convert an FT_Bitmap structure in
1bpp, 2bpp, 4bpp, or 8bpp format into another 8bpp FT_Bitmap,
probably using a different pitch, and to further manipulate it.
- A new API `FT_Outline_Embolden' (in FT_OUTLINE_H) gives finer
control how outlines are embolded.
- `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H) now handles bitmaps
also (code contributed by Chia I Wu). Note that this function
is still experimental and may be replaced with a better API.
- The method how BDF and PCF bitmap fonts are accessed has been
refined. Formerly, FT_Set_Pixel_Sizes and FT_Set_Char_Size
were synonyms in FreeType's BDF and PCF interface. This has
changed now. FT_Set_Pixel_Sizes should be used to select the
actual font dimensions (the `strike', which is the sum of the
`FONT_ASCENT' and `FONT_DESCENT' properties), while
FT_Set_Char_Size selects the `nominal' size (the `PIXELSIZE'
property). In both functions, the width parameter is ignored.
III. MISCELLANEOUS
- The BDF driver no longer converts all returned bitmaps with a
depth of 2bpp or 4bpp to a depth of 8bpp. The documentation has
not mentioned this explicitly, but implementors might have
relied on this after looking into the source files.
- A new option `--ftversion' has been added to freetype-config to
return the FreeType version.
- The memory debugger has been updated to dump allocation
statistics on all allocation sources in the library. This is
useful to spot greedy allocations when loading and processing
fonts.
- We removed a huge array of constant pointers to constant strings
in the `psnames' module. The problem was that compilations in
PIC mode (i.e., when generating a Unix shared object/dll) put
the array into the non-shared writable section of the library
since absolute pointers are not relocatable by nature.
This reduces the memory consumption by approximately 16KByte per
process linked to FreeType. We now also store the array in a
compressed form (as a trie) which saves about 20KByte of code as
well.
- Kirill Smelkov provided patches to make src/raster/ftraster.c
compile stand-alone again.
======================================================================
LATEST CHANGES BETWEEN 2.1.9 and 2.1.8
@ -22,6 +141,8 @@ LATEST CHANGES BETWEEN 2.1.9 and 2.1.8
- The BDF driver now uses the DEFAULT_CHAR property (if available)
to select a glyph shape for the undefined glyph.
- The stroker failed for closed outlines and single points.
II. IMPORTANT CHANGES
@ -37,6 +158,11 @@ LATEST CHANGES BETWEEN 2.1.9 and 2.1.8
considerably. See the documentation of `FT_GlyphSlotRec' and
the `ftstring' demo program how to use it.
- Loading TrueType and Type 1 fonts has been made much faster.
- The stroker is no longer experimental (but the cache subsystem
still is).
III. MISCELLANEOUS
@ -777,7 +903,7 @@ LATEST CHANGES BETWEEN 2.1.0 and 2.0.9
III. MISCELLANEOUS
- The FreeType License in `docs/FTL.txt' has been updated to
- The FreeType License in `docs/FTL.TXT' has been updated to
include a proposed preferred disclaimer. If you are using
FreeType in your products, you are encouraged (but not mandated)
to use the following text in your documentation:
@ -2474,4 +2600,16 @@ Extensions support:
return ext_interface->do_it(ext);
}
------------------------------------------------------------------------
Copyright 2000, 2001, 2002, 2003, 2004, 2005 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of CHANGES ---

View file

@ -121,5 +121,16 @@ IV. Overriding default configuration and module headers
and change the C include path to ensure that "custom" is always
placed before the FT2 "include" during compilation.
------------------------------------------------------------------------
Copyright 2003 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of CUSTOMIZE ---

View file

@ -20,7 +20,7 @@ located in the file "ftoptions.h". The macros are:
#define this macro if you want to compile both macros FT_ERROR and
FT_TRACE. This also includes the variants FT_TRACE0, FT_TRACE1,
FT_TRACE2, ..., FT_TRACE6.
FT_TRACE2, ..., FT_TRACE7.
The trace macros are used to send debugging messages when an
appropriate "debug level" is configured at runtime through the
@ -94,7 +94,7 @@ its code:
internal file <freetype/internal/fttrace.h>.
Each such component is assigned a "debug level", ranging from 0
to 6, through the use of the FT2_DEBUG environment variable
to 7, through the use of the FT2_DEBUG environment variable
(described below) when a program linked with FreeType starts.
When FT_TRACE is called, its level is compared to the one of the
@ -110,7 +110,7 @@ its code:
FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) )
The shortcut macros FT_TRACE0, FT_TRACE1, FT_TRACE2_, ... FT_TRACE6
The shortcut macros FT_TRACE0, FT_TRACE1, FT_TRACE2_, ... FT_TRACE7
can be used with constant level indices, and are much cleaner to
use, as in
@ -179,5 +179,16 @@ behaviour of FreeType at runtime:
If it is undefined, or if its value is not strictly positive, then
no allocation bounsd are checked at runtime.
------------------------------------------------------------------------
Copyright 2002, 2003, 2004 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of DEBUG ---

View file

@ -171,4 +171,4 @@ Legal Terms
Werner Lemberg <werner.lemberg@freetype.org>
--- end of LICENSE.TXT ---
--- end of FTL.TXT ---

View file

@ -1,8 +1,8 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -305,14 +305,15 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

View file

@ -64,4 +64,16 @@ II. Custom builds of the library
http://makepp.sourceforge.net for more information; you need version
1.19 or newer, and you must pass option `--norc-substitution'.
------------------------------------------------------------------------
Copyright 2000, 2001, 2002, 2003, 2004, 2005 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of INSTALL ---

View file

@ -42,7 +42,7 @@ I. Standard procedure
-- other components (optional)
src/autohint/autohint.c -- auto hinting module
src/autofit/autofit.c -- auto hinting module
src/cache/ftcache.c -- cache sub-system (in beta)
src/sfnt/sfnt.c -- SFNT files support
(TrueType & OpenType)
@ -95,5 +95,16 @@ II. Support for flat-directory compilation
You don't need to define the FT_FLAT_COMPILATION macro (as this was
required in previous releases of FreeType 2).
------------------------------------------------------------------------
Copyright 2003, 2005 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of INSTALL.ANY ---

View file

@ -136,5 +136,16 @@ the file INSTALL.UNX instead.
a IDE-specific project file, or follow the instructions in
"INSTALL.ANY" to create your own Makefiles.
------------------------------------------------------------------------
Copyright 2003, 2004 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of INSTALL.GNU ---

View file

@ -61,5 +61,16 @@ Win32:
make
make install
------------------------------------------------------------------------
--- end of INSTALL.UNX --
Copyright 2003, 2004 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of INSTALL.UNX ---

View file

@ -1,36 +1,62 @@
How to build the freetype2 library on VMS
-----------------------------------------
Just type one of the following depending on the type of external entries
you want:
It is actually very straightforward to install the Freetype2 library.
Just execute vms_make.com from the toplevel directory to build the
library. This procedure currently accepts the following options:
mms
DEBUG
Build the library with debug information and without optimization.
or
lopts=<value>
Options to pass to the link command e.g. lopts=/traceback
mms/macro=("COMP_FLAGS=/name=(as_is,short)")
ccopt=<value>
Options to pass to the C compiler e.g. ccopt=/float=ieee
In case you did download the demos, place them in a separate directory
sharing the same toplevel as the directory of Freetype2 and follow the
same instructions as above for the demos from there. The build
process relies on this to figure the location of the Freetype2 include
files.
To rebuild the sources it is neccessary to have MMS/MMK installed on
the system.
The library is avalaible in the directory
[.LIB]
To compile applications using FreeType 2 you have to define the logical
FREETYPE pointing to the directory
To compile applications using FreeType 2 you have to define the
logical FREETYPE pointing to the directory
[.INCLUDE.FREETYPE]
i.e., if the directory in which this INSTALL.VMS file is located is
i.e., if the directory in which this INSTALL.VMS file is located is
$disk:[freetype] then define the logical with
define freetype $disk:[freetype.include.freetype]
This version has been tested with Compaq C V6.2-006 on OpenVMS Alpha
This version has been tested with Compaq C V6.2-006 on OpenVMS Alpha
V7.2-1.
Any problems can be reported to
Jouk Jansen <joukj@hrem.stm.tudelft.nl>
Jouk Jansen <joukj@hrem.stm.tudelft.nl> or
Martin P.J. Zinser <zinser@zinser.no-ip.info>
------------------------------------------------------------------------
Copyright 2000, 2004 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of INSTALL.VMS ---

View file

@ -7,7 +7,7 @@
WE HAVE DISCOVERED THAT APPLE OWNS SEVERAL PATENTS RELATED TO THE
RENDERING OF TRUETYPE FONTS. THIS COULD MEAN THAT THE FREE USE OF
FREETYPE MIGHT BE ILLEGAL IN THE USA, JAPAN, AND POSSIBLY OTHER
COUNTRIES, BE IT IN COMMERCIAL OR OPEN SOURCE PRODUCTS.
COUNTRIES, BE IT IN PROPRIETARY OR FREE SOFTWARE PRODUCTS.
FOR MORE DETAILS, WE STRONGLY ADVISE YOU TO GO TO THE FREETYPE
PATENTS PAGE AT THE FOLLOWING WEB ADDRESS:

View file

@ -1,5 +1,5 @@
Here is a list of items that need to be addressed in FreeType 2; they are
not exactly bugs, but should be considered though:
Here is a list of items that need to be addressed in FreeType 2
---------------------------------------------------------------
* Implement stem3/counter hints properly in the Postscript hinter.
@ -17,7 +17,32 @@ not exactly bugs, but should be considered though:
* Add kerning (AFM file) support to the CID driver.
* Possibly add support for reading PFM files.
Here is a list of bugs which should be handled
----------------------------------------------
Other bugs have been registered at the savannah bugzilla of FreeType.
* CID driver:
Handle the case where a CID font has a top-level font matrix also
(see PLRM, 5.11.3, Type 0 CIDFonts). Since CID_FaceInfoRec lacks
a font_matrix entry we have to directly apply it to all subfont
matrices.
* CID driver:
Use top-level font matrix entry for setting the upem value, not the
entries in the FDarray. If absent, use 1000.
------------------------------------------------------------------------
Copyright 2001, 2002, 2003, 2004, 2005 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of TODO ---

View file

@ -22,5 +22,16 @@ How to enable the TrueType native hinter if you need it
These steps must be done _before_ compiling the library.
------------------------------------------------------------------------
Copyright 2003 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of TRUETYPE ---

View file

@ -123,5 +123,16 @@ SPECIAL NOTE FOR UNIX USERS
distributor to help clear this issue in case the information given
here doesn't help.
------------------------------------------------------------------------
Copyright 2003 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
---- end of UPGRADE.UNX ---

View file

@ -52,6 +52,7 @@ systems, but not all of them:
release libtool so
-------------------------------
2.1.10 9.8.3 6.3.8
2.1.9 9.7.3 6.3.7
2.1.8 9.6.3 6.3.6
2.1.7 9.5.3 6.3.5
@ -106,5 +107,16 @@ other release numbers.
CPPFLAGS="$old_CPPFLAGS"],
[AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
------------------------------------------------------------------------
Copyright 2002, 2003, 2004 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of VERSION.DLL ---

View file

@ -39,9 +39,9 @@ reference document and whether it is supported in FreeType 2.
Please send additions and/or corrections to wl@gnu.org or to the
FreeType developer's list at devel@freetype (for subscribers only). If
you can provide a font example for a format which isn't supported yet
please send a mail too.
FreeType developer's list at freetype-devel@nongnu.org (for subscribers
only). If you can provide a font example for a format which isn't
supported yet please send a mail too.
file wrapper font font glyph FreeType reference
@ -65,8 +65,8 @@ MAC SFNT PS CFF --- cff OT spec, 5176.CFF.pdf
MAC SFNT PS CFF CID cff OT spec, 5176.CFF.pdf
--- SFNT PS CFF SYNTHETIC --- OT spec, 5176.CFF.pdf
MAC SFNT PS CFF SYNTHETIC --- OT spec, 5176.CFF.pdf
--- SFNT TT SBIT --- --- XFree86? (bitmaps only;
`head' table)
--- SFNT TT SBIT --- sfnt XFree86 (bitmaps only;
with `head' table)
--- SFNT TT MACSBIT --- sfnt OT spec (for the Mac;
bitmaps only; `bhed' table)
MAC SFNT TT MACSBIT --- sfnt OT spec (for the Mac;
@ -137,3 +137,17 @@ MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf
http://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=18799
(free registration required).
------------------------------------------------------------------------
Copyright 2004, 2005 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of formats.txt ---

View file

@ -25,4 +25,4 @@ Window System. It is compatible to the above two licenses (see file
src/pcf/readme).
--- end of licence.txt ---
--- end of LICENSE.TXT ---

View file

@ -12,3 +12,17 @@ Note that the use of `psnames' can be controlled in ftconfig.h
type42 truetype
psaux psnames
sfnt psnames
------------------------------------------------------------------------
Copyright 2001, 2002 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of modules.txt ---

View file

@ -616,6 +616,17 @@ II. Rendering Technology
Once the spans have been `created', we can simply draw them in
the target bitmap.
------------------------------------------------------------------------
Copyright 2003 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of raster.txt ---

View file

@ -5,7 +5,9 @@ How to prepare a new release
FREETYPE_PATCH.
. builds/unix/configure.ac (version_info): Update according to the libtool
rules, then regenerate the configure script.
rules, then regenerate the configure script with the top-level
`autogen.sh'. After that, update `config.guess' and `config.sub' to
the most recent versions (from the `config' CVS repository).
. builds/freetype.mk (refdoc): Update the `--title' option.
@ -17,6 +19,11 @@ How to prepare a new release
. ChangeLog: Announce new release.
********* The items below should be done but are out-of-date due *********
********* to the move of the FreeType CVS and web pages. *********
. Call `make refdoc' to update HTML reference. Copy it to
freetype2/docs/reference in the `www' CVS module and update the CVS.
Then call `update-www' in ~/cvs/scripts on www.freetype.org to
@ -30,3 +37,17 @@ How to prepare a new release
. Create an md5 checksum file (with md5sum).
. Announce new release on announce@freetype.org and to relevant newsgroups.
------------------------------------------------------------------------
Copyright 2003, 2005 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
license, LICENSE.TXT. By continuing to use, modify, or distribute this
file you indicate that you have read the license and understand and
accept it fully.
--- end of release ---

View file

@ -3,24 +3,23 @@ EXPORTS
FT_Done_Memory
FT_New_Memory
FT_Stream_Open
ft_debug_init
FT_Trace_Get_Count
FT_Trace_Get_Name
ft_debug_init
FT_Add_Default_Modules
FT_Done_FreeType
FT_Init_FreeType
_debug_mem_dummy
FT_Activate_Size
FT_Add_Module
FT_Add64
FT_Add_Module
FT_Alloc
FT_Angle_Diff
FT_Atan2
FT_Attach_File
FT_Attach_Stream
FT_CeilFix
FT_CMap_Done
FT_CMap_New
FT_CeilFix
FT_Cos
FT_Div64by32
FT_DivFix
@ -30,9 +29,9 @@ FT_Done_Library
FT_Done_Size
FT_FloorFix
FT_Free
FT_Get_CMap_Language_ID
FT_Get_Char_Index
FT_Get_Charmap_Index
FT_Get_CMap_Language_ID
FT_Get_First_Char
FT_Get_Glyph_Name
FT_Get_Kerning
@ -55,9 +54,6 @@ FT_GlyphLoader_New
FT_GlyphLoader_Prepare
FT_GlyphLoader_Reset
FT_GlyphLoader_Rewind
ft_glyphslot_alloc_bitmap
ft_glyphslot_free_bitmap
ft_glyphslot_set_bitmap
FT_Library_Version
FT_List_Add
FT_List_Finalize
@ -70,7 +66,6 @@ FT_Load_Char
FT_Load_Glyph
FT_Load_Sfnt_Table
FT_Lookup_Renderer
ft_module_get_service
FT_MulDiv
FT_MulFix
FT_MulTo64
@ -85,6 +80,7 @@ FT_Outline_Copy
FT_Outline_Decompose
FT_Outline_Done
FT_Outline_Done_Internal
FT_Outline_Embolden
FT_Outline_Get_Bitmap
FT_Outline_Get_CBox
FT_Outline_Get_Orientation
@ -105,13 +101,13 @@ FT_Render_Glyph
FT_Render_Glyph_Internal
FT_RoundFix
FT_Select_Charmap
ft_service_list_lookup
FT_Set_Char_Size
FT_Set_Charmap
FT_Set_Debug_Hook
FT_Set_Pixel_Sizes
FT_Set_Renderer
FT_Set_Transform
FT_Sfnt_Table_Info
FT_Sin
FT_Sqrt32
FT_SqrtFixed
@ -141,20 +137,31 @@ FT_Stream_ReadShortLE
FT_Stream_ReleaseFrame
FT_Stream_Seek
FT_Stream_Skip
FT_Stream_TryRead
FT_Tan
ft_validator_error
ft_validator_init
ft_validator_run
FT_Vector_From_Polar
FT_Vector_Length
FT_Vector_Polarize
FT_Vector_Rotate
FT_Vector_Transform
FT_Vector_Unit
ft_glyphslot_alloc_bitmap
ft_glyphslot_free_bitmap
ft_glyphslot_set_bitmap
ft_highpow2
ft_module_get_service
ft_service_list_lookup
ft_validator_error
ft_validator_init
ft_validator_run
FT_Bitmap_Convert
FT_Bitmap_Copy
FT_Bitmap_Done
FT_Bitmap_Embolden
FT_Bitmap_New
FT_Outline_Get_BBox
FT_Get_BDF_Charset_ID
FT_Get_BDF_Property
ft_bitmap_glyph_class
FT_Done_Glyph
FT_Get_Glyph
FT_Glyph_Copy
@ -163,13 +170,13 @@ FT_Glyph_To_Bitmap
FT_Glyph_Transform
FT_Matrix_Invert
FT_Matrix_Multiply
ft_outline_glyph_class
FT_Get_MM_Var
FT_Get_Multi_Master
FT_Set_MM_Blend_Coordinates
FT_Set_MM_Design_Coordinates
FT_Set_Var_Blend_Coordinates
FT_Set_Var_Design_Coordinates
FT_OpenType_Validate
FT_Get_PFR_Advance
FT_Get_PFR_Kerning
FT_Get_PFR_Metrics
@ -191,29 +198,21 @@ FT_Stroker_New
FT_Stroker_ParseOutline
FT_Stroker_Rewind
FT_Stroker_Set
FT_GlyphSlot_Embolden
FT_GlyphSlot_Oblique
FT_Get_PS_Font_Info
FT_Get_PS_Font_Private
FT_Has_PS_Glyph_Names
FT_Get_WinFNT_Header
FT_Get_X11_Font_Format
ah_arctan
autohint_module_class
ft_autohinter_service
bdf_cmap_class
bdf_driver_class
ftc_basic_image_cache_class
ftc_basic_image_family_class
ftc_basic_sbit_cache_class
ftc_basic_sbit_family_class
FTC_CMapCache_Lookup
FTC_CMapCache_New
FTC_Cache_Clear
FTC_Cache_Done
FTC_Cache_Init
FTC_Cache_Lookup
FTC_Cache_NewNode
FTC_Cache_RemoveFaceID
ftc_cmap_cache_class
FTC_CMapCache_Lookup
FTC_CMapCache_New
ftc_face_list_class
FTC_Family_Init
FTC_GCache_Done
FTC_GCache_Init
@ -223,11 +222,11 @@ FTC_GNode_Compare
FTC_GNode_Done
FTC_GNode_Init
FTC_GNode_UnselectFamily
FTC_ImageCache_Lookup
FTC_ImageCache_New
FTC_INode_Free
FTC_INode_New
FTC_INode_Weight
FTC_ImageCache_Lookup
FTC_ImageCache_New
FTC_Manager_Compress
FTC_Manager_Done
FTC_Manager_FlushN
@ -248,57 +247,15 @@ FTC_MruList_Reset
FTC_MruNode_Prepend
FTC_MruNode_Remove
FTC_MruNode_Up
ftc_node_destroy
FTC_Node_Unref
FTC_SBitCache_Lookup
FTC_SBitCache_New
ftc_size_list_class
FTC_SNode_Compare
FTC_SNode_Free
FTC_SNode_New
FTC_SNode_Weight
cff_cmap_encoding_class_rec
cff_cmap_unicode_class_rec
cff_driver_class
t1cid_driver_class
ftc_node_destroy
FT_Stream_OpenGzip
FT_Stream_OpenLZW
pcf_cmap_class
pcf_driver_class
pfr_cmap_class_rec
pfr_driver_class
pfr_metrics_service_rec
ps_parser_funcs
ps_table_funcs
psaux_module_class
t1_builder_funcs
t1_cmap_classes
t1_cmap_custom_class_rec
t1_cmap_expert_class_rec
t1_cmap_standard_class_rec
t1_cmap_unicode_class_rec
t1_decoder_funcs
ps_hints_apply
pshinter_module_class
psnames_module_class
ft_raster1_renderer_class
ft_raster5_renderer_class
ft_standard_raster
sbit_metrics_fields
sfnt_module_class
tt_cmap0_class_rec
tt_cmap10_class_rec
tt_cmap12_class_rec
tt_cmap2_class_rec
tt_cmap4_class_rec
tt_cmap6_class_rec
tt_cmap8_class_rec
ft_grays_raster
ft_smooth_lcd_renderer_class
ft_smooth_lcdv_renderer_class
ft_smooth_renderer_class
gray_raster_render
tt_driver_class
t1_driver_class
t42_driver_class
winfnt_driver_class

View file

@ -19,16 +19,19 @@
<file>ftbase.c</file>
<file>ftbbox.c</file>
<file>ftbdf.c</file>
<file>ftbitmap.c</file>
<file>ftglyph.c</file>
<file>ftmm.c</file>
<file>ftotval.c</file>
<file>ftpfr.c</file>
<file>ftstroke.c</file>
<file>ftsynth.c</file>
<file>fttype1.c</file>
<file>ftwinfnt.c</file>
<file>ftxf86.c</file>
</directory>
<directory name="autohint">
<file>autohint.c</file>
<directory name="autofit">
<file>autofit.c</file>
</directory>
<directory name="bdf">
<file>bdf.c</file>
@ -48,6 +51,15 @@
<directory name="lzw">
<file>ftlzw.c</file>
</directory>
<directory name="otvalid">
<file>otvbase.c</file>
<file>otvcommn.c</file>
<file>otvgpos.c</file>
<file>otvgsub.c</file>
<file>otvgdef.c</file>
<file>otvjstf.c</file>
<file>otvmod.c</file>
</directory>
<directory name="pcf">
<file>pcf.c</file>
</directory>

View file

@ -4,7 +4,7 @@
/* */
/* FreeType internal cache interface (specification). */
/* */
/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -248,7 +248,8 @@ FT_BEGIN_HEADER
error = FTC_Cache_NewNode( _cache, _hash, query, &_node ); \
\
_Ok: \
*(FTC_Node*)&(node) = _node; \
_pnode = (FTC_Node*)(void*)&(node); \
*_pnode = _node; \
FT_END_STMNT
#else /* !FTC_INLINE */
@ -261,6 +262,52 @@ FT_BEGIN_HEADER
#endif /* !FTC_INLINE */
/*
* This macro, together with FTC_CACHE_TRYLOOP_END, defines a retry
* loop to flush the cache repeatedly in case of memory overflows.
*
* It is used when creating a new cache node, or within a lookup
* that needs to allocate data (e.g., the sbit cache lookup).
*
* Example:
*
* {
* FTC_CACHE_TRYLOOP( cache )
* error = load_data( ... );
* FTC_CACHE_TRYLOOP_END()
* }
*
*/
#define FTC_CACHE_TRYLOOP( cache ) \
{ \
FTC_Manager _try_manager = FTC_CACHE( cache )->manager; \
FT_UInt _try_count = 4; \
\
\
for (;;) \
{ \
FT_UInt _try_done;
#define FTC_CACHE_TRYLOOP_END() \
if ( !error || error != FT_Err_Out_Of_Memory ) \
break; \
\
_try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
if ( _try_done == 0 ) \
break; \
\
if ( _try_done == _try_count ) \
{ \
_try_count *= 2; \
if ( _try_count < _try_done || \
_try_count > _try_manager->num_nodes ) \
_try_count = _try_manager->num_nodes; \
} \
} \
}
/* */
FT_END_HEADER

View file

@ -238,7 +238,7 @@ FT_BEGIN_HEADER
#define FTC_CACHE__GCACHE_CLASS( x ) \
FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class )
#define FTC_CACHE__FAMILY_CLASS( x ) \
((FTC_MruListClass) FTC_CACHE__GCACHE_CLASS(x)->family_class)
( (FTC_MruListClass)FTC_CACHE__GCACHE_CLASS( x )->family_class )
/* convenience function; use it instead of FTC_Manager_Register_Cache */
@ -255,6 +255,14 @@ FT_BEGIN_HEADER
FTC_Node *anode );
/* */
#define FTC_FAMILY_FREE( family, cache ) \
FTC_MruList_Remove( &FTC_GCACHE((cache))->families, \
(FTC_MruNode)(family) )
#ifdef FTC_INLINE
#define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash, \
@ -270,7 +278,17 @@ FT_BEGIN_HEADER
FTC_MRULIST_LOOKUP_CMP( &_gcache->families, _gquery, _fcompare, \
_gquery->family, error ); \
if ( !error ) \
{ \
FTC_Family _gqfamily = _gquery->family; \
\
\
_gqfamily->num_nodes++; \
\
FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ); \
\
if ( --_gqfamily->num_nodes == 0 ) \
FTC_FAMILY_FREE( _gqfamily, _gcache ); \
} \
FT_END_STMNT
/* */

View file

@ -4,7 +4,7 @@
/* */
/* Simple MRU list-cache (specification). */
/* */
/* Copyright 2000-2001, 2003, 2004 by */
/* Copyright 2000-2001, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -172,34 +172,35 @@ FT_BEGIN_HEADER
FT_BEGIN_STMNT \
FTC_MruNode* _pfirst = &(list)->nodes; \
FTC_MruNode_CompareFunc _compare = (FTC_MruNode_CompareFunc)(compare); \
FTC_MruNode _first, _node; \
\
\
error = 0; \
_first = *(_pfirst); \
_node = NULL; \
\
if ( _first ) \
{ \
_node = _first; \
do \
{ \
if ( _compare( _node, (key) ) ) \
{ \
if ( _node != _first ) \
FTC_MruNode_Up( _pfirst, _node ); \
\
*(FTC_MruNode*)&(node) = _node; \
goto _MruOk; \
} \
_node = _node->next; \
\
} while ( _node != _first) ; \
} \
\
error = FTC_MruList_New( (list), (key), (FTC_MruNode*)&(node) ); \
_MruOk: \
; \
FTC_MruNode _first, _node, *_pnode; \
\
\
error = 0; \
_first = *(_pfirst); \
_node = NULL; \
\
if ( _first ) \
{ \
_node = _first; \
do \
{ \
if ( _compare( _node, (key) ) ) \
{ \
if ( _node != _first ) \
FTC_MruNode_Up( _pfirst, _node ); \
\
_pnode = (FTC_MruNode*)(void*)&(node); \
*_pnode = _node; \
goto _MruOk; \
} \
_node = _node->next; \
\
} while ( _node != _first) ; \
} \
\
error = FTC_MruList_New( (list), (key), (FTC_MruNode*)(void*)&(node) ); \
_MruOk: \
; \
FT_END_STMNT
#define FTC_MRULIST_LOOKUP( list, key, node, error ) \

View file

@ -72,20 +72,23 @@ FT_BEGIN_HEADER
/* The size of an `int' type. */
#if FT_UINT_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
#elif FT_UINT_MAX == 0xFFFFU
#if FT_UINT_MAX == 0xFFFFUL
#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
#elif FT_UINT_MAX > 0xFFFFFFFFU && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFU
#elif FT_UINT_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `int' type!"
#endif
/* The size of a `long' type. */
#if FT_ULONG_MAX == 0xFFFFFFFFUL
/* The size of a `long' type. A five-byte `long' (as used e.g. on the */
/* DM642) is recognized but avoided. */
#if FT_ULONG_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
#elif FT_ULONG_MAX > 0xFFFFFFFFU && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFU
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `long' type!"

View file

@ -18,6 +18,7 @@
#ifndef __FT_HEADER_H__
#define __FT_HEADER_H__
/*@***********************************************************************/
/* */
/* <Macro> */
@ -92,6 +93,7 @@
/* */
/*************************************************************************/
/* configuration files */
/*************************************************************************/
@ -362,6 +364,7 @@
/* */
#define FT_BDF_H <freetype/ftbdf.h>
/*************************************************************************/
/* */
/* @macro: */
@ -410,6 +413,18 @@
#define FT_GLYPH_H <freetype/ftglyph.h>
/*************************************************************************/
/* */
/* @macro: */
/* FT_BITMAP_H */
/* */
/* @description: */
/* A macro used in #include statements to name the file containing */
/* the API of the optional bitmap conversion component. */
/* */
#define FT_BITMAP_H <freetype/ftbitmap.h>
/*************************************************************************/
/* */
/* @macro: */
@ -529,6 +544,20 @@
/* */
#define FT_SFNT_NAMES_H <freetype/ftsnames.h>
/*************************************************************************/
/* */
/* @macro: */
/* FT_OPENTYPE_VALIDATE_H */
/* */
/* @description: */
/* A macro used in #include statements to name the file containing */
/* the optional FreeType 2 API used to validate OpenType tables */
/* (BASE, GDEF, GPOS, GSUB, JSTF). */
/* */
#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h>
/* */
#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>

View file

@ -1,10 +1,12 @@
FT_USE_MODULE(autohint_module_class)
FT_USE_MODULE(autofit_module_class)
FT_USE_MODULE(tt_driver_class)
FT_USE_MODULE(t1_driver_class)
FT_USE_MODULE(cff_driver_class)
FT_USE_MODULE(t1cid_driver_class)
FT_USE_MODULE(pfr_driver_class)
FT_USE_MODULE(t42_driver_class)
FT_USE_MODULE(winfnt_driver_class)
FT_USE_MODULE(pcf_driver_class)
FT_USE_MODULE(bdf_driver_class)
FT_USE_MODULE(psaux_module_class)
FT_USE_MODULE(psnames_module_class)
FT_USE_MODULE(pshinter_module_class)
@ -13,7 +15,5 @@ FT_USE_MODULE(sfnt_module_class)
FT_USE_MODULE(ft_smooth_renderer_class)
FT_USE_MODULE(ft_smooth_lcd_renderer_class)
FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
FT_USE_MODULE(t42_driver_class)
FT_USE_MODULE(pfr_driver_class)
FT_USE_MODULE(winfnt_driver_class)
FT_USE_MODULE(otv_module_class)
FT_USE_MODULE(bdf_driver_class)

View file

@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -436,7 +436,7 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
@ -446,9 +446,9 @@ FT_BEGIN_HEADER
/* work-around hinting system. Note that for the moment, the algorithm */
/* is only used when selected at runtime through the parameter tag */
/* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived */
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated. */
/* */
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
//#define TT_CONFIG_OPTION_UNPATENTED_HINTING
/*************************************************************************/
@ -550,23 +550,11 @@ FT_BEGIN_HEADER
/* */
/*
* The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
* improvements to the auto-hinter contributed by David Chester. They will
* most likely disappear completely in the next release. For now, you
* should always keep them defined.
* This temporary macro is used to control various optimizations for
* reducing the heap footprint of memory-mapped TrueType files.
*
*/
#define FT_CONFIG_OPTION_CHESTER_HINTS
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
#define FT_CONFIG_CHESTER_SMALL_F
#define FT_CONFIG_CHESTER_ASCENDER
#define FT_CONFIG_CHESTER_SERIF
#define FT_CONFIG_CHESTER_STEM
#define FT_CONFIG_CHESTER_BLUE_SCALE
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
/* #define FT_OPTIMIZE_MEMORY */
FT_END_HEADER

View file

@ -33,6 +33,11 @@
#define __FTSTDLIB_H__
#include <stddef.h>
#define ft_ptrdiff_t ptrdiff_t
/**********************************************************************/
/* */
/* integer limits */
@ -61,6 +66,7 @@
#include <limits.h>
#define FT_UINT_MAX UINT_MAX
#define FT_INT_MAX INT_MAX
#define FT_ULONG_MAX ULONG_MAX

View file

@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -44,7 +44,7 @@
/* */
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 1
#define FREETYPE_PATCH 9
#define FREETYPE_PATCH 10
#include <ft2build.h>
@ -1912,8 +1912,8 @@ FT_BEGIN_HEADER
/* @FT_Open_Face can be used to determine and/or check the font */
/* format of a given font resource. If the `face_index' field is */
/* negative, the function will _not_ return any face handle in */
/* `*face'; the return value is 0 if the font format is recognized, */
/* or non-zero otherwise. */
/* `*aface'; the function's return value is 0 if the font format is */
/* recognized, or non-zero otherwise. */
/* */
FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library,
@ -2041,8 +2041,9 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* When dealing with fixed-size faces (i.e., non-scalable formats), */
/* @FT_Set_Pixel_Sizes provides a more convenient interface. */
/* For BDF and PCF formats, this function uses the `PIXEL_SIZE' */
/* property of the bitmap font; the `char_width' parameter is */
/* ignored. */
/* */
FT_EXPORT( FT_Error )
FT_Set_Char_Size( FT_Face face,
@ -2095,6 +2096,9 @@ FT_BEGIN_HEADER
/* which contain a single bitmap strike only (BDF, PCF, FNT) ignore */
/* `pixel_width'. */
/* */
/* For BDF and PCF formats, this function uses the sum of the */
/* `FONT_ASCENT' and `FONT_DESCENT' properties of the bitmap font. */
/* */
FT_EXPORT( FT_Error )
FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_width,
@ -2272,9 +2276,11 @@ FT_BEGIN_HEADER
*
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
* Indicates that the glyph loader should ignore the global advance
* width defined in the font. As far as we know, this is only used by
* the X-TrueType font server, in order to deal correctly with the
* incorrect metrics contained in DynaLab's TrueType CJK fonts.
* width defined in the font. For historical reasons (to support
* buggy CJK fonts), FreeType uses the value of the `advanceWidthMax'
* field in the `htmx' table for all glyphs if the font is monospaced.
* Activating this flags makes FreeType use the metric values given in
* the `htmx' table.
*
* FT_LOAD_NO_RECURSE ::
* This flag is only used internally. It merely indicates that the
@ -2364,8 +2370,8 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A function used to set the transformation that is applied to glyph */
/* images just before they are converted to bitmaps in a glyph slot */
/* when @FT_Render_Glyph is called. */
/* images when they are loaded into a glyph slot through */
/* @FT_Load_Glyph. */
/* */
/* <InOut> */
/* face :: A handle to the source face object. */
@ -2579,9 +2585,9 @@ FT_BEGIN_HEADER
/* kerning vector. */
/* */
/* <Output> */
/* akerning :: The kerning vector. This is in font units for */
/* scalable formats, and in pixels for fixed-sizes */
/* formats. */
/* akerning :: The kerning vector. This is either in font units */
/* or in pixels (26.6 format) for scalable formats, */
/* and in pixels for fixed-sizes formats. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
@ -2650,13 +2656,13 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Retrieves the ASCII Postscript name of a given face, if available. */
/* This should only work with Postscript and TrueType fonts. */
/* This only works with Postscript and TrueType fonts. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
/* */
/* <Return> */
/* A pointer to the face's Postscript name. NULL if un-available. */
/* A pointer to the face's Postscript name. NULL if unavailable. */
/* */
/* <Note> */
/* The returned pointer is owned by the face and will be destroyed */
@ -2883,7 +2889,7 @@ FT_BEGIN_HEADER
/* Computations */
/* */
/* <Abstract> */
/* Crunching fixed numbers and vectors */
/* Crunching fixed numbers and vectors. */
/* */
/* <Description> */
/* This section contains various functions used to perform */
@ -3068,8 +3074,8 @@ FT_BEGIN_HEADER
/* The result is undefined if either `vector' or `matrix' is invalid. */
/* */
FT_EXPORT( void )
FT_Vector_Transform( FT_Vector* vec,
FT_Matrix* matrix );
FT_Vector_Transform( FT_Vector* vec,
const FT_Matrix* matrix );
/* */

View file

@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (specification). */
/* */
/* Copyright 2002, 2003 by */
/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -38,13 +38,13 @@ FT_BEGIN_HEADER
/* bdf_fonts */
/* */
/* <Title> */
/* BDF Fonts */
/* BDF Files */
/* */
/* <Abstract> */
/* BDF-specific APIs */
/* BDF specific API. */
/* */
/* <Description> */
/* This section contains the declaration of BDF-specific functions. */
/* This section contains the declaration of BDF specific functions. */
/* */
/*************************************************************************/

View file

@ -0,0 +1,206 @@
/***************************************************************************/
/* */
/* ftbitmap.h */
/* */
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
/* bitmaps into 8bpp format (specification). */
/* */
/* Copyright 2004, 2005 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 */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef __FTBITMAP_H__
#define __FTBITMAP_H__
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Section> */
/* bitmap_handling */
/* */
/* <Title> */
/* Bitmap Handling */
/* */
/* <Abstract> */
/* Handling FT_Bitmap objects. */
/* */
/* <Description> */
/* This section contains functions for converting FT_Bitmap objects. */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Function> */
/* FT_Bitmap_New */
/* */
/* <Description> */
/* Initialize a pointer to an FT_Bitmap structure. */
/* */
/* <InOut> */
/* abitmap :: A pointer to the bitmap structure. */
/* */
FT_EXPORT( void )
FT_Bitmap_New( FT_Bitmap *abitmap );
/*************************************************************************/
/* */
/* <Function> */
/* FT_Bitmap_Copy */
/* */
/* <Description> */
/* Copies an bitmap into another one. */
/* */
/* <Input> */
/* library :: A handle to a library object. */
/* */
/* source :: A handle to the source bitmap. */
/* */
/* <Output> */
/* target :: A handle to the target bitmap. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
FT_EXPORT_DEF( FT_Error )
FT_Bitmap_Copy( FT_Library library,
const FT_Bitmap *source,
FT_Bitmap *target);
/*************************************************************************/
/* */
/* <Function> */
/* FT_Bitmap_Embolden */
/* */
/* <Description> */
/* Embolden a bitmap. The new bitmap will be about `xStrength' */
/* pixels wider and `yStrength' pixels higher. The left and bottom */
/* borders are kept unchanged. */
/* */
/* <Input> */
/* library :: A handle to a library object. */
/* */
/* xStrength :: How strong the glyph is emboldened horizontally. */
/* Expressed in 26.6 pixel format. */
/* */
/* yStrength :: How strong the glyph is emboldened vertically. */
/* Expressed in 26.6 pixel format. */
/* */
/* <InOut> */
/* bitmap :: A handle to the target bitmap. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* The current implementation restricts `xStrength' to be less than */
/* or equal to 8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */
/* */
/* Don't embolden the bitmap owned by a @FT_GlyphSlot directly! Call */
/* @FT_Bitmap_Copy to get a copy and work on the copy instead. */
/* */
FT_EXPORT_DEF( FT_Error )
FT_Bitmap_Embolden( FT_Library library,
FT_Bitmap* bitmap,
FT_Pos xStrength,
FT_Pos yStrength );
/*************************************************************************/
/* */
/* <Function> */
/* FT_Bitmap_Convert */
/* */
/* <Description> */
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */
/* bitmap object with depth 8bpp, making the number of used bytes per */
/* line (a.k.a. the `pitch') a multiple of `alignment'. */
/* */
/* <Input> */
/* library :: A handle to a library object. */
/* */
/* source :: The source bitmap. */
/* */
/* alignment :: The pitch of the bitmap is a multiple of this */
/* parameter. Common values are 1, 2, or 4. */
/* */
/* <Output> */
/* target :: The target bitmap. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* It is possible to call @FT_Bitmap_Convert multiple times without */
/* calling @FT_Bitmap_Done (the memory is simply reallocated). */
/* */
/* Use @FT_Bitmap_Done to finally remove the bitmap object. */
/* */
/* The `library' argument is taken to have access to FreeType's */
/* memory handling functions. */
/* */
FT_EXPORT( FT_Error )
FT_Bitmap_Convert( FT_Library library,
const FT_Bitmap *source,
FT_Bitmap *target,
FT_Int alignment );
/*************************************************************************/
/* */
/* <Function> */
/* FT_Bitmap_Done */
/* */
/* <Description> */
/* Destroy a bitmap object created with @FT_Bitmap_New. */
/* */
/* <Input> */
/* library :: A handle to a library object. */
/* */
/* bitmap :: The bitmap object to be freed. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* The `library' argument is taken to have access to FreeType's */
/* memory handling functions. */
/* */
FT_EXPORT( FT_Error )
FT_Bitmap_Done( FT_Library library,
FT_Bitmap *bitmap );
/* */
FT_END_HEADER
#endif /* __FTBITMAP_H__ */
/* END */

View file

@ -86,14 +86,6 @@ FT_BEGIN_HEADER
/* FTC_CMapCache_New */
/* FTC_CMapCache_Lookup */
/* */
/* */
/* FTC_Image_Desc */
/* FTC_Image_Cache */
/* FTC_Image_Cache_Lookup */
/* */
/* FTC_SBit_Cache */
/* FTC_SBit_Cache_Lookup */
/* */
/*************************************************************************/

View file

@ -1,3 +1,11 @@
/***************************************************************************/
/* */
/* This file defines the structure of the FreeType reference. */
/* It is used by the python script which generates the HTML files. */
/* */
/***************************************************************************/
/***************************************************************************/
/* */
/* <Chapter> */
@ -31,6 +39,8 @@
/* sfnt_names */
/* bdf_fonts */
/* pfr_fonts */
/* winfnt_fonts */
/* ot_validation */
/* */
/***************************************************************************/
@ -61,9 +71,12 @@
/* computations */
/* list_processing */
/* outline_processing */
/* bitmap_handling */
/* raster */
/* glyph_stroker */
/* system_interface */
/* module_management */
/* gzip */
/* lzw */
/* */
/***************************************************************************/

View file

@ -4,7 +4,7 @@
/* */
/* FreeType error code handling (specification). */
/* */
/* Copyright 1996-2001, 2002 by */
/* Copyright 1996-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -25,17 +25,12 @@
/* I - Error Formats */
/* ----------------- */
/* */
/* Since release 2.1, the error constants have changed. The lower */
/* byte of the error value gives the "generic" error code, while the */
/* higher byte indicates in which module the error occurred. */
/* */
/* You can use the macro FT_ERROR_BASE(x) macro to extract the generic */
/* error code from an FT_Error value. */
/* */
/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
/* undefined in ftoption.h in order to make the higher byte always */
/* zero, in case you need to be compatible with previous versions of */
/* FreeType 2. */
/* defined in ftoption.h in order to make the higher byte indicate */
/* the module where the error has happened (this is not compatible */
/* with standard builds of FreeType 2). You can then use the macro */
/* FT_ERROR_BASE macro to extract the generic error code from an */
/* FT_Error value. */
/* */
/* */
/* II - Error Message strings */
@ -158,7 +153,7 @@
#define FT_ERRORDEF_( e, v, s ) \
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
/* this is only used for FT_Err_Ok, which must be 0! */
/* this is only used for <module>_Err_Ok, which must be 0! */
#define FT_NOERRORDEF_( e, v, s ) \
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
@ -168,7 +163,7 @@
#endif
/* no include the error codes */
/* now include the error codes */
#include FT_ERROR_DEFINITIONS_H
@ -197,9 +192,13 @@
#undef FT_NOERRORDEF_
#undef FT_NEED_EXTERN_C
#undef FT_ERR_PREFIX
#undef FT_ERR_BASE
#undef FT_ERR_CONCAT
#undef FT_ERR_BASE
/* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */
#ifndef FT_KEEP_ERR_PREFIX
#undef FT_ERR_PREFIX
#endif
#endif /* __FTERRORS_H__ */

View file

@ -4,7 +4,7 @@
/* */
/* Gzip-compressed stream support. */
/* */
/* Copyright 2002, 2003 by */
/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -40,7 +40,7 @@ FT_BEGIN_HEADER
/* GZIP Streams */
/* */
/* <Abstract> */
/* Using gzip-compressed font files */
/* Using gzip-compressed font files. */
/* */
/* <Description> */
/* This section contains the declaration of Gzip-specific functions. */

View file

@ -5,7 +5,7 @@
/* FreeType glyph image formats and default raster interface */
/* (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -264,25 +264,19 @@ FT_BEGIN_HEADER
/* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */
/* See @FT_Pixel_Mode for possible values. */
/* */
/* palette_mode :: This field is only used with paletted pixel modes; */
/* it indicates how the palette is stored. */
/* palette_mode :: This field is intended for paletted pixel modes; */
/* it indicates how the palette is stored. Not */
/* used currently. */
/* */
/* palette :: A typeless pointer to the bitmap palette; only */
/* used for paletted pixel modes. */
/* palette :: A typeless pointer to the bitmap palette; this */
/* field is intended for paletted pixel modes. Not */
/* used currently. */
/* */
/* <Note> */
/* For now, the only pixel mode supported by FreeType are mono and */
/* For now, the only pixel modes supported by FreeType are mono and */
/* grays. However, drivers might be added in the future to support */
/* more `colorful' options. */
/* */
/* When using pixel modes pal2, pal4 and pal8 with a void `palette' */
/* field, a gray pixmap with respectively 4, 16, and 256 levels of */
/* gray is assumed. This, in order to be compatible with some */
/* embedded bitmap formats defined in the TrueType specification. */
/* */
/* Note that no font was found presenting such embedded bitmaps, so */
/* this is currently completely unhandled by the library. */
/* */
typedef struct FT_Bitmap_
{
int rows;
@ -772,7 +766,7 @@ FT_BEGIN_HEADER
/* raster */
/* */
/* <Title> */
/* Scanline converter */
/* Scanline Converter */
/* */
/* <Abstract> */
/* How vectorial outlines are converted into bitmaps and pixmaps. */
@ -1036,8 +1030,8 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Raster_Params_
{
FT_Bitmap* target;
void* source;
const FT_Bitmap* target;
const void* source;
int flags;
FT_SpanFunc gray_spans;
FT_SpanFunc black_spans;

View file

@ -40,7 +40,7 @@ FT_BEGIN_HEADER
/* LZW Streams */
/* */
/* <Abstract> */
/* Using LZW-compressed font files */
/* Using LZW-compressed font files. */
/* */
/* <Description> */
/* This section contains the declaration of LZW-specific functions. */

View file

@ -41,7 +41,7 @@ FT_BEGIN_HEADER
/* mac_specific */
/* */
/* <Title> */
/* Mac-Specific Interface */
/* Mac Specific Interface */
/* */
/* <Abstract> */
/* Only available on the Macintosh. */

View file

@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
/* Copyright 2001, 2002, 2003, 2004 by */
/* Copyright 2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -23,8 +23,8 @@
/* The lower byte gives the error code, the higher byte gives the */
/* module. The base module has error offset 0. For example, the error */
/* `FT_Err_Invalid_File_Format' has value 0x003, the error */
/* `TT_Err_Invalid_File_Format' has value 0x1003, the error */
/* `T1_Err_Invalid_File_Format' has value 0x1103, etc. */
/* `TT_Err_Invalid_File_Format' has value 0x1103, the error */
/* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */
/* */
/* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
/* to make the higher byte always zero (disabling the module error */
@ -103,25 +103,26 @@
FT_MODERRDEF( Base, 0x000, "base module" )
FT_MODERRDEF( Autohint, 0x100, "autohinter module" )
FT_MODERRDEF( Autofit, 0x100, "autofitter module" )
FT_MODERRDEF( BDF, 0x200, "BDF module" )
FT_MODERRDEF( Cache, 0x300, "cache module" )
FT_MODERRDEF( CFF, 0x400, "CFF module" )
FT_MODERRDEF( CID, 0x500, "CID module" )
FT_MODERRDEF( Gzip, 0x600, "Gzip module" )
FT_MODERRDEF( LZW, 0x700, "LZW module" )
FT_MODERRDEF( PCF, 0x800, "PCF module" )
FT_MODERRDEF( PFR, 0x900, "PFR module" )
FT_MODERRDEF( PSaux, 0xA00, "PS auxiliary module" )
FT_MODERRDEF( PShinter, 0xB00, "PS hinter module" )
FT_MODERRDEF( PSnames, 0xC00, "PS names module" )
FT_MODERRDEF( Raster, 0xD00, "raster module" )
FT_MODERRDEF( SFNT, 0xE00, "SFNT module" )
FT_MODERRDEF( Smooth, 0xF00, "smooth raster module" )
FT_MODERRDEF( TrueType, 0x1000, "TrueType module" )
FT_MODERRDEF( Type1, 0x1100, "Type 1 module" )
FT_MODERRDEF( Type42, 0x1200, "Type 42 module" )
FT_MODERRDEF( Winfonts, 0x1300, "Windows FON/FNT module" )
FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" )
FT_MODERRDEF( PCF, 0x900, "PCF module" )
FT_MODERRDEF( PFR, 0xA00, "PFR module" )
FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" )
FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" )
FT_MODERRDEF( PSnames, 0xD00, "PS names module" )
FT_MODERRDEF( Raster, 0xE00, "raster module" )
FT_MODERRDEF( SFNT, 0xF00, "SFNT module" )
FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" )
FT_MODERRDEF( TrueType, 0x1100, "TrueType module" )
FT_MODERRDEF( Type1, 0x1200, "Type 1 module" )
FT_MODERRDEF( Type42, 0x1300, "Type 42 module" )
FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" )
#ifdef FT_MODERR_END_LIST

View file

@ -0,0 +1,170 @@
/***************************************************************************/
/* */
/* ftotval.h */
/* */
/* FreeType API for validating OpenType tables (specification). */
/* */
/* Copyright 2004, 2005 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 */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
/***************************************************************************/
/* */
/* */
/* Warning: This module might be moved to a different library in the */
/* future to avoid a tight dependency between FreeType and the */
/* OpenType specification. */
/* */
/* */
/***************************************************************************/
#ifndef __FTOTVAL_H__
#define __FTOTVAL_H__
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Section> */
/* ot_validation */
/* */
/* <Title> */
/* OpenType Validation */
/* */
/* <Abstract> */
/* An API to validate OpenType tables. */
/* */
/* <Description> */
/* This section contains the declaration of functions to validate */
/* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF). */
/* */
/*************************************************************************/
/**********************************************************************
*
* @enum:
* FT_VALIDATE_XXX
*
* @description:
* A list of bit-field constants used with @FT_OpenType_Validate to
* indicate which OpenType tables should be validated.
*
* @values:
* FT_VALIDATE_BASE ::
* Validate BASE table.
*
* FT_VALIDATE_GDEF ::
* Validate GDEF table.
*
* FT_VALIDATE_GPOS ::
* Validate GPOS table.
*
* FT_VALIDATE_GSUB ::
* Validate GSUB table.
*
* FT_VALIDATE_JSTF ::
* Validate JSTF table.
*
* FT_VALIDATE_OT ::
* Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).
*
*/
#define FT_VALIDATE_BASE 0x0100
#define FT_VALIDATE_GDEF 0x0200
#define FT_VALIDATE_GPOS 0x0400
#define FT_VALIDATE_GSUB 0x0800
#define FT_VALIDATE_JSTF 0x1000
#define FT_VALIDATE_OT FT_VALIDATE_BASE | \
FT_VALIDATE_GDEF | \
FT_VALIDATE_GPOS | \
FT_VALIDATE_GSUB | \
FT_VALIDATE_JSTF
/* */
/**********************************************************************
*
* @function:
* FT_OpenType_Validate
*
* @description:
* Validate various OpenType tables to assure that all offsets and
* indices are valid. The idea is that a higher-level library which
* actually does the text layout can access those tables without
* error checking (which can be quite time consuming).
*
* @input:
* face ::
* A handle to the input face.
*
* validation_flags ::
* A bit field which specifies the tables to be validated. See
* @FT_VALIDATE_XXX for possible values.
*
* @output:
* BASE_table ::
* A pointer to the BASE table.
*
* GDEF_table ::
* A pointer to the GDEF table.
*
* GPOS_table ::
* A pointer to the GPOS table.
*
* GSUB_table ::
* A pointer to the GSUB table.
*
* JSTF_table ::
* A pointer to the JSTF table.
*
* @return:
* FreeType error code. 0 means success.
*
* @note:
* This function only works with OpenType fonts, returning an error
* otherwise.
*
* After use, the application should deallocate the five tables with
* `free'. A NULL value indicates that the table either doesn't exist
* in the font, or the application hasn't asked for validation.
*/
FT_EXPORT( FT_Error )
FT_OpenType_Validate( FT_Face face,
FT_UInt validation_flags,
FT_Bytes *BASE_table,
FT_Bytes *GDEF_table,
FT_Bytes *GPOS_table,
FT_Bytes *GSUB_table,
FT_Bytes *JSTF_table );
/* */
FT_END_HEADER
#endif /* __FTOTVAL_H__ */
/* END */

View file

@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003 by */
/* Copyright 1996-2001, 2002, 2003, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -58,6 +58,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Copy */
/* FT_Outline_Translate */
/* FT_Outline_Transform */
/* FT_Outline_Embolden */
/* FT_Outline_Reverse */
/* FT_Outline_Check */
/* */
@ -229,8 +230,8 @@ FT_BEGIN_HEADER
/* acbox :: The outline's control box. */
/* */
FT_EXPORT( void )
FT_Outline_Get_CBox( FT_Outline* outline,
FT_BBox *acbox );
FT_Outline_Get_CBox( const FT_Outline* outline,
FT_BBox *acbox );
/*************************************************************************/
@ -250,9 +251,9 @@ FT_BEGIN_HEADER
/* yOffset :: The vertical offset. */
/* */
FT_EXPORT( void )
FT_Outline_Translate( FT_Outline* outline,
FT_Pos xOffset,
FT_Pos yOffset );
FT_Outline_Translate( const FT_Outline* outline,
FT_Pos xOffset,
FT_Pos yOffset );
/*************************************************************************/
@ -275,8 +276,8 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Copy( FT_Outline* source,
FT_Outline *target );
FT_Outline_Copy( const FT_Outline* source,
FT_Outline *target );
/*************************************************************************/
@ -299,8 +300,33 @@ FT_BEGIN_HEADER
/* outline's points. */
/* */
FT_EXPORT( void )
FT_Outline_Transform( FT_Outline* outline,
FT_Matrix* matrix );
FT_Outline_Transform( const FT_Outline* outline,
const FT_Matrix* matrix );
/*************************************************************************/
/* */
/* <Function> */
/* FT_Outline_Embolden */
/* */
/* <Description> */
/* Emboldens an outline. The new outline will be at most 4 times */
/* `strength' pixels wider and higher. You may think of the left and */
/* bottom borders as unchanged. */
/* */
/* <InOut> */
/* outline :: A handle to the target outline. */
/* */
/* <Input> */
/* strength :: How strong the glyph is emboldened. Expressed in */
/* 26.6 pixel format. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
FT_EXPORT_DEF( FT_Error )
FT_Outline_Embolden( FT_Outline* outline,
FT_Pos strength );
/*************************************************************************/
@ -353,9 +379,9 @@ FT_BEGIN_HEADER
/* It will use the raster correponding to the default glyph format. */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Get_Bitmap( FT_Library library,
FT_Outline* outline,
FT_Bitmap *abitmap );
FT_Outline_Get_Bitmap( FT_Library library,
FT_Outline* outline,
const FT_Bitmap *abitmap );
/*************************************************************************/

View file

@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing PFR-specific data (specification only). */
/* */
/* Copyright 2002, 2003 by */
/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -41,7 +41,7 @@ FT_BEGIN_HEADER
/* PFR Fonts */
/* */
/* <Abstract> */
/* PFR/TrueDoc specific APIs */
/* PFR/TrueDoc specific API. */
/* */
/* <Description> */
/* This section contains the declaration of PFR-specific functions. */
@ -166,7 +166,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
#endif /* __FTBDF_H__ */
#endif /* __FTPFR_H__ */
/* END */

View file

@ -4,7 +4,7 @@
/* */
/* FreeType renderer modules public interface (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View file

@ -4,7 +4,7 @@
/* */
/* FreeType size objects management (specification). */
/* */
/* Copyright 1996-2001, 2003 by */
/* Copyright 1996-2001, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -48,10 +48,10 @@ FT_BEGIN_HEADER
/* sizes_management */
/* */
/* <Title> */
/* Size management */
/* Size Management */
/* */
/* <Abstract> */
/* Managing multiple sizes per face */
/* Managing multiple sizes per face. */
/* */
/* <Description> */
/* When creating a new face object (e.g. with @FT_New_Face), an */

View file

@ -23,9 +23,33 @@
#include FT_OUTLINE_H
#include FT_GLYPH_H
FT_BEGIN_HEADER
/*@*************************************************************
/************************************************************************
*
* <Section>
* glyph_stroker
*
* <Title>
* Glyph Stroker
*
* <Abstract>
* Generating bordered and stroked glyphs.
*
* <Description>
* This component generates stroked outlines of a given vectorial
* glyph. It also allows you to retrieve the `outside' and/or the
* `inside' borders of the stroke.
*
* This can be useful to generate `bordered' glyph, i.e., glyphs
* displayed with a coloured (and anti-aliased) border around their
* shape.
*/
/**************************************************************
*
* @type:
* FT_Stroker
@ -36,7 +60,7 @@ FT_BEGIN_HEADER
typedef struct FT_StrokerRec_* FT_Stroker;
/*@*************************************************************
/**************************************************************
*
* @enum:
* FT_Stroker_LineJoin
@ -69,7 +93,7 @@ FT_BEGIN_HEADER
} FT_Stroker_LineJoin;
/*@*************************************************************
/**************************************************************
*
* @enum:
* FT_Stroker_LineCap

View file

@ -4,7 +4,7 @@
/* */
/* FreeType simple types definitions (specification only). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -49,6 +49,7 @@ FT_BEGIN_HEADER
/* */
/* <Order> */
/* FT_Byte */
/* FT_Bytes */
/* FT_Char */
/* FT_Int */
/* FT_UInt */
@ -60,6 +61,7 @@ FT_BEGIN_HEADER
/* FT_Offset */
/* FT_PtrDist */
/* FT_String */
/* FT_Tag */
/* FT_Error */
/* FT_Fixed */
/* FT_Pointer */
@ -143,6 +145,28 @@ FT_BEGIN_HEADER
typedef unsigned char FT_Byte;
/*************************************************************************/
/* */
/* <Type> */
/* FT_Bytes */
/* */
/* <Description> */
/* A typedef for constant memory areas. */
/* */
typedef const FT_Byte* FT_Bytes;
/*************************************************************************/
/* */
/* <Type> */
/* FT_Tag */
/* */
/* <Description> */
/* A typedef for 32bit tags (as used in the SFNT format). */
/* */
typedef FT_UInt32 FT_Tag;
/*************************************************************************/
/* */
/* <Type> */
@ -184,7 +208,7 @@ FT_BEGIN_HEADER
/* <Description> */
/* A typedef for the int type. */
/* */
typedef int FT_Int;
typedef signed int FT_Int;
/*************************************************************************/
@ -301,7 +325,7 @@ FT_BEGIN_HEADER
/* largest _signed_ integer type used to express the distance */
/* between two pointers. */
/* */
typedef size_t FT_PtrDist;
typedef ft_ptrdiff_t FT_PtrDist;
/*************************************************************************/

View file

@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows fnt-specific data. */
/* */
/* Copyright 2003 by */
/* Copyright 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -38,10 +38,10 @@ FT_BEGIN_HEADER
/* winfnt_fonts */
/* */
/* <Title> */
/* Window FNT Fonts */
/* Window FNT Files */
/* */
/* <Abstract> */
/* Windows FNT specific APIs */
/* Windows FNT specific API. */
/* */
/* <Description> */
/* This section contains the declaration of Windows FNT specific */

View file

@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003 by */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -27,6 +27,23 @@
FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
/* FT_FixedSqrt */
/* */
/* <Description> */
/* Computes the square root of a 16.16 fixed point value. */
/* */
/* <Input> */
/* x :: The value to compute the root for. */
/* */
/* <Return> */
/* The result of `sqrt(x)'. */
/* */
/* <Note> */
/* This function is not very fast. */
/* */
FT_EXPORT( FT_Int32 )
FT_SqrtFixed( FT_Int32 x );

View file

@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
/* Copyright 1996-2001, 2002, 2004 by */
/* Copyright 1996-2001, 2002, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -43,6 +43,7 @@ FT_BEGIN_HEADER
( ( error = (expression) ) != 0 )
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@ -124,6 +125,28 @@ FT_BEGIN_HEADER
void* *P );
/*************************************************************************/
/* */
/* <Function> */
/* FT_QAlloc */
/* */
/* <Description> */
/* Allocates a new block of memory. The returned area is *not* */
/* zero-filled, making allocation quicker. */
/* */
/* <Input> */
/* memory :: A handle to a given `memory object' which handles */
/* allocation. */
/* */
/* size :: The size in bytes of the block to allocate. */
/* */
/* <Output> */
/* P :: A pointer to the fresh new block. It should be set to */
/* NULL if `size' is 0, or in case of error. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
FT_BASE( FT_Error )
FT_QAlloc( FT_Memory memory,
FT_Long size,
@ -137,7 +160,8 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
/* from the heap, possibly changing `*P'. */
/* from the heap, possibly changing `*P'. The returned area is */
/* zero-filled. */
/* */
/* <Input> */
/* memory :: A handle to a given `memory object' which handles */
@ -165,6 +189,35 @@ FT_BEGIN_HEADER
void* *P );
/*************************************************************************/
/* */
/* <Function> */
/* FT_QRealloc */
/* */
/* <Description> */
/* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
/* from the heap, possibly changing `*P'. The returned area is *not* */
/* zero-filled, making reallocation quicker. */
/* */
/* <Input> */
/* memory :: A handle to a given `memory object' which handles */
/* reallocation. */
/* */
/* current :: The current block size in bytes. */
/* */
/* size :: The new block size in bytes. */
/* */
/* <InOut> */
/* P :: A pointer to the fresh new block. It should be set to */
/* NULL if `size' is 0, or in case of error. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* All callers of FT_Realloc() _must_ provide the current block size */
/* as well as the new one. */
/* */
FT_BASE( FT_Error )
FT_QRealloc( FT_Memory memory,
FT_Long current,
@ -208,11 +261,24 @@ FT_BEGIN_HEADER
#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
#define FT_ARRAY_COPY( dest, source, count ) \
FT_MEM_COPY( dest, source, (count) * sizeof( *(dest) ) )
#define FT_ARRAY_ZERO( dest, count ) \
FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_MOVE( dest, source, count ) \
FT_MEM_MOVE( dest, source, (count) * sizeof( *(dest) ) )
#define FT_ARRAY_COPY( dest, source, count ) \
FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_MOVE( dest, source, count ) \
FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )
/*
* Return the maximum number of adressable elements in an array.
* We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid
* any problems.
*/
#define FT_ARRAY_MAX( ptr ) ( FT_INT_MAX / sizeof ( *(ptr) ) )
#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) )
/*************************************************************************/
@ -224,43 +290,53 @@ FT_BEGIN_HEADER
#ifdef FT_DEBUG_MEMORY
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc_Debug( memory, _size_, \
(void**)&(_pointer_), __FILE__, __LINE__ )
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc_Debug( memory, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
FT_Realloc_Debug( memory, _current_, _size_, \
(void**)&(_pointer_), __FILE__, __LINE__ )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
FT_Realloc_Debug( memory, _current_, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
FT_QAlloc_Debug( memory, _size_, \
(void**)&(_pointer_), __FILE__, __LINE__ )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
FT_QAlloc_Debug( memory, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
FT_QRealloc_Debug( memory, _current_, _size_, \
(void**)&(_pointer_), __FILE__, __LINE__ )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
FT_QRealloc_Debug( memory, _current_, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_FREE( _pointer_ ) \
FT_Free_Debug( memory, (void**)&(_pointer_), __FILE__, __LINE__ )
#define FT_MEM_FREE( _pointer_ ) \
FT_Free_Debug( memory, (void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#else /* !FT_DEBUG_MEMORY */
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc( memory, _size_, (void**)&(_pointer_) )
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc( memory, _size_, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_FREE( _pointer_ ) \
FT_Free( memory, (void**)&(_pointer_) )
#define FT_MEM_FREE( _pointer_ ) \
FT_Free( memory, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
FT_Realloc( memory, _current_, _size_, (void**)&(_pointer_) )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
FT_Realloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
FT_QAlloc( memory, _size_, (void**)&(_pointer_) )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
FT_QAlloc( memory, _size_, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
FT_QRealloc( memory, _current_, _size_, (void**)&(_pointer_) )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
FT_QRealloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) )
#endif /* !FT_DEBUG_MEMORY */
@ -271,7 +347,7 @@ FT_BEGIN_HEADER
/* _typed_ in order to automatically compute array element sizes. */
/* */
#define FT_MEM_NEW( _pointer_ ) \
#define FT_MEM_NEW( _pointer_ ) \
FT_MEM_ALLOC( _pointer_, sizeof ( *(_pointer_) ) )
#define FT_MEM_NEW_ARRAY( _pointer_, _count_ ) \
@ -281,7 +357,7 @@ FT_BEGIN_HEADER
FT_MEM_REALLOC( _pointer_, (_old_) * sizeof ( *(_pointer_) ), \
(_new_) * sizeof ( *(_pointer_) ) )
#define FT_MEM_QNEW( _pointer_ ) \
#define FT_MEM_QNEW( _pointer_ ) \
FT_MEM_QALLOC( _pointer_, sizeof ( *(_pointer_) ) )
#define FT_MEM_QNEW_ARRAY( _pointer_, _count_ ) \
@ -318,9 +394,6 @@ FT_BEGIN_HEADER
#define FT_REALLOC( _pointer_, _current_, _size_ ) \
FT_SET_ERROR( FT_MEM_REALLOC( _pointer_, _current_, _size_ ) )
#define FT_FREE( _pointer_ ) \
FT_MEM_FREE( _pointer_ )
#define FT_QALLOC( _pointer_, _size_ ) \
FT_SET_ERROR( FT_MEM_QALLOC( _pointer_, _size_ ) )
@ -328,33 +401,38 @@ FT_BEGIN_HEADER
FT_SET_ERROR( FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) )
#define FT_NEW( _pointer_ ) \
FT_SET_ERROR( FT_MEM_NEW( _pointer_ ) )
#define FT_NEW_ARRAY( _pointer_, _count_ ) \
FT_SET_ERROR( FT_MEM_NEW_ARRAY( _pointer_, _count_ ) )
#define FT_RENEW_ARRAY( _pointer_, _old_, _new_ ) \
FT_SET_ERROR( FT_MEM_RENEW_ARRAY( _pointer_, _old_, _new_ ) )
#define FT_QNEW( _pointer_ ) \
FT_SET_ERROR( FT_MEM_QNEW( _pointer_ ) )
#define FT_QNEW_ARRAY( _pointer_, _count_ ) \
FT_SET_ERROR( FT_MEM_QNEW_ARRAY( _pointer_, _count_ ) )
#define FT_QRENEW_ARRAY( _pointer_, _old_, _new_ ) \
FT_SET_ERROR( FT_MEM_QRENEW_ARRAY( _pointer_, _old_, _new_ ) )
#define FT_FREE( _pointer_ ) \
FT_MEM_FREE( _pointer_ )
#define FT_ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
FT_SET_ERROR( FT_MEM_ALLOC( _pointer_, \
(_count_) * sizeof ( _type_ ) ) )
#define FT_NEW( _pointer_ ) \
FT_ALLOC( _pointer_, sizeof ( *(_pointer_) ) )
#define FT_NEW_ARRAY( _pointer_, _count_ ) \
FT_ALLOC( _pointer_, sizeof ( *(_pointer_) ) * (_count_) )
#define FT_RENEW_ARRAY( _pointer_, _old_, _new_ ) \
FT_REALLOC( _pointer_, sizeof ( *(_pointer_) ) * (_old_), \
sizeof ( *(_pointer_) ) * (_new_) )
#define FT_QNEW( _pointer_ ) \
FT_QALLOC( _pointer_, sizeof ( *(_pointer_) ) )
#define FT_QNEW_ARRAY( _pointer_, _count_ ) \
FT_QALLOC( _pointer_, sizeof ( *(_pointer_) ) * (_count_) )
#define FT_QRENEW_ARRAY( _pointer_, _old_, _new_ ) \
FT_QREALLOC( _pointer_, sizeof ( *(_pointer_) ) * (_old_), \
sizeof ( *(_pointer_) ) * (_new_) )
#define FT_ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
FT_ALLOC( _pointer_, (_count_) * sizeof ( _type_ ) )
#define FT_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ ) \
FT_REALLOC( _pointer, (_old_) * sizeof ( _type_ ), \
(_new_) * sizeof ( _type_ ) )
#define FT_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ ) \
FT_SET_ERROR( FT_MEM_REALLOC( _pointer_, \
(_old_) * sizeof ( _type_ ), \
(_new_) * sizeof ( _type_ ) ) )
/* */

View file

@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -27,7 +27,6 @@
#define __FTOBJS_H__
#include <ft2build.h>
#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */
#include FT_RENDER_H
#include FT_SIZES_H
#include FT_INTERNAL_MEMORY_H
@ -81,109 +80,12 @@ FT_BEGIN_HEADER
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/**** ****/
/**** ****/
/**** V A L I D A T I O N ****/
/**** ****/
/**** ****/
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/* handle to a validation object */
typedef struct FT_ValidatorRec_* FT_Validator;
/*************************************************************************/
/* */
/* There are three distinct validation levels defined here: */
/* */
/* FT_VALIDATE_DEFAULT :: */
/* A table that passes this validation level can be used reliably by */
/* FreeType. It generally means that all offsets have been checked to */
/* prevent out-of-bound reads, array counts are correct, etc. */
/* */
/* FT_VALIDATE_TIGHT :: */
/* A table that passes this validation level can be used reliably and */
/* doesn't contain invalid data. For example, a charmap table that */
/* returns invalid glyph indices will not pass, even though it can */
/* be used with FreeType in default mode (the library will simply */
/* return an error later when trying to load the glyph). */
/* */
/* It also check that fields that must be a multiple of 2, 4, or 8 */
/* don't have incorrect values, etc. */
/* */
/* FT_VALIDATE_PARANOID :: */
/* Only for font debugging. Checks that a table follows the */
/* specification by 100%. Very few fonts will be able to pass this */
/* level anyway but it can be useful for certain tools like font */
/* editors/converters. */
/* */
typedef enum FT_ValidationLevel_
{
FT_VALIDATE_DEFAULT = 0,
FT_VALIDATE_TIGHT,
FT_VALIDATE_PARANOID
} FT_ValidationLevel;
/* validator structure */
typedef struct FT_ValidatorRec_
{
const FT_Byte* base; /* address of table in memory */
const FT_Byte* limit; /* `base' + sizeof(table) in memory */
FT_ValidationLevel level; /* validation level */
FT_Error error; /* error returned. 0 means success */
ft_jmp_buf jump_buffer; /* used for exception handling */
} FT_ValidatorRec;
#define FT_VALIDATOR( x ) ((FT_Validator)( x ))
FT_BASE( void )
ft_validator_init( FT_Validator valid,
const FT_Byte* base,
const FT_Byte* limit,
FT_ValidationLevel level );
FT_BASE( FT_Int )
ft_validator_run( FT_Validator valid );
/* Sets the error field in a validator, then calls `longjmp' to return */
/* to high-level caller. Using `setjmp/longjmp' avoids many stupid */
/* error checks within the validation routines. */
/* */
FT_BASE( void )
ft_validator_error( FT_Validator valid,
FT_Error error );
/* Calls ft_validate_error. Assumes that the `valid' local variable */
/* holds a pointer to the current validator object. */
/* */
#define FT_INVALID( _error ) ft_validator_error( valid, _error )
/* called when a broken table is detected */
#define FT_INVALID_TOO_SHORT FT_INVALID( FT_Err_Invalid_Table )
/* called when an invalid offset is detected */
#define FT_INVALID_OFFSET FT_INVALID( FT_Err_Invalid_Offset )
/* called when an invalid format/value is detected */
#define FT_INVALID_FORMAT FT_INVALID( FT_Err_Invalid_Table )
/* called when an invalid glyph index is detected */
#define FT_INVALID_GLYPH_ID FT_INVALID( FT_Err_Invalid_Glyph_Index )
/* called when an invalid field value is detected */
#define FT_INVALID_DATA FT_INVALID( FT_Err_Invalid_Table )
/*
* Return the highest power of 2 that is <= value; this correspond to
* the highest bit in a given 32-bit value.
*/
FT_BASE( FT_UInt32 )
ft_highpow2( FT_UInt32 value );
/*************************************************************************/
@ -257,7 +159,7 @@ FT_BEGIN_HEADER
FT_CharMap charmap,
FT_CMap *acmap );
/* destroy a charmap (don't remove it from face's list though) */
/* destroy a charmap and remove it from face's list */
FT_BASE( void )
FT_CMap_Done( FT_CMap cmap );

View file

@ -4,7 +4,7 @@
/* */
/* The FreeType services (specification only). */
/* */
/* Copyright 2003 by */
/* Copyright 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -34,6 +34,13 @@
FT_BEGIN_HEADER
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
/* we disable the warning `conditional expression is constant' here */
/* in order to compile cleanly with the maximum level of warnings */
#pragma warning( disable : 4127 )
#endif /* _MSC_VER */
/*
* @macro:
@ -57,18 +64,33 @@ FT_BEGIN_HEADER
* A variable that receives the service pointer. Will be NULL
* if not found.
*/
#ifdef __cplusplus
#define FT_FACE_FIND_SERVICE( face, ptr, id ) \
FT_BEGIN_STMNT \
FT_Module module = FT_MODULE( FT_FACE(face)->driver ); \
/* the strange cast is to allow C++ compilation */ \
FT_Pointer* Pptr = (FT_Pointer*) &(ptr); \
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
FT_Pointer _tmp_ = NULL; \
FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \
\
\
*Pptr = NULL; \
if ( module->clazz->get_interface ) \
*Pptr = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
_tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
*_pptr_ = _tmp_; \
FT_END_STMNT
#else /* !C++ */
#define FT_FACE_FIND_SERVICE( face, ptr, id ) \
FT_BEGIN_STMNT \
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
FT_Pointer _tmp_ = NULL; \
\
if ( module->clazz->get_interface ) \
_tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
ptr = _tmp_; \
FT_END_STMNT
#endif /* !C++ */
/*
* @macro:
@ -92,16 +114,33 @@ FT_BEGIN_HEADER
* A variable that receives the service pointer. Will be NULL
* if not found.
*/
#ifdef __cplusplus
#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \
FT_BEGIN_STMNT \
FT_Module module = FT_MODULE( FT_FACE(face)->driver ); \
/* the strange cast is to allow C++ compilation */ \
FT_Pointer* Pptr = (FT_Pointer*) &(ptr); \
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
FT_Pointer _tmp_; \
FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \
\
\
*Pptr = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
_tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
*_pptr_ = _tmp_; \
FT_END_STMNT
#else /* !C++ */
#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \
FT_BEGIN_STMNT \
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
FT_Pointer _tmp_; \
\
\
_tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
ptr = _tmp_; \
FT_END_STMNT
#endif /* !C++ */
/*************************************************************************/
/*************************************************************************/
@ -199,27 +238,50 @@ FT_BEGIN_HEADER
* ptr ::
* A variable receiving the service data. NULL if not available.
*/
#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
FT_BEGIN_STMNT \
/* the strange cast is to allow C++ compilation */ \
FT_Pointer* pptr = (FT_Pointer*)&(ptr); \
FT_Pointer svc; \
\
\
svc = FT_FACE(face)->internal->services. service_ ## id ; \
if ( svc == FT_SERVICE_UNAVAILABLE ) \
svc = NULL; \
else if ( svc == NULL ) \
{ \
FT_FACE_FIND_SERVICE( face, svc, id ); \
\
FT_FACE(face)->internal->services. service_ ## id = \
(FT_Pointer)( svc != NULL ? svc \
: FT_SERVICE_UNAVAILABLE ); \
} \
*pptr = svc; \
#ifdef __cplusplus
#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
FT_BEGIN_STMNT \
FT_Pointer svc; \
FT_Pointer* Pptr = (FT_Pointer*)&(ptr); \
\
\
svc = FT_FACE( face )->internal->services. service_ ## id; \
if ( svc == FT_SERVICE_UNAVAILABLE ) \
svc = NULL; \
else if ( svc == NULL ) \
{ \
FT_FACE_FIND_SERVICE( face, svc, id ); \
\
FT_FACE( face )->internal->services. service_ ## id = \
(FT_Pointer)( svc != NULL ? svc \
: FT_SERVICE_UNAVAILABLE ); \
} \
*Pptr = svc; \
FT_END_STMNT
#else /* !C++ */
#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
FT_BEGIN_STMNT \
FT_Pointer svc; \
\
\
svc = FT_FACE( face )->internal->services. service_ ## id; \
if ( svc == FT_SERVICE_UNAVAILABLE ) \
svc = NULL; \
else if ( svc == NULL ) \
{ \
FT_FACE_FIND_SERVICE( face, svc, id ); \
\
FT_FACE( face )->internal->services. service_ ## id = \
(FT_Pointer)( svc != NULL ? svc \
: FT_SERVICE_UNAVAILABLE ); \
} \
ptr = svc; \
FT_END_STMNT
#endif /* !C++ */
/*
* A macro used to define new service structure types.
@ -238,17 +300,18 @@ FT_BEGIN_HEADER
* The header files containing the services.
*/
#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h>
#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
/* */

View file

@ -4,7 +4,7 @@
/* */
/* Stream handling (specification). */
/* */
/* Copyright 1996-2001, 2002, 2004 by */
/* Copyright 1996-2001, 2002, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -343,7 +343,7 @@ FT_BEGIN_HEADER
/* free a stream */
FT_BASE( void )
FT_Stream_Free( FT_Stream stream,
FT_Stream_Free( FT_Stream stream,
FT_Int external );
/* initialize a stream for reading in-memory data */
@ -385,6 +385,13 @@ FT_BEGIN_HEADER
FT_Byte* buffer,
FT_ULong count );
/* try to read bytes at the end of a stream; return number of bytes */
/* really available */
FT_BASE( FT_ULong )
FT_Stream_TryRead( FT_Stream stream,
FT_Byte* buffer,
FT_ULong count );
/* Enter a frame of `count' consecutive bytes in a stream. Returns an */
/* error if the frame could not be read/accessed. The caller can use */
/* the FT_Stream_Get_XXX functions to retrieve frame data without */

View file

@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
/* Copyright 2002, 2004 by */
/* Copyright 2002, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -37,17 +37,18 @@ FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
/* Cache sub-system */
/* Cache sub-system */
FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
/* SFNT driver components */
/* SFNT driver components */
FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */
FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */
FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */
FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */
/* TrueType driver components */
/* TrueType driver components */
FT_TRACE_DEF( ttdriver ) /* TT font driver (ttdriver.c) */
FT_TRACE_DEF( ttgload ) /* TT glyph loader (ttgload.c) */
FT_TRACE_DEF( ttinterp ) /* bytecode interpreter (ttinterp.c) */
@ -55,7 +56,7 @@ FT_TRACE_DEF( ttobjs ) /* TT objects manager (ttobjs.c) */
FT_TRACE_DEF( ttpload ) /* TT data/program loader (ttpload.c) */
FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */
/* Type 1 driver components */
/* Type 1 driver components */
FT_TRACE_DEF( t1driver )
FT_TRACE_DEF( t1gload )
FT_TRACE_DEF( t1hint )
@ -63,26 +64,26 @@ FT_TRACE_DEF( t1load )
FT_TRACE_DEF( t1objs )
FT_TRACE_DEF( t1parse )
/* PostScript helper module `psaux' */
/* PostScript helper module `psaux' */
FT_TRACE_DEF( t1decode )
FT_TRACE_DEF( psobjs )
/* PostScript hinting module `pshinter' */
/* PostScript hinting module `pshinter' */
FT_TRACE_DEF( pshrec )
FT_TRACE_DEF( pshalgo1 )
FT_TRACE_DEF( pshalgo2 )
/* Type 2 driver components */
/* Type 2 driver components */
FT_TRACE_DEF( cffdriver )
FT_TRACE_DEF( cffgload )
FT_TRACE_DEF( cffload )
FT_TRACE_DEF( cffobjs )
FT_TRACE_DEF( cffparse )
/* Type 42 driver component */
/* Type 42 driver component */
FT_TRACE_DEF( t42 )
/* CID driver components */
/* CID driver components */
FT_TRACE_DEF( cidafm )
FT_TRACE_DEF( ciddriver )
FT_TRACE_DEF( cidgload )
@ -90,19 +91,28 @@ FT_TRACE_DEF( cidload )
FT_TRACE_DEF( cidobjs )
FT_TRACE_DEF( cidparse )
/* Windows fonts component */
/* Windows font component */
FT_TRACE_DEF( winfnt )
/* PCF fonts components */
/* PCF font components */
FT_TRACE_DEF( pcfdriver )
FT_TRACE_DEF( pcfread )
/* BDF fonts component */
/* BDF font components */
FT_TRACE_DEF( bdfdriver )
FT_TRACE_DEF( bdflib )
/* PFR fonts component */
/* PFR font component */
FT_TRACE_DEF( pfr )
/* OpenType validation components */
FT_TRACE_DEF( otvmodule )
FT_TRACE_DEF( otvcommon )
FT_TRACE_DEF( otvbase )
FT_TRACE_DEF( otvgdef )
FT_TRACE_DEF( otvgpos )
FT_TRACE_DEF( otvgsub )
FT_TRACE_DEF( otvjstf )
/* END */

View file

@ -0,0 +1,148 @@
/***************************************************************************/
/* */
/* ftvalid.h */
/* */
/* FreeType validation support (specification). */
/* */
/* Copyright 2004 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 */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef __FTVALID_H__
#define __FTVALID_H__
#include <ft2build.h>
#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */
FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/**** ****/
/**** ****/
/**** V A L I D A T I O N ****/
/**** ****/
/**** ****/
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/* handle to a validation object */
typedef struct FT_ValidatorRec_* FT_Validator;
/*************************************************************************/
/* */
/* There are three distinct validation levels defined here: */
/* */
/* FT_VALIDATE_DEFAULT :: */
/* A table that passes this validation level can be used reliably by */
/* FreeType. It generally means that all offsets have been checked to */
/* prevent out-of-bound reads, that array counts are correct, etc. */
/* */
/* FT_VALIDATE_TIGHT :: */
/* A table that passes this validation level can be used reliably and */
/* doesn't contain invalid data. For example, a charmap table that */
/* returns invalid glyph indices will not pass, even though it can */
/* be used with FreeType in default mode (the library will simply */
/* return an error later when trying to load the glyph). */
/* */
/* It also checks that fields which must be a multiple of 2, 4, or 8, */
/* don't have incorrect values, etc. */
/* */
/* FT_VALIDATE_PARANOID :: */
/* Only for font debugging. Checks that a table follows the */
/* specification by 100%. Very few fonts will be able to pass this */
/* level anyway but it can be useful for certain tools like font */
/* editors/converters. */
/* */
typedef enum FT_ValidationLevel_
{
FT_VALIDATE_DEFAULT = 0,
FT_VALIDATE_TIGHT,
FT_VALIDATE_PARANOID
} FT_ValidationLevel;
/* validator structure */
typedef struct FT_ValidatorRec_
{
const FT_Byte* base; /* address of table in memory */
const FT_Byte* limit; /* `base' + sizeof(table) in memory */
FT_ValidationLevel level; /* validation level */
FT_Error error; /* error returned. 0 means success */
ft_jmp_buf jump_buffer; /* used for exception handling */
} FT_ValidatorRec;
#define FT_VALIDATOR( x ) ((FT_Validator)( x ))
FT_BASE( void )
ft_validator_init( FT_Validator valid,
const FT_Byte* base,
const FT_Byte* limit,
FT_ValidationLevel level );
FT_BASE( FT_Int )
ft_validator_run( FT_Validator valid );
/* Sets the error field in a validator, then calls `longjmp' to return */
/* to high-level caller. Using `setjmp/longjmp' avoids many stupid */
/* error checks within the validation routines. */
/* */
FT_BASE( void )
ft_validator_error( FT_Validator valid,
FT_Error error );
/* Calls ft_validate_error. Assumes that the `valid' local variable */
/* holds a pointer to the current validator object. */
/* */
/* Use preprocessor prescan to pass FT_ERR_PREFIX. */
/* */
#define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error )
#define FT_INVALID_( _prefix, _error ) \
ft_validator_error( valid, _prefix ## _error )
/* called when a broken table is detected */
#define FT_INVALID_TOO_SHORT \
FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
/* called when an invalid offset is detected */
#define FT_INVALID_OFFSET \
FT_INVALID( FT_ERR_PREFIX, Invalid_Offset )
/* called when an invalid format/value is detected */
#define FT_INVALID_FORMAT \
FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
/* called when an invalid glyph index is detected */
#define FT_INVALID_GLYPH_ID \
FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index )
/* called when an invalid field value is detected */
#define FT_INVALID_DATA \
FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
FT_END_HEADER
#endif /* __FTVALID_H__ */
/* END */

View file

@ -35,6 +35,7 @@
#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>

Some files were not shown because too many files have changed in this diff Show more