shithub: freetype+ttf2subf

Download patch

ref: 288ce1430339d2642aabc7c22a998babe1126e38
parent: 0f1c4fa7c6370b50507e64f22c31153fed90e6be
author: Werner Lemberg <[email protected]>
date: Wed Jun 8 07:56:55 EDT 2005

* builds/amiga/*: Added copyright notes, reworked some comments.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-06-07  Detlef W�rkner  <[email protected]>
+
+	* builds/amiga/*: Added copyright notes, reworked some comments.
+
 2005-06-05  Werner Lemberg  <[email protected]>
 
 	* Add copyright notices to all files which don't have one.
--- a/builds/amiga/README
+++ b/builds/amiga/README
@@ -1,68 +1,81 @@
-The   makefile.os4  is  for  the  AmigaOS4  SDK.  To  use   it,   type
+
+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 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   ([email protected],
+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 ([email protected],
 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. 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
+- 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, because 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).
@@ -69,7 +82,7 @@
 
 - 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.
 
@@ -76,18 +89,22 @@
 
 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:
--- a/builds/amiga/include/freetype/config/ftconfig.h
+++ b/builds/amiga/include/freetype/config/ftconfig.h
@@ -1,13 +1,41 @@
-// 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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
-//#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
+/*
+ * 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
+
 #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"
@@ -15,10 +43,17 @@
 #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)
+/* 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:
+*/
--- a/builds/amiga/include/freetype/config/ftmodule.h
+++ b/builds/amiga/include/freetype/config/ftmodule.h
@@ -1,7 +1,27 @@
-// 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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
 /*
+ * 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
@@ -18,8 +38,9 @@
 #include "FT:src/base/ftinit.c"
 */
 
-// 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
@@ -55,7 +76,7 @@
 #define FT_USE_PSNAMES
 #endif
 
-// Now include the modules
+/* Now include the modules */
 
 #ifdef FT_USE_AUTOFIT
 FT_USE_MODULE(autofit_module_class)
@@ -126,3 +147,9 @@
 #ifdef FT_USE_BDF
 FT_USE_MODULE(bdf_driver_class)
 #endif
+
+/*
+Local Variables:
+coding: latin-1
+End:
+*/
--- a/builds/amiga/makefile
+++ b/builds/amiga/makefile
@@ -3,6 +3,19 @@
 # (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
@@ -246,3 +259,7 @@
 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:
--- a/builds/amiga/makefile.os4
+++ b/builds/amiga/makefile.os4
@@ -2,6 +2,18 @@
 # 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
@@ -252,3 +264,7 @@
 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:
--- a/builds/amiga/smakefile
+++ b/builds/amiga/smakefile
@@ -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
@@ -257,3 +269,7 @@
 #
 otvalid.o: $(CORE)otvalid/otvalid.c
 	sc $(SCFLAGS) objname=$@ $<
+
+#Local Variables:
+#coding: latin-1
+#End:
--- a/builds/amiga/src/base/ftdebug.c
+++ b/builds/amiga/src/base/ftdebug.c
@@ -1,24 +1,3 @@
-/*
- * TetiSoft: replaced vprintf() with KVPrintF(), commented out exit(),
- * and 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>
-
-#ifndef __amigaos4__
-extern struct Library *DOSBase;
-#else
-extern struct DOSIFace *IDOS;
-#endif
-
 /***************************************************************************/
 /*                                                                         */
 /*  ftdebug.c                                                              */
@@ -25,8 +4,8 @@
 /*                                                                         */
 /*    Debugging and logging component (body).                              */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2004 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      */
@@ -62,6 +41,30 @@
   /*************************************************************************/
 
 
+/*
+ * 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>
+
+#ifndef __amigaos4__
+extern struct Library *DOSBase;
+#else
+extern struct DOSIFace *IDOS;
+#endif
+
+
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_INTERNAL_DEBUG_H
@@ -268,5 +271,9 @@
 
 #endif /* !FT_DEBUG_LEVEL_TRACE */
 
-
+/*
+Local Variables:
+coding: latin-1
+End:
+*/
 /* END */
--- a/builds/amiga/src/base/ftsystem.c
+++ b/builds/amiga/src/base/ftsystem.c
@@ -5,7 +5,7 @@
 /*    Amiga-specific FreeType low-level system interface (body).           */
 /*                                                                         */
 /*  Copyright 1996-2001, 2002, 2005 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*  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,13 +24,23 @@
   /*************************************************************************/
 
 
-/* Maintained by Detlef W�rkner <[email protected]> */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Maintained by Detlef W�rkner <[email protected]>                   */
+  /*                                                                       */
+  /* 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 */
+  /*                                                                       */
+  /*************************************************************************/
 
-/* TetiSoft: Modified to avoid fopen() fclose() fread() fseek() ftell()
- * malloc() realloc() and free().
- * We need exec V39+ because we use AllocPooled() etc.
- */
-
 #define __NOLIBBASE__
 #define __NOGLOBALIFACE__
 #define __USE_INLINE__
@@ -504,4 +514,9 @@
     FreeVec( memory );
   }
 
+/*
+Local Variables:
+coding: latin-1
+End:
+*/
 /* END */
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -446,7 +446,7 @@
   /* 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