ref: 5a73d8d20fde372543a92c4bfc35fbbe815650f5
parent: e091ce35ff6e2e29d6a85f1401d4f25ce609b06b
author: Werner Lemberg <[email protected]>
date: Mon Mar 20 11:55:32 EST 2006
* builds/freetype.mk (CACHE_DIR, CACHE_H): Remove. (FREETYPE_H): Updated. * src/cache/rules.mk (CACHE_H_DIR): Remove. (CACHE_DRV_H): Updated. Formatting, copyright years.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,57 +1,86 @@
-2006-03-20 David Turner <[email protected]>
+2006-03-20 Werner Lemberg <[email protected]>
- * src/autofit/aflatin.c (af_latin_hints_init):
- disable horizontal hinting for italic/oblique fonts
+ * builds/freetype.mk (CACHE_DIR, CACHE_H): Remove.
+ (FREETYPE_H): Updated.
- * builds/win32/visualc/freetype.dsp: updating the project file, adding
- missing base source files (e.g. ftstroke.c, ftxf86.c, etc...)
+ * src/cache/rules.mk (CACHE_H_DIR): Remove.
+ (CACHE_DRV_H): Updated.
- * src/autofit/afcjk.c, src/autofit/aflatin.c, src/base/ftobjs.c,
- src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrobjs.c,
- src/sfnt/sfobjs.c, src/sfnt/ttmtx.c, src/truetype/ttpload.c,
- src/truetype/ttpload.h, src/type1/t1afm.c, src/type1/t1objs.c:
- removing compiler warnings when building with Visual C++ 6 and /W4
+2006-03-20 David Turner <[email protected]>
- * builds/unix/install.mk:
- changing the installation procedure to remove the 'freetype/cache'
- from the target directory.
+ * include/freetype/cache/ftccache.h,
+ include/freetype/cache/ftccmap.h, include/freetype/cache/ftcglyph.h
+ include/freetype/cache/ftcimage.h include/freetype/cache/ftcmanag.h
+ include/freetype/cache/ftcmru.h include/freetype/cache/ftcsbits.h:
+ Move to...
- * include/freetype/cache/ftccache.h,
- include/freetype/cache/ftccmap.h,
- include/freetype/cache/ftcglyph.h
- include/freetype/cache/ftcimage.h
- include/freetype/cache/ftcmanag.h
- include/freetype/cache/ftcmru.h
- include/freetype/cache/ftcsbits.h:
- removing these header files from the public include directory.
+ * src/cache/ftccache.h, src/cache/ftcglyph.h, src/cache/ftcimage.h,
+ src/cache/ftcsbits.h, src/cache/ftcmanag.h, src/cache/ftccmap.h,
+ src/cache/ftcmru.h: This new location.
+ Update declarations according to the changes in the corresponding
+ source files.
- * include/freetype/config/ftheader.h:
- changing the definition of FT_CACHE_INTERNAL_XXX_H macros to
- redirect to FT_CACHE_H instead
+ Note that these files are not used by FreeType clients; all public
+ APIs of the cache module have been already moved to
+ `include/freetype/ftcache.h', and all FT_CACHE_INTERNAL_XXXX_H
+ macros resolve to it.
- * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccache.h,
- src/cache/ftccback.h, src/cache/ftccmap.c, src/cache/ftcglyph.c,
- src/cache/ftcglyph.h, src/cache/ftcimage.c, src/cache/ftcimage.h,
- src/cache/ftcmanag.c, src/cache/ftcmanag.h, src/cache/ftcmru.c,
- src/cache/ftcmru.h, src/cache/ftcsbits.c, src/cache/ftcsbits.h:
- modifications to prevent using the FT_CACHE_INTERNAL_XXX_H macros,
- and grab the headers in 'src/cache' instead (see below).
+ Reason for the move is to allow modifications of the internals
+ without interferences with rogue clients. Note that there are no
+ known clients that access the cache internals at the moment.
- * src/cache/ftccache.h, src/cache/ftcglyph.h, src/cache/ftcimage.h,
- src/cache/ftcsbits.h, src/cache/ftcmanag.h, src/cache/ftccmap.h,
- src/cache/ftcmru.h: copying the cache's internal header files which
- were located in 'include/freetype/cache' to the 'src/cache' directory
- instead.
+ * builds/unix/install.mk (install): Don't install headers from
+ $(CACHE_H).
+ Remove `freetype/cache' from the target directory.
- Note that these files are not used by FreeType clients, all cache
- public APIs have been already moved to include/freetype/ftcache.h,
- and the FT_CACHE_INTERNAL_XXXX_H macros all resolve to it.
+ * include/freetype/config/ftheader.h (FT_CACHE_MANAGER_H,
+ FT_CACHE_INTERNAL_MRU_H, FT_CACHE_INTERNAL_MANAGER_H,
+ FT_CACHE_INTERNAL_CACHE_H, FT_CACHE_INTERNAL_GLYPH_H,
+ FT_CACHE_INTERNAL_IMAGE_H, FT_CACHE_INTERNAL_SBITS_H): Point to
+ FT_CACHE_H.
- the move is to allow us to modify the internals without intereference
- from rogue clients. Note that there are no known client that accesses
- the cache internals at the moment.
+ * src/cache/ftcbasic.c, src/cache/ftccache.h, src/cache/ftccback.h,
+ src/cache/ftccmap.c, src/cache/ftcglyph.c, src/cache/ftcglyph.h,
+ src/cache/ftcimage.c, src/cache/ftcimage.h, src/cache/ftcmanag.c,
+ src/cache/ftcmanag.h, src/cache/ftcmru.h, src/cache/ftcsbits.c,
+ src/cache/ftcsbits.h: Don't use the FT_CACHE_INTERNAL_XXX_H macros
+ but include the headers directly (which are now in `src/cache').
-2006-03-06 David Turner <[email protected]>
+ * src/cache/ftccache.c: Don't use the FT_CACHE_INTERNAL_XXX_H
+ macros but include the headers directly.
+ (FTC_Cache_Init, FTC_Cache_Done, FTC_Cache_NewNode,
+ FTC_Cache_Lookup, FTC_Cache_RemoveFaceID): Declare as FT_LOCAL_DEF.
+
+ * src/cache/ftccache.c: Don't use the FT_CACHE_INTERNAL_XXX_H
+ macros but include the headers directly.
+ (FTC_MruNode_Prepend, FTC_MruNode_Up, FTC_MruNode_Remove,
+ FTC_MruList_Init, FTC_MruList_Reset, FTC_MruList_Done,
+ FTC_MruList_New, FTC_MruList_Remove, FTC_MruList_RemoveSelection):
+ Declare as FT_LOCAL_DEF.
+ (FTC_MruListFind, FTC_MruList_Lookup) [!FTC_INLINE]: Compile
+ conditionally.
+ Declare as FT_LOCAL_DEF.
+
+
+ * builds/win32/visualc/freetype.dsp: Update project file, add
+ missing base source files (ftstroke.c, ftxf86.c, etc.).
+
+
+ * src/autofit/afcjk.c, src/autofit/aflatin.c, src/base/ftobjs.c,
+ src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrobjs.c,
+ src/sfnt/sfobjs.c, src/sfnt/ttmtx.c, src/type1/t1afm.c,
+ src/type1/t1objs.c: Remove compiler warnings when building with
+ Visual C++ 6 and /W4.
+
+ * src/autofit/aflatin.c (af_latin_hints_init): Disable horizontal
+ hinting for italic/oblique fonts.
+
+
+
+ * src/truetype/ttpload.c, src/truetype/ttpload.h
+ (tt_face_get_device_metrics): Change second argument to `FT_UInt'.
+
+2006-03-06 David Turner <[email protected]>
* src/cache/ftcmanag.c (FTC_Manager_Lookup_Size): Prevent crashes in
Mozilla/FireFox print preview in Ubuntu Hoary.
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -101,7 +101,6 @@
INTERNAL_DIR := $(PUBLIC_DIR)/internal
SERVICES_DIR := $(INTERNAL_DIR)/services
CONFIG_DIR := $(PUBLIC_DIR)/config
-CACHE_DIR := $(PUBLIC_DIR)/cache
# The documentation directory.
#
@@ -169,8 +168,8 @@
# Define $(PUBLIC_H) as the list of all public header files located in
-# `$(TOP_DIR)/include/freetype'. $(BASE_H), $(CACHE_H), and $(CONFIG_H) are
-# defined similarly.
+# `$(TOP_DIR)/include/freetype'. $(BASE_H), and $(CONFIG_H) are defined
+# similarly.
#
# This is used to simplify the dependency rules -- if one of these files
# changes, the whole library is recompiled.
@@ -182,10 +181,9 @@
$(wildcard $(BUILD_DIR)/freetype/config/*.h) \
$(FTMODULE_H) \
$(FTOPTION_H)
-CACHE_H := $(wildcard $(CACHE_DIR)/*.h)
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
-FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H) $(CACHE_H) $(DEVEL_H)
+FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H) $(DEVEL_H)
# ftsystem component
--- a/builds/unix/install.mk
+++ b/builds/unix/install.mk
@@ -44,7 +44,7 @@
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
done
- -$(DELETE� $(DESTDIR)$(includedir)/freetype2/freetype/cache/*
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/cache/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/cache
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/internal/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/internal
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -624,10 +624,10 @@
#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
-/* the internals of the cache sub-system are no longer exposed, we */
-/* default to FT_CACHE_H at the moment just in case, but we know of */
-/* no rogue client that uses them anyway */
-/* */
+ /* The internals of the cache sub-system are no longer exposed. We */
+ /* default to FT_CACHE_H at the moment just in case, but we know of */
+ /* no rogue client that uses them. */
+ /* */
#define FT_CACHE_MANAGER_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
@@ -635,6 +635,7 @@
#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
+
#define FT_XFREE86_H <freetype/ftxf86.h>
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1364,7 +1364,7 @@
/*
* In `light' hinting mode we disable horizontal hinting completely.
- * we also do it if the face is italic
+ * We also do it if the face is italic.
*/
if ( mode == FT_RENDER_MODE_LIGHT ||
(face->style_flags & FT_STYLE_FLAG_ITALIC) != 0 )
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Glyph Image (FT_Glyph) cache (body). */
/* */
-/* Copyright 2000-2001, 2003, 2004 by */
+/* Copyright 2000-2001, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcglyph.h
+++ b/src/cache/ftcglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType abstract glyph cache (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004 by */
+/* Copyright 2000-2001, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Image cache (body). */
/* */
-/* Copyright 2000-2001, 2003, 2004 by */
+/* Copyright 2000-2001, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcimage.h
+++ b/src/cache/ftcimage.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Generic Image cache (specification) */
/* */
-/* Copyright 2000-2001, 2002, 2003 by */
+/* Copyright 2000-2001, 2002, 2003, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcmanag.h
+++ b/src/cache/ftcmanag.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004 by */
+/* Copyright 2000-2001, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcmru.c
+++ b/src/cache/ftcmru.c
@@ -4,7 +4,7 @@
/* */
/* FreeType MRU support (body). */
/* */
-/* Copyright 2003, 2004 by */
+/* Copyright 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcmru.h
+++ b/src/cache/ftcmru.h
@@ -4,7 +4,7 @@
/* */
/* Simple MRU list-cache (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2005 by */
+/* Copyright 2000-2001, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -4,7 +4,7 @@
/* */
/* FreeType sbits manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/ftcsbits.h
+++ b/src/cache/ftcsbits.h
@@ -4,7 +4,7 @@
/* */
/* A small-bitmap cache (specification). */
/* */
-/* Copyright 2000-2001, 2002, 2003 by */
+/* Copyright 2000-2001, 2002, 2003, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/cache/rules.mk
+++ b/src/cache/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2000, 2001, 2003, 2004 by
+# Copyright 2000, 2001, 2003, 2004, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -16,7 +16,6 @@
# Cache driver directory
#
CACHE_DIR := $(SRC_DIR)/cache
-CACHE_H_DIR := $(PUBLIC_DIR)/cache
# compilation flags for the driver
#
@@ -25,24 +24,24 @@
# Cache driver sources (i.e., C files)
#
-CACHE_DRV_SRC := $(CACHE_DIR)/ftcmru.c \
- $(CACHE_DIR)/ftcmanag.c \
- $(CACHE_DIR)/ftcbasic.c \
+CACHE_DRV_SRC := $(CACHE_DIR)/ftcbasic.c \
$(CACHE_DIR)/ftccache.c \
+ $(CACHE_DIR)/ftccmap.c \
$(CACHE_DIR)/ftcglyph.c \
- $(CACHE_DIR)/ftcsbits.c \
$(CACHE_DIR)/ftcimage.c \
- $(CACHE_DIR)/ftccmap.c
+ $(CACHE_DIR)/ftcmanag.c \
+ $(CACHE_DIR)/ftcmru.c \
+ $(CACHE_DIR)/ftcsbits.c
# Cache driver headers
#
-CACHE_DRV_H := $(CACHE_H_DIR)/ftcmru.h \
- $(CACHE_H_DIR)/ftcmanag.h \
- $(CACHE_H_DIR)/ftcglyph.h \
- $(CACHE_H_DIR)/ftcimage.h \
- $(CACHE_H_DIR)/ftccmap.h \
- $(CACHE_DIR)/ftcerror.h \
- $(CACHE_DIR)/ftccback.h
+CACHE_DRV_H := $(CACHE_DIR)/ftccback.h \
+ $(CACHE_DIR)/ftccmap.h \
+ $(CACHE_DIR)/ftcerror.h \
+ $(CACHE_DIR)/ftcglyph.h \
+ $(CACHE_DIR)/ftcimage.h \
+ $(CACHE_DIR)/ftcmanag.h \
+ $(CACHE_DIR)/ftcmru.h
# Cache driver object(s)
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -567,7 +567,7 @@
if ( !has_outline && sfnt->load_bhed )
{
LOAD_( bhed );
- is_apple_sbit = FT_BOOL(!error);
+ is_apple_sbit = FT_BOOL( !error );
}
/* load the font header (`head' table) if this isn't an Apple */
@@ -947,7 +947,7 @@
if ( error )
goto Exit;
- bsize->height = (FT_Short)(metrics.height >> 6);
+ bsize->height = (FT_Short)( metrics.height >> 6 );
bsize->width = (FT_Short)(
( avgwidth * metrics.x_ppem + em_size / 2 ) / em_size );
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -285,8 +285,8 @@
t1_face->bbox.xMax = ( fi->FontBBox.xMax + 0xFFFFU ) >> 16;
t1_face->bbox.yMax = ( fi->FontBBox.yMax + 0xFFFFU ) >> 16;
- t1_face->ascender = (FT_Short)(( fi->Ascender + 0x8000U ) >> 16);
- t1_face->descender = (FT_Short)(( fi->Descender + 0x8000U ) >> 16);
+ t1_face->ascender = (FT_Short)( ( fi->Ascender + 0x8000U ) >> 16 );
+ t1_face->descender = (FT_Short)( ( fi->Descender + 0x8000U ) >> 16 );
if ( fi->NumKernPair )
{