* 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.
This commit is contained in:
Werner Lemberg 2006-02-15 06:05:52 +00:00
parent 3dc0018174
commit 5225402a52
15 changed files with 96 additions and 60 deletions

View File

@ -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.

View File

@ -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 */

View File

@ -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 );

View File

@ -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, */

View File

@ -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 */

View File

@ -22,6 +22,10 @@
*
*/
#include "aftypes.h"
#include "aflatin.h"
#ifdef AF_CONFIG_OPTION_CJK
#include "afcjk.h"

View File

@ -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,

View File

@ -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

View File

@ -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, */

View File

@ -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

View File

@ -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

View File

@ -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 )

View File

@ -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 )

View File

@ -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* )

View File

@ -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,