diff --git a/ChangeLog b/ChangeLog index 63be2c8b8..8f5e76b64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,24 +1,26 @@ 2008-10-02 suzuki toshiya * src/base/ftbase.h: New file to declare the private utility - functions shared by the sources of base modules. Currently, - `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared - to share between ftobjs.c and ftmac.c. + functions shared by the sources of base modules. Currently, + `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared to + share between ftobjs.c and ftmac.c. + * src/base/rule.mk: Add ftbase.h. + * src/base/ftobjs.c: Include ftbase.h. - (memory_stream_close): Build on any platform when old MacOS - font support is enabled. + (memory_stream_close): Build on any platform when old MacOS font + support is enabled. (new_memory_stream): Ditto. - (open_face_from_buffer): Build on any platform when old MacOS - font support is enabled. The counting of the face in a font - file is slightly different between Carbon-dependent parser and - Carbon-free parser. They are merged with the platform-specific - conditional. + (open_face_from_buffer): Build on any platform when old MacOS font + support is enabled. The counting of the face in a font file is + slightly different between Carbon-dependent parser and Carbon-free + parser. They are merged with the platform-specific conditional. (ft_lookup_PS_in_sfnt): Ditto. + * src/base/ftmac.c: Include ftbase.h. (memory_stream_close): Removed. (new_memory_stream): Ditto. - (open_face_from_buffer): Removed. Use the implementation in + (open_face_from_buffer): Removed. Use the implementation in ftobjs.c. (ft_lookup_PS_in_sfnt): Ditto. @@ -39,7 +41,7 @@ 2008-09-30 suzuki toshiya * src/base/rules.mk: Add conditional source to BASE_SRC, for `make - multi' on Mac OS X. If the macro $(ftmac_c) is defined, + multi' on Mac OS X. If the macro $(ftmac_c) is defined, $(BASE_DIR)/$(ftmac_c) is added to BASE_SRC. In a normal build, the lack of ftmac.c in BASE_SRC is not serious because ftbase.c includes ftmac.c. diff --git a/src/base/ftbase.h b/src/base/ftbase.h index b63c9dff5..a20158363 100644 --- a/src/base/ftbase.h +++ b/src/base/ftbase.h @@ -4,7 +4,7 @@ /* */ /* The FreeType private functions used in base module (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */ +/* Copyright 2008 by */ /* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -28,15 +28,16 @@ FT_BEGIN_HEADER /* Check whether the sfnt image in the buffer is sfnt-wrapped PS Type1 */ - /* or sfnt-wrapped CID-keyed font. */ + /* or sfnt-wrapped CID-keyed font. */ FT_LOCAL_DEF( FT_Error ) ft_lookup_PS_in_sfnt( FT_Byte* sfnt, FT_ULong* offset, FT_ULong* length, FT_Bool* is_sfnt_cid ); + /* Create a new FT_Face given a buffer and a driver name. */ - /* from ftmac.c */ + /* From ftmac.c. */ FT_LOCAL_DEF( FT_Error ) open_face_from_buffer( FT_Library library, FT_Byte* base, diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 2e5534dd5..b74f86ebc 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -1198,9 +1198,9 @@ /* we don't really have access to it. */ - /* Finalizer for a memory stream; gets called by FT_Done_Face(). - It frees the memory it uses. */ - /* from ftmac.c */ + /* Finalizer for a memory stream; gets called by FT_Done_Face(). */ + /* It frees the memory it uses. */ + /* From ftmac.c. */ static void memory_stream_close( FT_Stream stream ) { @@ -1216,7 +1216,7 @@ /* Create a new memory stream from a buffer and a size. */ - /* from ftmac.c */ + /* From ftmac.c. */ static FT_Error new_memory_stream( FT_Library library, FT_Byte* base, @@ -1321,7 +1321,7 @@ /* format too. Here, since we can't expect that the TrueType font */ /* driver is loaded unconditially, we must parse the font by */ /* ourselves. We are only interested in the name of the table and */ - /* the offset. */ + /* the offset. */ FT_LOCAL_DEF( FT_Error ) ft_lookup_PS_in_sfnt( FT_Byte* sfnt, @@ -1370,6 +1370,7 @@ #if !defined( FT_MACINTOSH ) || defined( DARWIN_NO_CARBON ) + /* The resource header says we've got resource_cnt `POST' (type1) */ /* resources in this file. They all need to be coalesced into */ /* one lump which gets passed on to the type1 driver. */