ref: 9cbb166d6b18585b4a63a6ef05858b6016e05d5d
parent: 0460c1d97e4f45f1b1fb1022cd6dda067d34161b
author: Werner Lemberg <[email protected]>
date: Sat Jun 22 09:35:41 EDT 2002
Minor fixes. Formatting.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,20 +1,36 @@
-2002-06-22 Roberto Alameda <[email protected]>.
+2002-06-21 Roberto Alameda <[email protected]>.
- * include/freetype/internal/t42types.h, src/base/fttype1.c,
- src/type42/t42objs.h: removed duplicate definition of T42_FaceRec
+ * include/freetype/internal/t42types.h (T42_Font): Removed since
+ it is already in t42objs.h.
+ (T42_Face): Use T1_FontRec.
-2002-06-22 Detlef W�rkner <[email protected]>
+ * src/base/fttype1.c (FT_Get_PS_Font_Info): Updated.
+ (FT_Has_PS_Glyph_Names): Check for type42 driver name also.
+ * src/type42/t42objs.h: Include FT_INTERNAL_TYPE42_TYPES_H.
+ (T42_Face): Removed since it is already in t42types.h.
- * src/pfr/pfrgload.c (pfr_glyph_load_compound): fixing a small composite
- glyph loader bug that caused accents to be misplaced in a number of
- glyphs..
+2002-06-21 Detlef W�rkner <[email protected]>
-2002-06-21 Sven Neuman <[email protected]>
+ * src/pfrgload.c (pfr_glyph_load_compound): Fix loading of composite
+ glyphs.
- * src/pfr/pfrobjs.h, src/pfr/pfrobjs.c, src/pfr/pfrload.c,
- src/pfr/pfrtypes.h: adding Kerning support to the PFR driver
+2002-06-21 Sven Neumann <[email protected]>
- * README, docs/CHANGES: preparing for the 2.1.2 release
+ * src/prf/pfrtypes.h (PFR_KernPair): New structure.
+ (PFR_PhyFont): Use it.
+ (PFR_KernFlags): New enumeration.
+ * src/pfr/pfrload.c (pfr_extra_item_load_kerning_pairs): New
+ function.
+ (pfr_phy_font_extra_items): Use it.
+ (pfr_phy_font_done): Updated.
+ * src/pfr/pfrobjs.c (pfr_face_init): Set kerning flag conditionally.
+ (pfr_face_get_kerning): New function.
+ * src/pfr/pfrobjs.h: Updated.
+ * src/pfr/pfrdrivr.c (pfr_driver_class): Updated.
+
+2002-06-21 David Turner <[email protected]>
+
+ * README, docs/CHANGES: Preparing the 2.1.2 release.
2002-06-19 Detlef W�rkner <[email protected]>
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -4,32 +4,35 @@
- Many font drivers didn't select a Unicode charmap by default when
a new face was opened (with the FT_CONFIG_OPTION_USE_CMAPS options
- enabled), and this caused many application to not be able to
- display text correctly with the 2.1.x releases
+ enabled), causing many applications to not be able to display text
+ correctly with the 2.1.x releases.
- The PFR driver had a bug in its composite loading code that produces
- incorrectly placed accents with many fonts
+ incorrectly placed accents with many fonts.
- - The Type42 driver crashed sometimes due to a nasty bug
+ - The Type42 driver crashed sometimes due to a nasty bug.
- - The Type 1 custom encoding charmap didn't handle the case were the
- first glyph index wasn't 0
+ - The Type 1 custom encoding charmap didn't handle the case where the
+ first glyph index wasn't 0.
- A serious typo in the TrueType composite loader produced incorrectly
- placed glyphs in fonts like "Wingdings" and a few others..
+ placed glyphs in fonts like "Wingdings" and a few others.
II. MISCELLANEOUS
- The Win32 Visual C++ project file has been updated to include the
- PFR driver as well
+ PFR driver as well.
- "freetype.m4" is now installed by default by "make install" on Unix
systems.
- - The "FT_Get_PS_Font_Info" now works with CID and Type42 fonts as well
+ - The function FT_Get_PS_Font_Info now works with CID and Type42 fonts
+ as well.
+
========================================================================
+
LATEST CHANGES BETWEEN 2.1.1 and 2.1.0
I. IMPORTANT BUG FIXES
--- a/include/freetype/internal/t42types.h
+++ b/include/freetype/internal/t42types.h
@@ -29,6 +29,7 @@
FT_BEGIN_HEADER
+
typedef struct T42_FaceRec_
{
FT_FaceRec root;
--- a/src/base/fttype1.c
+++ b/src/base/fttype1.c
@@ -66,8 +66,8 @@
if ( face && face->driver && face->driver->root.clazz )
{
- /* Currently, only the type1, type42 and cff drivers provide reliable */
- /* glyph names... */
+ /* Currently, only the type1, type42, and cff drivers provide */
+ /* reliable glyph names... */
/* We could probably hack the TrueType driver to recognize */
/* certain cases where the glyph names are most certainly */
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -583,8 +583,8 @@
FT_UInt format;
- x_pos = 0;
- y_pos = 0;
+ x_pos = 0;
+ y_pos = 0;
PFR_CHECK( 1 );
format = PFR_NEXT_BYTE( p );
--- a/src/pfr/pfrload.c
+++ b/src/pfr/pfrload.c
@@ -69,6 +69,7 @@
{
PFR_ExtraItem extra = item_list;
+
for ( extra = item_list; extra->parser != NULL; extra++ )
{
if ( extra->type == item_type )
@@ -506,14 +507,15 @@
FT_Byte* limit,
PFR_PhyFont phy_font )
{
- FT_Int count;
- FT_UShort base_adj;
- FT_UInt flags;
- FT_UInt num_pairs;
- PFR_KernPair pairs;
- FT_Error error = 0;
- FT_Memory memory = phy_font->memory;
+ FT_Int count;
+ FT_UShort base_adj;
+ FT_UInt flags;
+ FT_UInt num_pairs;
+ PFR_KernPair pairs;
+ FT_Error error = 0;
+ FT_Memory memory = phy_font->memory;
+
/* XXX: there may be multiple extra items for kerning */
if ( phy_font->kern_pairs != NULL )
goto Exit;
@@ -527,7 +529,7 @@
flags = PFR_NEXT_BYTE( p );
#ifndef PFR_CONFIG_NO_CHECKS
- count = 3;
+ count = 3;
if ( flags & PFR_KERN_2BYTE_CHAR )
count += 2;
@@ -573,7 +575,8 @@
Too_Short:
error = PFR_Err_Invalid_Table;
- FT_ERROR(( "pfr_extra_item_load_kerning_pairs: invalid kerning pairs table\n" ));
+ FT_ERROR(( "pfr_extra_item_load_kerning_pairs: "
+ "invalid kerning pairs table\n" ));
goto Exit;
}
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -181,8 +181,8 @@
root->charmap = root->charmaps[0];
}
- /* check if we've loaded any kerning pairs */
- if (phy_font->num_kern_pairs)
+ /* check whether we've loaded any kerning pairs */
+ if ( phy_font->num_kern_pairs )
root->face_flags |= FT_FACE_FLAG_KERNING;
}
@@ -330,9 +330,9 @@
/*************************************************************************/
/*************************************************************************/
-/* XXX: This relies on the font being spec-conformant, i.e. that the
- kerning pairs are sorted. We might want to sort it just to make
- sure */
+ /* XXX: This relies on the font being spec-conformant, i.e., that the
+ kerning pairs are sorted. We might want to sort it just to make
+ sure */
#undef PFR_KERN_INDEX
#define PFR_KERN_INDEX( g1, g2 ) ( ( (FT_ULong)g1 << 16 ) | g2 )
@@ -348,6 +348,7 @@
PFR_KernPair min, mid, max;
FT_ULong idx = PFR_KERN_INDEX( glyph1, glyph2 );
+
/* simple binary search */
min = phy_font->kern_pairs;
max = min + phy_font->num_kern_pairs;
@@ -355,6 +356,7 @@
while ( min < max )
{
FT_ULong midi;
+
mid = min + ( max - min ) / 2;
midi = PFR_KERN_INDEX( mid->glyph1, mid->glyph2 );
--- a/src/type42/t42objs.h
+++ b/src/type42/t42objs.h
@@ -31,6 +31,7 @@
FT_BEGIN_HEADER
+
/* Type42 size */
typedef struct T42_SizeRec_
{