* include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in documentation that negative strength values are possible. Give an example call. * include/freetype/freetype.h (FT_GlyphSlotRec): Improve documentation of `outline' field. * src/sfnt/sfobjc.s: Inckude FT_INTERNAL_DEBUG_H. * src/sfnt/sfdriver.c: Include ttmtx.h. * src/autofit/afcjk.c: Include aftypes.h and aflatin.h.
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 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489
diff --git a/ChangeLog b/ChangeLog
index fff1dff..5a0ccee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-02-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in
+ documentation that negative strength values are possible.
+ Give an example call.
+
+ * include/freetype/freetype.h (FT_GlyphSlotRec): Improve
+ documentation of `outline' field.
+
+ * src/sfnt/sfobjc.s: Inckude FT_INTERNAL_DEBUG_H.
+ * src/sfnt/sfdriver.c: Include ttmtx.h.
+
+ * src/autofit/afcjk.c: Include aftypes.h and aflatin.h.
+
2006-02-14 Chia-I Wu <b90201047@ntu.edu.tw>
* src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
@@ -9,11 +23,11 @@
Check table length in non-FT_OPTIMIZE_MEMORY'ed `tt_face_load_hmtx'.
* src/sfnt/sfobjs.c (sfnt_load_face): Take care of missing metrics
- tables. The last change makes Mac bitmap-only font not load and this
- fixes it.
+ tables. The last change makes Mac bitmap-only font not load and
+ this fixes it.
- * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation error
- when FT_CONFIG_OPTION_INCREMENTAL is defined.
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation
+ error when FT_CONFIG_OPTION_INCREMENTAL is defined.
2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
@@ -32,10 +46,10 @@
2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
- Clean up the SFNT_Interface. In this pass, we want to treat the font
- directory (offset table and table directory) as a normal table like
- the others. This also means that TTC is no longer recognized there,
- but in `init_face'.
+ Clean up the SFNT_Interface. In this pass, we want to treat the
+ font directory (offset table and table directory) as a normal table
+ like the others. This also means that TTCs are no longer recognized
+ there but in `init_face'.
* include/freetype/internal/sfnt.h (SFNT_Interface),
src/sfnt/sfdriver.c: `load_sfnt_header' and `load_directory' are
@@ -52,9 +66,10 @@
2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
Clean up the SFNT_Interface. Table loading functions are now named
- after the tables' tags; `hdmx' is TrueType-specific and thus the code
- is moved to the truetype module; `get_metrics' is moved here from the
- truetype module so that the code can be shared with the cff module.
+ after the tables' tags; `hdmx' is TrueType-specific and thus the
+ code is moved to the truetype module; `get_metrics' is moved here
+ from the truetype module so that the code can be shared with the cff
+ module.
This pass involves no real changes. That is, the code is moved
verbatim mostly. The only exception is the return value of
@@ -65,10 +80,10 @@
src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c,
src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface.
- * src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Metrics-related tables' loading
- and parsing code is moved here.
- Move `tt_face_get_metrics' here from the truetype module. The return
- value is changed from `void' to `FT_Error'.
+ * src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: New files. Metrics-related
+ tables' loading and parsing code is moved to here.
+ Move `tt_face_get_metrics' here from the truetype module. The
+ return value is changed from `void' to `FT_Error'.
* include/freetype/internal/fttrace.h: New trace: ttmtx.
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 131a1c5..66550e8 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1428,7 +1428,10 @@ FT_BEGIN_HEADER
/* */
/* outline :: The outline descriptor for the current glyph */
/* image if its format is */
- /* FT_GLYPH_FORMAT_OUTLINE. */
+ /* FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */
+ /* loaded, `outline' can be transformed, */
+ /* distorted, embolded, etc. However, it must */
+ /* not be freed. */
/* */
/* num_subglyphs :: The number of subglyphs in a composite glyph. */
/* This field is only valid for the composite */
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index b647500..dbe8edc 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -314,6 +314,9 @@ FT_BEGIN_HEADER
/* `strength' pixels wider and higher. You may think of the left and */
/* bottom borders as unchanged. */
/* */
+ /* Negative `strength' values to reduce the outline thickness are */
+ /* possible also. */
+ /* */
/* <InOut> */
/* outline :: A handle to the target outline. */
/* */
@@ -324,6 +327,18 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
+ /* <Note> */
+ /* The used algorithm to increase or decrease the thickness of the */
+ /* glyph doesn't change the number of points; this means that certain */
+ /* situations like acute angles or intersections are sometimes */
+ /* handled incorrectly. */
+ /* */
+ /* Example call: */
+ /* */
+ /* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */
+ /* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */
+ /* FT_Outline_Embolden( &face->slot->outline, strength ); */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Embolden( FT_Outline* outline,
FT_Pos strength );
diff --git a/include/freetype/internal/fttrace.h b/include/freetype/internal/fttrace.h
index b5ebd92..81916fc 100644
--- a/include/freetype/internal/fttrace.h
+++ b/include/freetype/internal/fttrace.h
@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
-/* Copyright 2002, 2004, 2005 by */
+/* Copyright 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index e49e023..1da799f 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -34,7 +34,7 @@ FT_BEGIN_HEADER
/* TT_Init_Face_Func */
/* */
/* <Description> */
- /* First part of the SFNT face object initialization. This will find */
+ /* First part of the SFNT face object initialization. This finds */
/* the face in a SFNT file or collection, and load its format tag in */
/* face->format_tag. */
/* */
@@ -77,9 +77,9 @@ FT_BEGIN_HEADER
/* TT_Load_Face_Func */
/* */
/* <Description> */
- /* Second part of the SFNT face object initialization. This will */
- /* load the common SFNT tables (head, OS/2, maxp, metrics, etc.) in */
- /* the face object. */
+ /* Second part of the SFNT face object initialization. This loads */
+ /* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the */
+ /* face object. */
/* */
/* <Input> */
/* stream :: The input stream. */
@@ -375,8 +375,8 @@ FT_BEGIN_HEADER
/* TT_Load_Metrics_Func */
/* */
/* <Description> */
- /* Load a metrics table, which is a table comes with a horizontal */
- /* and a vertical version. */
+ /* Load a metrics table, which is a table with a horizontal and a */
+ /* vertical version. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
@@ -437,8 +437,8 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* The function will use `face->goto_table' to seek the stream to */
- /* the start of the table, except in loading font directory. */
+ /* The function uses `face->goto_table' to seek the stream to the */
+ /* start of the table, except while loading the font directory. */
/* */
typedef FT_Error
(*TT_Load_Table_Func)( TT_Face face,
@@ -504,8 +504,8 @@ FT_BEGIN_HEADER
TT_Load_Any_Func load_any;
- /* load the font directory, i.e. the offset table and */
- /* the table directory */
+ /* load the font directory, i.e., the offset table and */
+ /* the table directory */
TT_Load_Table_Func load_font_dir;
/* these functions are called by `load_face' but they can also */
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index cff98c5..d549da5 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -22,6 +22,10 @@
*
*/
+#include "aftypes.h"
+#include "aflatin.h"
+
+
#ifdef AF_CONFIG_OPTION_CJK
#include "afcjk.h"
diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk
index 24f38cb..c65f8ab 100644
--- a/src/sfnt/rules.mk
+++ b/src/sfnt/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003, 2004, 2005 by
+# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 8a8b3e8..df142a5 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -41,6 +41,7 @@
#include "ttcmap.h"
#include "ttkern.h"
+#include "ttmtx.h"
#include FT_SERVICE_GLYPH_DICT_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c
index bba25ca..45a820b 100644
--- a/src/sfnt/sfnt.c
+++ b/src/sfnt/sfnt.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 53a09dd..6c0b7fa 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -22,6 +22,7 @@
#include "ttcmap.h"
#include "ttkern.h"
#include FT_INTERNAL_SFNT_H
+#include FT_INTERNAL_DEBUG_H
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
@@ -588,7 +589,7 @@
/* No `hhea' table necessary for SFNT Mac fonts. */
if ( face->format_tag == TTAG_true )
{
- FT_TRACE2(( "This is an SFNT Mac font.\n"));
+ FT_TRACE2(( "This is an SFNT Mac font.\n" ));
error = SFNT_Err_Ok;
}
else
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index adfb0b9..db0e6bb 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -5,7 +5,7 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -259,8 +259,8 @@
/* The stream cursor must be at the beginning of the font directory. */
/* */
FT_LOCAL_DEF( FT_Error )
- tt_face_load_font_dir( TT_Face face,
- FT_Stream stream )
+ tt_face_load_font_dir( TT_Face face,
+ FT_Stream stream )
{
SFNT_HeaderRec sfnt;
FT_Error error;
@@ -294,7 +294,7 @@
/* many fonts don't have these fields set correctly */
#if 0
- if ( sfnt.search_range != 1 << ( sfnt.entry_selector + 4 ) ||
+ if ( sfnt.search_range != 1 << ( sfnt.entry_selector + 4 ) ||
sfnt.search_range + sfnt.range_shift != sfnt.num_tables << 4 )
return SFNT_Err_Unknown_File_Format;
#endif
diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h
index b665711..49a1aee 100644
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -5,7 +5,7 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2005 by */
+/* Copyright 1996-2001, 2002, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,8 +41,8 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- tt_face_load_font_dir( TT_Face face,
- FT_Stream stream );
+ tt_face_load_font_dir( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c
index 929c55d..9928f30 100644
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -140,8 +140,8 @@
face->vertical.number_Of_VMetrics = num_longs;
}
- longs = (TT_LongMetrics *)&face->vertical.long_metrics;
- shorts = (TT_ShortMetrics**)&face->vertical.short_metrics;
+ longs = (TT_LongMetrics *) &face->vertical.long_metrics;
+ shorts = (TT_ShortMetrics**)&face->vertical.short_metrics;
}
else
{
@@ -160,8 +160,8 @@
face->horizontal.number_Of_HMetrics = num_longs;
}
- longs = (TT_LongMetrics *)&face->horizontal.long_metrics;
- shorts = (TT_ShortMetrics**)&face->horizontal.short_metrics;
+ longs = (TT_LongMetrics *) &face->horizontal.long_metrics;
+ shorts = (TT_ShortMetrics**)&face->horizontal.short_metrics;
}
/* never trust derived values */
@@ -358,10 +358,6 @@
/* */
/* advance :: The advance width resp. advance height. */
/* */
- /* <Note> */
- /* This function will much probably move to another component in the */
- /* near future, but I haven't decided which yet. */
- /* */
#ifdef FT_OPTIMIZE_MEMORY
FT_LOCAL_DEF( FT_Error )
@@ -439,7 +435,7 @@
TT_HoriHeader* header = vertical ? (TT_HoriHeader*)&face->vertical
: &face->horizontal;
TT_LongMetrics longs_m;
- FT_UShort k = header->number_Of_HMetrics;
+ FT_UShort k = header->number_Of_HMetrics;
if ( k == 0 || gindex >= (FT_UInt)face->max_profile.numGlyphs )
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index a7b393c..04c2031 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -47,7 +47,7 @@
/* tt_face_load_loca */
/* */
/* <Description> */
- /* Loads the locations table. */
+ /* Load the locations table. */
/* */
/* <InOut> */
/* face :: A handle to the target face object. */
@@ -319,7 +319,7 @@
/* tt_face_load_cvt */
/* */
/* <Description> */
- /* Loads the control value table into a face object. */
+ /* Load the control value table into a face object. */
/* */
/* <InOut> */
/* face :: A handle to the target face object. */
@@ -400,7 +400,7 @@
/* tt_face_load_fpgm */
/* */
/* <Description> */
- /* Loads the font program. */
+ /* Load the font program. */
/* */
/* <InOut> */
/* face :: A handle to the target face object. */
@@ -417,8 +417,8 @@
{
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- FT_Error error;
- FT_ULong table_len;
+ FT_Error error;
+ FT_ULong table_len;
FT_TRACE2(( "Font program " ));
@@ -462,7 +462,7 @@
/* tt_face_load_prep */
/* */
/* <Description> */
- /* Loads the cvt program. */
+ /* Load the cvt program. */
/* */
/* <InOut> */
/* face :: A handle to the target face object. */
@@ -479,8 +479,8 @@
{
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- FT_Error error;
- FT_ULong table_len;
+ FT_Error error;
+ FT_ULong table_len;
FT_TRACE2(( "Prep program " ));
@@ -523,7 +523,7 @@
/* tt_face_load_hdmx */
/* */
/* <Description> */
- /* Loads the `hdmx' table into the face object. */
+ /* Load the `hdmx' table into the face object. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
@@ -699,9 +699,10 @@
#endif /* !OPTIMIZE_MEMORY */
+
/*************************************************************************/
/* */
- /* Returns the advance width table for a given pixel size if it is found */
+ /* Return the advance width table for a given pixel size if it is found */
/* in the font's `hdmx' table (if any). */
/* */
FT_LOCAL_DEF( FT_Byte* )
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 6af5279..75c0e95 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1856,9 +1856,9 @@
/* field to deal adequately with synthetic */
/* fonts; /Subrs and /CharStrings are */
/* handled specially. */
- if ( keyword_flag[0] == 0 ||
- ft_strcmp( (const char*)name, "Subrs" ) == 0 ||
- ft_strcmp( (const char*)name, "CharStrings") == 0 )
+ if ( keyword_flag[0] == 0 ||
+ ft_strcmp( (const char*)name, "Subrs" ) == 0 ||
+ ft_strcmp( (const char*)name, "CharStrings" ) == 0 )
{
parser->root.error = t1_load_keyword( face,
loader,