* docs/CHANGES: Updated. Minor clean-ups.
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 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
diff --git a/ChangeLog b/ChangeLog
index d06a29b..1835b5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,28 +1,61 @@
+2004-06-11 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
2004-06-10 David Turner <david@freetype.org>
- * src/base/ftobject.c, src/base/fthash.c, src/base/ftexcept.c,
- src/base/ftsysio.c, src/base/ftsysmem.c, src/base/ftlist.c:
- removing obsolete files
+ * src/base/ftobject.c, src/base/fthash.c, src/base/ftexcept.c,
+ src/base/ftsysio.c, src/base/ftsysmem.c, src/base/ftlist.c: Removed.
+ Obsolete.
+
+ * src/raster/ftraster.c (Alignment, PAlignment): New union to fix
+ problems with 64bit systems.
+ (AlignProfileSize): Use it.
2004-06-08 David Turner <david@freetype.org>
- * include/freetype/freetype.h (FT_Glyph_Metrics, FT_GlyphSlotRec),
- src/autofit/afloader.c, src/autohint/ahhint.c:
- moved the definition of 'lsb_delta' and 'rsb_delta' from FT_GlyphMetrics
- to FT_GlyphSlotRec. The old location did BREAK BINARY COMPATIBILITY
- of the library !!
+ * include/freetype/freetype.h (FT_GlyphMetrics): Move `lsb_delta'
+ and `rsb_delta' elements to...
+ (FT_GlyphSlotRec): Here to retain binary compatibility with older
+ FreeType versions.
+ Update all users.
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Remove compiler warning.
- * src/sfnt/sfobjs.c: removing compiler warning
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Add missing initialization
+ of slot->metrics.width and slot->metrics.height when loading a
+ Windows FNT glyph. Thanks to Huw Davies.
- * src/winfonts/winfnt.c: adding missing initialization of the
- slot->metrics.width and slot->metrics.height when loading a Windows
- FNT glyph. Thanks to Huw Davies
+ * include/freetype/cache/ftcmru.h (FTC_MruNode_CompareFunc): Change
+ return type to FT_Bool.
- * include/freetype/cache/ftcmru.h, src/cache/ftcbasic.c,
- src/cache/ftccache.c, src/cache/ftcglyph.c, src/cache/ftcmanag.c,
- src/cache/ftcsbits.c:
- fixing some annoying bugs and inefficiencies in the cache sub-system.
+ * src/cache/ftbasic.c (ftc_basic_family_compare): Change return
+ type to FT_Bool.
+ * src/cache/ftccache.c (FTC_Cache_Init, ftc_cache_init): Make
+ the former call the latter, not vice versa.
+ (FTC_Cache_Done, ftc_cache_done): Ditto.
+
+ * src/cache/ftcglyph.c (FTC_GNode_Compare, ftc_gnode_compare): Make
+ the former call the latter, not vice versa.
+ (FTC_GCache_Init, ftc_gcache_init): Ditto.
+ (FTC_GCache_Done, ftc_gcache_done): Ditto.
+
+ * src/cache/ftcimage.c (FTC_INode_Free, ftc_inode_free): Make the
+ former call the latter, not vice versa.
+ (FTC_INode_Weight, ftc_inode_weight): Ditto.
+
+ * src/cache/ftcmanag.c (ftc_size_node_compare,
+ ftc_size_node_compare_faceid, ftc_face_node_compare): Change return
+ type to FT_Bool.
+
+ * src/cache/ftcsbits.c (FTC_SNode_Free, ftc_snode_free): Make the
+ former call the latter, not vice versa.
+ (FTC_SNode_Weight, ftc_snode_weight): Ditto.
+ (FTC_SNode_Compare, ftc_snode_compare): Ditto.
+
+ * src/cache/ftcsbits.c: Fix some bugs and inefficiencies in the cache
+ sub-system.
2004-06-05 Werner Lemberg <wl@gnu.org>
@@ -37,6 +70,9 @@
Improve inter-letter spacing for autohinted glyphs.
+ * include/freetype/freetype.h (FT_Glyph_Metrics): Add elements
+ `lsb_delta' and `rsb_delta'.
+
* src/autohint/ahhint.c (ah_hinter_load): Set `lsb_delta' and
`rsb_delta' in slot->metrics and tune side bearings slightly.
diff --git a/docs/CHANGES b/docs/CHANGES
index 550b722..51ee2f4 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -20,11 +20,11 @@ LATEST CHANGES BETWEEN 2.1.9 and 2.1.8
and `gvar' tables; the Multiple Masters API has been slightly
extended to cope with the new functionality).
- - The `FT_Glyph_Metrics' structure has been extended: The elements
+ - The `FT_GlyphSlotRec' structure has been extended: The elements
`lsb_delta' and `rsb_delta' give the difference between hinted
and unhinted left and right side bearings if autohinting is
active. Using those values can improve the inter-letter spacing
- considerably. See the documentation of `FT_Glyph_Metrics' and
+ considerably. See the documentation of `FT_GlyphSlotRec' and
the `ftstring' demo program how to use it.
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 3e3d217..a77e004 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1468,13 +1468,13 @@ FT_BEGIN_HEADER
/* Note that the app will need to know about the */
/* image format. */
/* */
- /* lsb_delta :: */
- /* The difference between hinted and unhinted left side bearing */
- /* while autohinting is active. Zero otherwise. */
+ /* lsb_delta :: The difference between hinted and unhinted */
+ /* left side bearing while autohinting is */
+ /* active. Zero otherwise. */
/* */
- /* rsb_delta :: */
- /* The difference between hinted and unhinted right side bearing */
- /* while autohinting is active. Zero otherwise. */
+ /* rsb_delta :: The difference between hinted and unhinted */
+ /* right side bearing while autohinting is */
+ /* active. Zero otherwise. */
/* */
/* <Note> */
/* If @FT_Load_Glyph is called with default flags (see */
@@ -1496,32 +1496,32 @@ FT_BEGIN_HEADER
/* `slot->format' is also changed to `FT_GLYPH_FORMAT_BITMAP' . */
/* */
/* <Note> */
- /* Here a small pseudo code fragment which shows how to use */
- /* `lsb_delta' and `rsb_delta': */
- /* { */
- /* FT_Pos origin_x = 0; */
- /* FT_Pos prev_rsb_delta = 0; */
+ /* Here a small pseudo code fragment which shows how to use */
+ /* `lsb_delta' and `rsb_delta': */
+ /* */
+ /* { */
+ /* FT_Pos origin_x = 0; */
+ /* FT_Pos prev_rsb_delta = 0; */
/* */
/* */
- /* for all glyphs do */
- /* <compute kern between current and previous glyph and add it to */
- /* `origin_x'> */
+ /* for all glyphs do */
+ /* <compute kern between current and previous glyph and add it to */
+ /* `origin_x'> */
/* */
- /* <load glyph with `FT_Load_Glyph'> */
+ /* <load glyph with `FT_Load_Glyph'> */
/* */
- /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */
- /* origin_x -= 64; */
- /* else if */
- /* ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */
- /* origin_x += 64; */
+ /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */
+ /* origin_x -= 64; */
+ /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */
+ /* origin_x += 64; */
/* */
- /* prev_rsb_delta = face->glyph->rsb_delta; */
+ /* prev_rsb_delta = face->glyph->rsb_delta; */
/* */
- /* <save glyph image, or render glyph, or ...> */
+ /* <save glyph image, or render glyph, or ...> */
/* */
- /* origin_x += face->glyph->advance.x; */
- /* endfor */
- /* } */
+ /* origin_x += face->glyph->advance.x; */
+ /* endfor */
+ /* } */
/* */
typedef struct FT_GlyphSlotRec_
{
diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c
index e507133..1f3158e 100644
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -73,6 +73,7 @@
FTC_GQuery gquery = (FTC_GQuery)ftcgquery;
FT_UNUSED( cache );
+
return FT_BOOL( gnode->family == gquery->family &&
gnode->gindex == gquery->gindex );
}
@@ -82,7 +83,7 @@
FTC_GNode_Compare( FTC_GNode gnode,
FTC_GQuery gquery )
{
- return ftc_gnode_compare( FTC_NODE(gnode), gquery, NULL );
+ return ftc_gnode_compare( FTC_NODE( gnode ), gquery, NULL );
}
@@ -113,6 +114,7 @@
FTC_GCache cache = (FTC_GCache)ftccache;
FT_Error error;
+
error = FTC_Cache_Init( FTC_CACHE( cache ) );
if ( !error )
{
@@ -132,14 +134,7 @@
FT_EXPORT_DEF( FT_Error )
FTC_GCache_Init( FTC_GCache cache )
{
- return ftc_gcache_init( FTC_CACHE(cache) );
- }
-
-
- FT_EXPORT_DEF( void )
- FTC_GCache_Done( FTC_GCache cache )
- {
- ftc_gcache_done( FTC_CACHE(cache) );
+ return ftc_gcache_init( FTC_CACHE( cache ) );
}
@@ -154,6 +149,13 @@
}
+ FT_EXPORT_DEF( void )
+ FTC_GCache_Done( FTC_GCache cache )
+ {
+ ftc_gcache_done( FTC_CACHE( cache ) );
+ }
+
+
FT_EXPORT_DEF( FT_Error )
FTC_GCache_New( FTC_Manager manager,
FTC_GCacheClass clazz,
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index ab147a5..508ed6c 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -45,13 +45,11 @@
}
-
-
FT_EXPORT_DEF( void )
FTC_INode_Free( FTC_INode inode,
FTC_Cache cache )
{
- ftc_inode_free( FTC_NODE(inode), cache );
+ ftc_inode_free( FTC_NODE( inode ), cache );
}
@@ -108,7 +106,8 @@
FT_ULong size = 0;
FT_Glyph glyph = inode->glyph;
- FT_UNUSED(ftccache);
+ FT_UNUSED( ftccache );
+
switch ( glyph->format )
{
@@ -145,12 +144,10 @@
}
-
-
FT_EXPORT_DEF( FT_ULong )
FTC_INode_Weight( FTC_INode inode )
{
- return ftc_inode_weight( FTC_NODE(inode), NULL );
+ return ftc_inode_weight( FTC_NODE( inode ), NULL );
}
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index a19d61f..2f8c5f8 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -77,13 +77,11 @@
}
-
-
FT_EXPORT_DEF( void )
FTC_SNode_Free( FTC_SNode snode,
FTC_Cache cache )
{
- ftc_snode_free( FTC_NODE(snode), cache );
+ ftc_snode_free( FTC_NODE( snode ), cache );
}
@@ -267,6 +265,7 @@
FT_UNUSED( cache );
+
FT_ASSERT( snode->count <= FTC_SBIT_ITEMS_PER_NODE );
/* the node itself */
@@ -292,7 +291,7 @@
FT_EXPORT_DEF( FT_ULong )
FTC_SNode_Weight( FTC_SNode snode )
{
- return ftc_snode_weight( FTC_NODE(snode), NULL );
+ return ftc_snode_weight( FTC_NODE( snode ), NULL );
}
@@ -333,14 +332,12 @@
}
-
-
FT_EXPORT_DEF( FT_Bool )
FTC_SNode_Compare( FTC_SNode snode,
FTC_GQuery gquery,
FTC_Cache cache )
{
- return ftc_snode_compare( FTC_NODE(snode), gquery, cache );
+ return ftc_snode_compare( FTC_NODE( snode ), gquery, cache );
}
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 620b3d7..0ba27e8 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -251,7 +251,8 @@
typedef unsigned char Byte, *PByte;
typedef char Bool;
- typedef union
+
+ typedef union Alignment_
{
long l;
void* p;
@@ -259,6 +260,7 @@
} Alignment, *PAlignment;
+
typedef struct TPoint_
{
Long x;
@@ -321,7 +323,7 @@
#define AlignProfileSize \
- ( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( long ) )
+ ( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( long ) )
#ifdef TT_STATIC_RASTER