Formatting. Fixing some tracing messages.

This commit is contained in:
Werner Lemberg 2000-07-03 07:09:09 +00:00
parent 5811c7c3a5
commit 768c9561f6
8 changed files with 1086 additions and 1028 deletions

View File

@ -262,6 +262,7 @@
mid = min + ( max - min ) / 2;
midi = KERN_INDEX( mid->glyph1, mid->glyph2 );
if ( midi == index )
{
*kerning = mid->kerning;

View File

@ -172,6 +172,7 @@
return T1_Reset_Size( size );
}
/*************************************************************************/
/* */
/* <Function> */
@ -195,6 +196,7 @@
FT_UInt result = 0;
PSNames_Interface* psnames;
face = (T1_Face)charmap->face;
psnames = (PSNames_Interface*)face->psnames;
if ( psnames )
@ -205,7 +207,7 @@
/* Unicode encoding support */
/* */
case ft_encoding_unicode:
/* use the `psnames' module to synthetize the Unicode charmap */
/* use the `PSNames' module to synthetize the Unicode charmap */
result = psnames->lookup_unicode( &face->unicode_map,
(FT_ULong)charcode );

View File

@ -278,7 +278,8 @@
if ( bchar_index < 0 || achar_index < 0 )
{
FT_ERROR(( "t1operator_seac: invalid seac character code arguments\n" ));
FT_ERROR(( "t1operator_seac:" ));
FT_ERROR(( " invalid seac character code arguments\n" ));
return T1_Err_Syntax_Error;
}
@ -371,6 +372,7 @@
dummy.n_points = base->n_points - n_base_points;
dummy.points = base->points + n_base_points;
FT_Outline_Translate( &dummy, adx - asb, ady );
}
@ -481,7 +483,8 @@
T1_Builder_Funcs* builds = &builder->funcs;
T1_Hinter_Funcs* hints = &decoder->hinter;
static const FT_Int args_count[op_max] =
static
const FT_Int args_count[op_max] =
{
0, /* none */
0, /* endchar */
@ -656,7 +659,8 @@
{
if ( ++ip > limit )
{
FT_ERROR(( "T1_Parse_CharStrings: unexpected EOF in integer\n" ));
FT_ERROR(( "T1_Parse_CharStrings:" ));
FT_ERROR(( " unexpected EOF in integer\n" ));
goto Syntax_Error;
}
@ -674,7 +678,7 @@
}
}
/* push value if needed */
/* push value if necessary */
if ( op == op_none )
{
if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )
@ -777,8 +781,8 @@
if ( ip[0] != 12 || ip[1] != 17 )
{
FT_ERROR(( "T1_Parse_CharStrings: `pop' expected, found (%d %d)\n",
ip[0], ip[1] ));
FT_ERROR(( "T1_Parse_CharStrings:" ));
FT_ERROR(( " `pop' expected, found (%d %d)\n", ip[0], ip[1] ));
goto Syntax_Error;
}
@ -966,7 +970,8 @@
break;
case op_setcurrentpoint:
FT_ERROR(( "T1_Parse_CharStrings: unexpected `setcurrentpoint'\n" ));
FT_ERROR(( "T1_Parse_CharStrings:" ));
FT_ERROR(( " unexpected `setcurrentpoint'\n" ));
goto Syntax_Error;
break;
@ -1224,6 +1229,7 @@
*point++ = *source_point--;
*tags++ = *source_tags--;
num_points--;
} while ( num_points > 0 );
}
@ -1237,6 +1243,7 @@
{
FT_Outline* cur = builder->current;
/* XXXX: We must not include the last point in the path if it */
/* is located on the first point. */
if ( cur->n_points > 1 )
@ -1261,7 +1268,7 @@
cur->contours[cur->n_contours - 1] = cur->n_points - 1;
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
/* hint latest points if needed -- this is not strictly required */
/* hint last points if necessary -- this is not strictly required */
/* there, but it helps for debugging, and doesn't affect performance */
if ( builder->pass == 1 )
T1_Hint_Points( builder );
@ -1526,7 +1533,7 @@
FT_Error error;
/* Pass 1 - try to load first glyph, simply recording points */
/* Pass 1 -- try to load first glyph, simply recording points */
old_points = loader->base.outline.n_points;
old_contours = loader->base.outline.n_contours;
@ -1611,7 +1618,7 @@
builder->base->n_points = old_points;
builder->base->n_contours = old_contours;
/* Pass 2 - record and scale/hint the points */
/* Pass 2 -- record and scale/hint the points */
T1_Reset_Builder( builder, 0 );
builder->pass = 1;
@ -1634,7 +1641,7 @@
}
#endif /* T1_CONFIG_OPTION_DISABLE_HINTER */
#endif /* !T1_CONFIG_OPTION_DISABLE_HINTER */
LOCAL_FUNC
@ -1677,7 +1684,7 @@
}
else
#endif /* T1_CONFIG_OPTION_DISABLE_HINTER */
#endif /* !T1_CONFIG_OPTION_DISABLE_HINTER */
{
T1_Init_Decoder( &decoder, &gload_hinter_interface );
@ -1771,6 +1778,7 @@
FT_Fixed x_scale = glyph->x_scale;
FT_Fixed y_scale = glyph->y_scale;
/* First of all, scale the points */
for ( n = cur->n_points; n > 0; n--, vec++ )
{

View File

@ -76,7 +76,6 @@
} T1_Builder_Funcs;
/*************************************************************************/
/* */
/* <Structure> */
@ -203,7 +202,6 @@
} T1_Hinter_Funcs;
typedef enum T1_Operator_
{
op_none = 0,

View File

@ -80,6 +80,7 @@
swap = cur[-2]; cur[-2] = cur[0]; cur[0] = swap;
swap = cur[-1]; cur[-1] = cur[1]; cur[1] = swap;
cur -= 2;
} while ( cur > blues );
}
}
@ -658,7 +659,7 @@
max = min;
}
/* now scan the array. If we find a stem with the same borders */
/* Now scan the array. If we find a stem with the same borders */
/* simply activate it. */
cur_stem = stems;
new_stem = 1;
@ -679,7 +680,7 @@
}
}
/* add a new stem to the array when necessary */
/* add a new stem to the array if necessary */
if ( new_stem )
{
if ( cur_stem >= stems + T1_HINTER_MAX_EDGES )
@ -701,7 +702,8 @@
}
else
{
FT_ERROR(( "t1_hinter_stem: fatal glyph loader bug - pass2-stem\n" ));
FT_ERROR(( "t1_hinter_stem:" ));
FT_ERROR(( " fatal glyph loader bug -- pass2-stem\n" ));
return T1_Err_Syntax_Error;
}
}
@ -815,7 +817,7 @@
sort[num_active++] = n;
}
/* now sort the indices. There are usually very few stems, */
/* Now sort the indices. There are usually very few stems, */
/* and they are pre-sorted in 90% cases, so we choose a */
/* simple bubble sort (quicksort would be slower). */
for ( n = 1; n < num_active; n++ )
@ -841,6 +843,7 @@
sort[p ] = sort[p + 1];
sort[p + 1] = swap;
p--;
} while ( p >= 0 );
}
@ -1050,8 +1053,7 @@
break;
default: /* no alignment */
/* XXXX TODO: Add management of controlled stems */
/* XXX TODO: Add management of controlled stems */
bottom = ( SCALE( bottom_orus + top_orus ) - width_pix ) / 2;
bottom_pix = ROUND( bottom );
@ -1150,7 +1152,7 @@
/* now place the snapped and rounded stem */
/* XXXX TODO: implement controlled stems for the overlapping */
/* XXX TODO: implement controlled stems for the overlapping */
/* cases */
left = ( SCALE( stem_left + stem_right ) - width_pix ) / 2;
@ -1253,8 +1255,6 @@
}
#if 1
/*************************************************************************/
/* */
/* <Function> */
@ -1333,7 +1333,5 @@
scale_x );
}
#endif /* 1 */
/* END */

View File

@ -97,8 +97,8 @@
/* hint_flags :: Some flags describing the stem properties. */
/* */
/* <Note> */
/* The min and max edges of a ghost stem have the same position, */
/* even if they are coded in a weird way in the charstrings. */
/* The min and max edges of a ghost stem have the same position, even */
/* if they are coded in a weird way in the charstrings. */
/* */
typedef struct T1_Stem_Hint_
{

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,20 @@
/*******************************************************************
*
* t1load.h 1.0
*
* Type1 Loader.
*
* Copyright 1996-1998 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used
* modified and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
******************************************************************/
/***************************************************************************/
/* */
/* t1load.h */
/* */
/* Type 1 font loader (specification). */
/* */
/* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef T1LOAD_H
#define T1LOAD_H
@ -25,39 +26,12 @@
extern "C" {
#endif
/*************************************************************************/
/* */
/* <Function> Init_T1_Parser */
/* */
/* <Description> */
/* Initialise a given parser object to build a given T1_Face */
/* */
/* <Input> */
/* parser :: handle to the newly built parser object */
/* face :: handle to target T1 face object */
/* */
LOCAL_DEF
void Init_T1_Parser( T1_Parser* parser,
T1_Face face,
T1_Tokenizer tokenizer );
/*************************************************************************/
/* */
/* <Function> Parse_T1_FontProgram */
/* */
/* <Description> */
/* Parses a given Type 1 font file and builds its face object */
/* */
/* <Input> */
/* parser :: handle to target parser object */
/* */
/* <Return> */
/* Error code. 0 means success.. */
/* */
/* <Note> */
/* The parser contains a handle to the target face object. */
/* */
LOCAL_DEF
FT_Error Parse_T1_FontProgram( T1_Parser* parser );