* src/autohint/ahtypes.h (AH_Hinter): Add elements

`disable_horz_edges', `disable_vert_edges'.
* src/autohint/ahhint.c	(ah_hint_edges_3, ah_hinter_hint_edges): Use
them (and remove static variables with the same names).
* src/pcf/pcfutil.c (BitOrderInvert): Add `const'.
* docs/glnames.py: Updated to latest pstables.h changes.
* src/psnames/pstables.h: Add more `const'.
* src/pcf/pcfutil.c: Ditto.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixing typo
(FT_Glyph_Done -> FT_Done_Glyph).
* include/freetype/ttnameid.h: Added some new Microsoft language
codes and LCIDs as found in Office Xp.

* builds/hurd/detect.mk: New file.  Added support to detect the GNU
Hurd operating system as Unix-like.  Fix submitted by Anthony Fok
<foka@debian.org>.

* src/type1/t1gload.c (T1_Load_Glyph): Set glyph control data to the
the Type 1 glyph charstring (used by conversion programs).
Submitted by Ha Shao <hashao@chinese.com>.


* src/base/ftgrays.c (grays_sweep): The function didn't exit
immediately if `num_cells' was 0 as it should.  Thanks to Boris for
finding this out.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixed memory leak when
bitmap rendering fails (thanks to Graham Asher).

* docs/docmaker.py, include/freetype/*.h: Updated the DocMaker
script to support chapters and section block ordering.  Updated the
public header files accordingly.
* src/base/ftglyph.c (FT_Glyph_Copy): Advance width and glyph format
were not correctly copied.
This commit is contained in:
Werner Lemberg 2001-03-04 21:53:08 +00:00
parent 6d27936aa9
commit e274cfd3ef
14 changed files with 285 additions and 184 deletions

View File

@ -1,25 +1,45 @@
2001-03-01 Antoine Leca <Antoine.Leca@renault.fr>
2001-03-04 Werner Lemberg <wl@gnu.org>
* include/freetype/ttnameid.h: added some new Microsoft language
codes and LCIDs as found in Office Xp.
* src/autohint/ahtypes.h (AH_Hinter): Add elements
`disable_horz_edges', `disable_vert_edges'.
* src/autohint/ahhint.c (ah_hint_edges_3, ah_hinter_hint_edges): Use
them (and remove static variables with the same names).
* src/pcf/pcfutil.c (BitOrderInvert): Add `const'.
* docs/glnames.py: Updated to latest pstables.h changes.
2001-02-28 David Turner <david.turner@freetype.org>
2001-03-04 Sander van der Wal <svdwal@xs4all.nl>
* builds/hurd/detect.mk: added support to detect the GNU Hurd operating
system as Unix-like. Fix submitted by Anthony Fok <foka@debian.org>
* src/psnames/pstables.h: Add more `const'.
* src/pcf/pcfutil.c: Ditto.
* src/type1/t1gload.c (T1_Load_Glyph): set glyph control data to the
the Type 1 glyph charstring. (used by conversion programs).
submitted by Ha Shao <hashao@chinese.com>
2001-03-04 Werner Lemberg <wl@gnu.org>
2001-02-22 David Turner <david.turner@freetype.org>
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixing typo
(FT_Glyph_Done -> FT_Done_Glyph).
* src/base/ftgrays.c (grays_sweep): the function didn't exit
immediately if "num_cells" was 0 as it should. Thanks to Boris
for finding this out.
2001-03-01 Antoine Leca <Antoine.Leca@renault.fr>
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): fixed memory leak when
bitmap rendering fails.. (thanks to Graham Asher)
* include/freetype/ttnameid.h: Added some new Microsoft language
codes and LCIDs as found in Office Xp.
2001-02-28 David Turner <david.turner@freetype.org>
* builds/hurd/detect.mk: New file. Added support to detect the GNU
Hurd operating system as Unix-like. Fix submitted by Anthony Fok
<foka@debian.org>.
* src/type1/t1gload.c (T1_Load_Glyph): Set glyph control data to the
the Type 1 glyph charstring (used by conversion programs).
Submitted by Ha Shao <hashao@chinese.com>.
2001-02-22 David Turner <david.turner@freetype.org>
* src/base/ftgrays.c (grays_sweep): The function didn't exit
immediately if `num_cells' was 0 as it should. Thanks to Boris for
finding this out.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixed memory leak when
bitmap rendering fails (thanks to Graham Asher).
2001-02-13 Werner Lemberg <wl@gnu.org>
@ -30,12 +50,12 @@
2001-02-13 David Turner <david.turner@freetype.org>
* docs/docmaker.py, include/freetype/*.h: Updated the DocMaker script
to support chapters and section block ordering. Updated the public
header files accordingly.
* docs/docmaker.py, include/freetype/*.h: Updated the DocMaker
script to support chapters and section block ordering. Updated the
public header files accordingly.
* src/base/ftglyph.c: fixed a bug in FT_Glyph_Copy, where the advance
and glyph format were not correctly copied..
* src/base/ftglyph.c (FT_Glyph_Copy): Advance width and glyph format
were not correctly copied.
2001-02-08 Tom Kacvinsky <tjk@ams.org>

View File

@ -1533,7 +1533,7 @@ def dump_glyph_list( file, glyph_list, adobe_extra ):
name_list = []
write( " static const char* standard_glyph_names[] =\n" )
write( " static const char* const standard_glyph_names[] =\n" )
write( " {\n" )
for name in glyph_list:
@ -1666,7 +1666,7 @@ def main():
name_list = dump_glyph_list( file, base_list, adobe_list )
# dump t1_standard_list
write( " static const char** t1_standard_glyphs = " \
write( " static const char* const * const t1_standard_glyphs = " \
+ "standard_glyph_names + " + repr( t1_bias ) + ";\n" )
write( "\n" )
write( "\n" )

View File

@ -55,72 +55,103 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************
*
* <Section>
* base_interface
*
* <Title>
* Base Interface
*
* <Abstract>
* The FreeType 2 base font interface
*
* <Description>
* This section describes the public high-level API of FreeType 2
*
* <Order>
* FT_Library FT_Face FT_Size FT_GlyphSlot FT_CharMap FT_Encoding
*
* FT_FaceRec
*
* FT_FACE_FLAG_SCALABLE
* FT_FACE_FLAG_FIXED_SIZES
* FT_FACE_FLAG_FIXED_WIDTH
* FT_FACE_FLAG_HORIZONTAL
* FT_FACE_FLAG_VERTICAL
* FT_FACE_FLAG_SFNT
* FT_FACE_FLAG_KERNING
* FT_FACE_FLAG_MULTIPLE_MASTERS
* FT_FACE_FLAG_GLYPH_NAMES
* FT_FACE_FLAG_EXTERNAL_STREAM
* FT_FACE_FLAG_FAST_GLYPHS
*
* FT_STYLE_FLAG_BOLD
* FT_STYLE_FLAG_ITALIC
*
* FT_SizeRec FT_Size_Metrics
*
* FT_GlyphSlotRec FT_Glyph_Metrics FT_SubGlyph
*
* FT_Bitmap_Size
*
* FT_Init_FreeType FT_Done_FreeType
*
* FT_New_Face FT_Done_Face FT_New_Memory_Face
* FT_Open_Face FT_Open_Args FT_Open_Flags FT_Parameter
* FT_Attach_File FT_Attach_Stream
*
* FT_Set_Char_Size FT_Set_Pixel_Sizes FT_Set_Transform
* FT_Load_Glyph FT_Get_Char_Index FT_Load_Char
*
* FT_LOAD_DEFAULT FT_LOAD_RENDER FT_LOAD_MONOCHROME
* FT_LOAD_LINEAR_DESIGN FT_LOAD_NO_SCALE FT_LOAD_NO_HINTING
* FT_LOAD_NO_BITMAP FT_LOAD_CROP_BITMAP
*
* FT_LOAD_VERTICAL_LAYOUT FT_LOAD_IGNORE_TRANSFORM
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH FT_LOAD_FORCE_AUTOHINT
* FT_LOAD_NO_RECURSE FT_LOAD_PEDANTIC
*
* FT_Render_Glyph FT_Render_Mode
* FT_Get_Kerning FT_Kerning_Mode FT_Get_Glyph_Name
*
* FT_CharMapRec FT_Select_Charmap FT_Set_Charmap
*
*/
/*************************************************************************/
/* */
/* <Section> */
/* base_interface */
/* */
/* <Title> */
/* Base Interface */
/* */
/* <Abstract> */
/* The FreeType 2 base font interface. */
/* */
/* <Description> */
/* This section describes the public high-level API of FreeType 2. */
/* */
/* <Order> */
/* FT_Library */
/* FT_Face */
/* FT_Size */
/* FT_GlyphSlot */
/* FT_CharMap */
/* FT_Encoding */
/* */
/* FT_FaceRec */
/* */
/* FT_FACE_FLAG_SCALABLE */
/* FT_FACE_FLAG_FIXED_SIZES */
/* FT_FACE_FLAG_FIXED_WIDTH */
/* FT_FACE_FLAG_HORIZONTAL */
/* FT_FACE_FLAG_VERTICAL */
/* FT_FACE_FLAG_SFNT */
/* FT_FACE_FLAG_KERNING */
/* FT_FACE_FLAG_MULTIPLE_MASTERS */
/* FT_FACE_FLAG_GLYPH_NAMES */
/* FT_FACE_FLAG_EXTERNAL_STREAM */
/* FT_FACE_FLAG_FAST_GLYPHS */
/* */
/* FT_STYLE_FLAG_BOLD */
/* FT_STYLE_FLAG_ITALIC */
/* */
/* FT_SizeRec */
/* FT_Size_Metrics */
/* */
/* FT_GlyphSlotRec */
/* FT_Glyph_Metrics */
/* FT_SubGlyph */
/* */
/* FT_Bitmap_Size */
/* */
/* FT_Init_FreeType */
/* FT_Done_FreeType */
/* */
/* FT_New_Face */
/* FT_Done_Face */
/* FT_New_Memory_Face */
/* FT_Open_Face */
/* FT_Open_Args */
/* FT_Open_Flags */
/* FT_Parameter */
/* FT_Attach_File */
/* FT_Attach_Stream */
/* */
/* FT_Set_Char_Size */
/* FT_Set_Pixel_Sizes */
/* FT_Set_Transform */
/* FT_Load_Glyph */
/* FT_Get_Char_Index */
/* FT_Load_Char */
/* */
/* FT_LOAD_DEFAULT */
/* FT_LOAD_RENDER */
/* FT_LOAD_MONOCHROME */
/* FT_LOAD_LINEAR_DESIGN */
/* FT_LOAD_NO_SCALE */
/* FT_LOAD_NO_HINTING */
/* FT_LOAD_NO_BITMAP */
/* FT_LOAD_CROP_BITMAP */
/* */
/* FT_LOAD_VERTICAL_LAYOUT */
/* FT_LOAD_IGNORE_TRANSFORM */
/* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */
/* FT_LOAD_FORCE_AUTOHINT */
/* FT_LOAD_NO_RECURSE */
/* FT_LOAD_PEDANTIC */
/* */
/* FT_Render_Glyph */
/* FT_Render_Mode */
/* FT_Get_Kerning */
/* FT_Kerning_Mode */
/* FT_Get_Glyph_Name */
/* */
/* FT_CharMapRec */
/* FT_Select_Charmap */
/* FT_Set_Charmap */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Struct> */
@ -2193,11 +2224,16 @@ FT_BEGIN_HEADER
/* computations on 16.16 fixed-float numbers or 2d vectors. */
/* */
/* <Order> */
/* FT_MulDiv FT_MulFix FT_DivFix FT_Vector_Transform */
/* FT_Matrix_Multiply FT_Matrix_Invert */
/* FT_MulDiv */
/* FT_MulFix */
/* FT_DivFix */
/* FT_Vector_Transform */
/* FT_Matrix_Multiply */
/* FT_Matrix_Invert */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Function> */

View File

@ -1,43 +1,52 @@
/*************************************************************************
*
* <Chapter> core_api
*
* <Title> Core API
*
* <Sections>
* basic_types
* base_interface
* glyph_management
* mac_specific
* multiple_masters
* truetype_tables
* type1_tables
* sfnt_names
* module_management
* system_interface
*/
/***************************************************************************/
/* */
/* <Chapter> */
/* core_api */
/* */
/* <Title> */
/* Core API */
/* */
/* <Sections> */
/* basic_types */
/* base_interface */
/* glyph_management */
/* mac_specific */
/* multiple_masters */
/* truetype_tables */
/* type1_tables */
/* sfnt_names */
/* module_management */
/* system_interface */
/* */
/***************************************************************************/
/*************************************************************************
*
* <Chapter> cache_subsystem
*
* <Title> Cache Sub-System
*
* <Sections>
* cache_subsystem
*
*/
/*************************************************************************
*
* <Chapter> support_api
*
* <Title> Support API
*
* <Sections>
* computations
* list_processing
* outline_processing
* raster
*/
/***************************************************************************/
/* */
/* <Chapter> */
/* cache_subsystem */
/* */
/* <Title> */
/* Cache Sub-System */
/* */
/* <Sections> */
/* cache_subsystem */
/* */
/***************************************************************************/
/***************************************************************************/
/* */
/* <Chapter> */
/* support_api */
/* */
/* <Title> */
/* Support API */
/* */
/* <Sections> */
/* computations */
/* list_processing */
/* outline_processing */
/* raster */
/* */
/***************************************************************************/

View File

@ -104,7 +104,6 @@ FT_BEGIN_HEADER
} FT_BBox;
/*************************************************************************/
/* */
/* <Enum> */

View File

@ -51,10 +51,19 @@ FT_BEGIN_HEADER
/* processing using doubly-linked nodes. */
/* */
/* <Order> */
/* FT_List FT_ListNode FT_ListRec FT_ListNodeRec */
/* FT_List */
/* FT_ListNode */
/* FT_ListRec */
/* FT_ListNodeRec */
/* */
/* FT_List_Add FT_List_Insert FT_List_Find FT_List_Remove FT_List_Up */
/* FT_List_Iterate FT_List_Iterator FT_List_Finalize */
/* FT_List_Add */
/* FT_List_Insert */
/* FT_List_Find */
/* FT_List_Remove */
/* FT_List_Up */
/* FT_List_Iterate */
/* FT_List_Iterator */
/* FT_List_Finalize */
/* FT_List_Destructor */
/* */
/*************************************************************************/

View File

@ -45,16 +45,26 @@ FT_BEGIN_HEADER
/* transformed, and converted into bitmaps and pixmaps. */
/* */
/* <Order> */
/* FT_Outline FT_Outline_Flags */
/* FT_Outline_New FT_Outline_Done FT_Outline_Copy */
/* FT_Outline_Translate FT_Outline_Transform FT_Outline_Reverse */
/* FT_Outline */
/* FT_Outline_Flags */
/* FT_Outline_New */
/* FT_Outline_Done */
/* FT_Outline_Copy */
/* FT_Outline_Translate */
/* FT_Outline_Transform */
/* FT_Outline_Reverse */
/* */
/* FT_Outline_Get_CBox FT_Outline_Get_BBox */
/* FT_Outline_Get_CBox */
/* FT_Outline_Get_BBox */
/* */
/* FT_Outline_Get_Bitmap FT_Outline_Render */
/* FT_Outline_Get_Bitmap */
/* FT_Outline_Render */
/* */
/* FT_Outline_Decompose FT_Outline_Funcs FT_Outline_MoveTo_Func */
/* FT_Outline_LineTo_Func FT_Outline_ConicTo_Func */
/* FT_Outline_Decompose */
/* FT_Outline_Funcs */
/* FT_Outline_MoveTo_Func */
/* FT_Outline_LineTo_Func */
/* FT_Outline_ConicTo_Func */
/* FT_Outline_CubicTo_Func */
/* */
/*************************************************************************/

View File

@ -30,32 +30,51 @@
FT_BEGIN_HEADER
/*************************************************************************
*
* <Section>
* basic_types
*
* <Title>
* Basic Types
*
* <Abstract>
* The basic data types defined by the library.
*
* <Description>
* This section contains the basic data types defined by FreeType 2,
* ranging from simple scalar types to font specific ones
*
* <Order>
* FT_Byte FT_Char FT_Int FT_UInt FT_Short FT_UShort FT_Long FT_ULong
* FT_Bool FT_Error FT_Fixed FT_Pointer FT_Pos FT_Vector FT_BBox
* FT_Matrix
*
* FT_Generic FT_Generic_Finalizer
*
* FT_Bitmap FT_Pixel_Mode FT_Palette_Mode FT_Glyph_Format FT_IMAGE_TAG
* FT_Glyph_Format
*
*/
/*************************************************************************/
/* */
/* <Section> */
/* basic_types */
/* */
/* <Title> */
/* Basic Types */
/* */
/* <Abstract> */
/* The basic data types defined by the library. */
/* */
/* <Description> */
/* This section contains the basic data types defined by FreeType 2, */
/* ranging from simple scalar types to font specific ones. */
/* */
/* <Order> */
/* FT_Byte */
/* FT_Char */
/* FT_Int */
/* FT_UInt */
/* FT_Short */
/* FT_UShort */
/* FT_Long */
/* FT_ULong */
/* FT_Bool */
/* FT_Error */
/* FT_Fixed */
/* FT_Pointer */
/* FT_Pos */
/* FT_Vector */
/* FT_BBox */
/* FT_Matrix */
/* */
/* FT_Generic */
/* FT_Generic_Finalizer */
/* */
/* FT_Bitmap */
/* FT_Pixel_Mode */
/* FT_Palette_Mode */
/* FT_Glyph_Format */
/* FT_IMAGE_TAG */
/* FT_Glyph_Format */
/* */
/*************************************************************************/
/*************************************************************************/
/* */

View File

@ -40,10 +40,6 @@
/*************************************************************************/
static int disable_horz_edges = 0;
static int disable_vert_edges = 0;
/* snap a given width in scaled coordinates to one of the */
/* current standard widths */
static
@ -214,10 +210,10 @@
int has_serifs = 0;
if ( disable_vert_edges && !dimension )
if ( hinter->disable_vert_edges && !dimension )
goto Next_Dimension;
if ( disable_horz_edges && dimension )
if ( hinter->disable_horz_edges && dimension )
goto Next_Dimension;
/* we begin by aligning all stems relative to the blue zone */
@ -381,11 +377,11 @@
FT_LOCAL_DEF
void ah_hinter_hint_edges( AH_Hinter* hinter,
int no_horz_edges,
int no_vert_edges )
FT_Bool no_horz_edges,
FT_Bool no_vert_edges )
{
disable_horz_edges = no_horz_edges;
disable_vert_edges = no_vert_edges;
hinter->disable_horz_edges = no_horz_edges;
hinter->disable_vert_edges = no_vert_edges;
/* AH_Interpolate_Blue_Edges( hinter ); -- doesn't seem to help */
/* reduce the problem of the disappearing eye in the `e' of Times... */

View File

@ -480,6 +480,8 @@ FT_BEGIN_HEADER
FT_Vector trans_delta;
FT_Matrix trans_matrix;
FT_Bool disable_horz_edges;
FT_Bool disable_vert_edges;
} AH_Hinter;

View File

@ -602,9 +602,9 @@
if ( !error )
error = FT_Render_Glyph_Internal( glyph->library, &dummy, render_mode );
if (error)
if ( error )
{
FT_Glyph_Done( FT_GLYPH(bitmap) );
FT_Done_Glyph( FT_GLYPH( bitmap ) );
goto Exit;
}

View File

@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group.
/* Utility functions for reformatting font bitmaps */
static unsigned char _reverse_byte[0x100] =
static const unsigned char _reverse_byte[0x100] =
{
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
@ -75,7 +75,7 @@ in this Software without prior written authorization from The Open Group.
void BitOrderInvert( unsigned char* buf,
int nbytes )
{
unsigned char* rev = _reverse_byte;
const unsigned char* rev = _reverse_byte;
for ( ; --nbytes >= 0; buf++ )

View File

@ -19,7 +19,7 @@
/* this file has been generated automatically -- do not edit! */
static const char* standard_glyph_names[] =
static const char* const standard_glyph_names[] =
{
".null",
"CR",
@ -1094,7 +1094,8 @@
};
static const char** t1_standard_glyphs = standard_glyph_names + 31;
static const char* const * const t1_standard_glyphs =
standard_glyph_names + 31;
#define NUM_STD_GLYPHS 391

View File

@ -297,8 +297,8 @@
metrics->horiBearingY = cbox.yMax;
}
/* set control data to the glyph charstrings. Note that this is */
/* _not_ 0 terminated.. */
/* Set control data to the glyph charstrings. Note that this is */
/* _not_ zero-terminated. */
glyph->root.control_data = type1->charstrings [glyph_index];
glyph->root.control_len = type1->charstrings_len[glyph_index];
}