Minor fixes. Formatting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
diff --git a/ChangeLog b/ChangeLog
index 0070c85..8af23ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,20 +1,36 @@
-2002-06-22 Roberto Alameda <ojancano@geekmail.de>.
+2002-06-21 Roberto Alameda <ojancano@geekmail.de>.
- * 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 <TetiSoft@apg.lahn.de>
+ * 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 <TetiSoft@apg.lahn.de>
-2002-06-21 Sven Neuman <sven@convergence.de>
+ * 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 <sven@convergence.de>
- * 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 <david@freetype.org>
+
+ * README, docs/CHANGES: Preparing the 2.1.2 release.
2002-06-19 Detlef Würkner <TetiSoft@apg.lahn.de>
diff --git a/docs/CHANGES b/docs/CHANGES
index 2e28555..a11c021 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -4,32 +4,35 @@ LATEST CHANGES BETWEEN 2.1.1 and 2.1.0
- 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
diff --git a/include/freetype/internal/t42types.h b/include/freetype/internal/t42types.h
index 4675331..7562252 100644
--- 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;
diff --git a/src/base/fttype1.c b/src/base/fttype1.c
index 91dda27..d8b1886 100644
--- 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 */
diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index d6b6086..a914707 100644
--- 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 );
diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c
index ec50f0a..32c2f82 100644
--- 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,13 +507,14 @@
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 )
@@ -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;
}
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 0d390e8..fc76462 100644
--- 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;
@@ -356,6 +357,7 @@
{
FT_ULong midi;
+
mid = min + ( max - min ) / 2;
midi = PFR_KERN_INDEX( mid->glyph1, mid->glyph2 );
diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h
index ae00a33..c6ce127 100644
--- a/src/type42/t42objs.h
+++ b/src/type42/t42objs.h
@@ -31,6 +31,7 @@
FT_BEGIN_HEADER
+
/* Type42 size */
typedef struct T42_SizeRec_
{