* src/tools/glnames.py: Updated to AGL 2.0.

* src/psnames/pstables.h: Regenerated.


* include/freetype/cache/ftcglyph.h, include/freetype/ttnameid.h,
src/base/ftcalc.c, src/base/fttrigon.c, src/cff/cffgload.c,
src/otlayout/otlgsub.c, src/pshinter/pshrec.c,
src/psnames/psmodule.c, src/sfnt/sfobjs.c, src/truetype/ttdriver.c:
Decorate constants with `U' and `L' if appropriate.

* include/freetype/ftmoderr.h: Updated to include recent module
additions.

* src/pshinter/pshnterr.h (FT_ERR_BASE): Define as
`FT_Mod_Err_PShinter'.
* src/type42/t42error.h (FT_ERR_BASE): Define as
`FT_Mod_Err_Type42'.

* src/pshinter/pshrec.h (PS_HINTS_MAGIC): Removed.  Not used.


* include/freetype/config/ftconfig.h [__MWERKS__]: Define FT_LONG64
and FT_INT64.
This commit is contained in:
Werner Lemberg 2003-06-23 19:26:53 +00:00
parent 5049b3fcec
commit 1d5cb2c4d2
20 changed files with 12055 additions and 2328 deletions

View File

@ -1,3 +1,29 @@
2003-06-23 Werner Lemberg <wl@gnu.org>
* src/tools/glnames.py: Updated to AGL 2.0.
* src/psnames/pstables.h: Regenerated.
2003-06-22 Werner Lemberg <wl@gnu.org>
* include/freetype/cache/ftcglyph.h, include/freetype/ttnameid.h,
src/base/ftcalc.c, src/base/fttrigon.c, src/cff/cffgload.c,
src/otlayout/otlgsub.c, src/pshinter/pshrec.c,
src/psnames/psmodule.c, src/sfnt/sfobjs.c, src/truetype/ttdriver.c:
Decorate constants with `U' and `L' if appropriate.
* include/freetype/ftmoderr.h: Updated to include recent module
additions.
* src/pshinter/pshnterr.h (FT_ERR_BASE): Define as
`FT_Mod_Err_PShinter'.
* src/type42/t42error.h (FT_ERR_BASE): Define as
`FT_Mod_Err_Type42'.
* src/pshinter/pshrec.h (PS_HINTS_MAGIC): Removed. Not used.
* include/freetype/config/ftconfig.h [__MWERKS__]: Define FT_LONG64
and FT_INT64.
2003-06-21 Werner Lemberg <wl@gnu.org>
* src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in

View File

@ -4,7 +4,7 @@
/* */
/* FreeType abstract glyph cache (specification). */
/* */
/* Copyright 2000-2001 by */
/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -120,10 +120,10 @@ FT_BEGIN_HEADER
FTC_GLYPH_FAMILY( gfam )->item_count )
/* compute a glyph request's hash value */
#define FTC_GLYPH_FAMILY_HASH( gfam, gindex ) \
( (FT_UFast)( \
( FTC_GLYPH_FAMILY( gfam )->hash << 16 ) | \
( FTC_GLYPH_FAMILY_CHUNK( gfam, gindex ) & 0xFFFF ) ) )
#define FTC_GLYPH_FAMILY_HASH( gfam, gindex ) \
( (FT_UFast)( \
( FTC_GLYPH_FAMILY( gfam )->hash << 16 ) | \
( FTC_GLYPH_FAMILY_CHUNK( gfam, gindex ) & 0xFFFFU ) ) )
/* must be called in an FTC_Family_CompareFunc to update the query */
/* whenever a glyph set is matched in the lookup, or when it */
@ -138,8 +138,8 @@ FT_BEGIN_HEADER
} while ( 0 )
/* retrieve glyph index of glyph node */
#define FTC_GLYPH_NODE_GINDEX( x ) \
( (FT_UInt)( FTC_GLYPH_NODE( x )->node.hash & 0xFFFF ) )
#define FTC_GLYPH_NODE_GINDEX( x ) \
( (FT_UInt)( FTC_GLYPH_NODE( x )->node.hash & 0xFFFFU ) )
/*************************************************************************/

View File

@ -180,8 +180,8 @@ FT_BEGIN_HEADER
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
/* I don't know if it provides 64-bit data types, any suggestion */
/* is welcome. */
#define FT_LONG64
#define FT_INT64 long long int
#elif defined( __GNUC__ )

View File

@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
/* Copyright 2001, 2002 by */
/* Copyright 2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -23,8 +23,8 @@
/* The lower byte gives the error code, the higher byte gives the */
/* module. The base module has error offset 0. For example, the error */
/* `FT_Err_Invalid_File_Format' has value 0x003, the error */
/* `TT_Err_Invalid_File_Format' has value 0xB03, the error */
/* `T1_Err_Invalid_File_Format' has value 0xC03, etc. */
/* `TT_Err_Invalid_File_Format' has value 0xF03, the error */
/* `T1_Err_Invalid_File_Format' has value 0x1003, etc. */
/* */
/* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
/* to make the higher byte always zero (disabling the module error */
@ -102,21 +102,25 @@
#endif
FT_MODERRDEF( Base, 0x000, "base module" )
FT_MODERRDEF( Autohint, 0x100, "autohinter module" )
FT_MODERRDEF( Cache, 0x200, "cache module" )
FT_MODERRDEF( CFF, 0x300, "CFF module" )
FT_MODERRDEF( CID, 0x400, "CID module" )
FT_MODERRDEF( PCF, 0x500, "PCF module" )
FT_MODERRDEF( PSaux, 0x600, "PS auxiliary module" )
FT_MODERRDEF( PSnames, 0x700, "PS names module" )
FT_MODERRDEF( Raster, 0x800, "raster module" )
FT_MODERRDEF( SFNT, 0x900, "SFNT module" )
FT_MODERRDEF( Smooth, 0xA00, "smooth raster module" )
FT_MODERRDEF( TrueType, 0xB00, "TrueType module" )
FT_MODERRDEF( Type1, 0xC00, "Type 1 module" )
FT_MODERRDEF( Winfonts, 0xD00, "Windows FON/FNT module" )
FT_MODERRDEF( PFR, 0xE00, "PFR module" )
FT_MODERRDEF( Base, 0x000, "base module" )
FT_MODERRDEF( Autohint, 0x100, "autohinter module" )
FT_MODERRDEF( BDF, 0x200, "BDF module" )
FT_MODERRDEF( Cache, 0x300, "cache module" )
FT_MODERRDEF( CFF, 0x400, "CFF module" )
FT_MODERRDEF( CID, 0x500, "CID module" )
FT_MODERRDEF( Gzip, 0x600, "Gzip module" )
FT_MODERRDEF( PCF, 0x700, "PCF module" )
FT_MODERRDEF( PFR, 0x800, "PFR module" )
FT_MODERRDEF( PSaux, 0x900, "PS auxiliary module" )
FT_MODERRDEF( PShinter, 0xA00, "PS hinter module" )
FT_MODERRDEF( PSnames, 0xB00, "PS names module" )
FT_MODERRDEF( Raster, 0xC00, "raster module" )
FT_MODERRDEF( SFNT, 0xD00, "SFNT module" )
FT_MODERRDEF( Smooth, 0xE00, "smooth raster module" )
FT_MODERRDEF( TrueType, 0xF00, "TrueType module" )
FT_MODERRDEF( Type1, 0x1000, "Type 1 module" )
FT_MODERRDEF( Type42, 0x1100, "Type 42 module" )
FT_MODERRDEF( Winfonts, 0x1200, "Windows FON/FNT module" )
#ifdef FT_MODERR_END_LIST

View File

@ -705,8 +705,8 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a
/* The following two IDs blatantly violate MS specs by using a */
/* sublanguage > 0x1F. */
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40a
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40c
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c
#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c

View File

@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (body). */
/* */
/* Copyright 1996-2001, 2002 by */
/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -168,7 +168,7 @@
if ( a < 0 ) { a = -a; s = -1; }
if ( b < 0 ) { b = -b; s = -s; }
c = (FT_Long)( ( (FT_Int64)a * b + 0x8000 ) >> 16 );
c = (FT_Long)( ( (FT_Int64)a * b + 0x8000L ) >> 16 );
return ( s > 0 ) ? c : -c ;
}
@ -346,15 +346,15 @@
if ( ua <= 2048 && ub <= 1048576L )
{
ua = ( ua * ub + 0x8000 ) >> 16;
ua = ( ua * ub + 0x8000L ) >> 16;
}
else
{
FT_ULong al = ua & 0xFFFF;
FT_ULong al = ua & 0xFFFFL;
ua = ( ua >> 16 ) * ub + al * ( ub >> 16 ) +
( ( al * ( ub & 0xFFFF ) + 0x8000 ) >> 16 );
( ( al * ( ub & 0xFFFFL ) + 0x8000L ) >> 16 );
}
return ( s < 0 ? -(FT_Long)ua : (FT_Long)ua );

View File

@ -71,10 +71,10 @@
val = ( val >= 0 ) ? val : -val;
v1 = (FT_UInt32)val >> 16;
v2 = (FT_UInt32)val & 0xFFFF;
v2 = (FT_UInt32)val & 0xFFFFL;
k1 = FT_TRIG_SCALE >> 16; /* constant */
k2 = FT_TRIG_SCALE & 0xFFFF; /* constant */
k2 = FT_TRIG_SCALE & 0xFFFFL; /* constant */
hi = k1 * v1;
lo1 = k1 * v2 + k2 * v1; /* can't overflow */

View File

@ -817,7 +817,7 @@
seed = (FT_Fixed)(char*)&seed ^
(FT_Fixed)(char*)&decoder ^
(FT_Fixed)(char*)&charstring_base;
seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFF;
seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
if ( seed == 0 )
seed = 0x7384;
@ -902,7 +902,7 @@
*decoder->top++ = val;
#ifdef FT_DEBUG_LEVEL_TRACE
if ( !( val & 0xFFFF ) )
if ( !( val & 0xFFFFL ) )
FT_TRACE4(( " %d", (FT_Int32)( val >> 16 ) ));
else
FT_TRACE4(( " %.2f", val / 65536.0 ));
@ -1823,7 +1823,7 @@
FT_TRACE4(( " rand" ));
Rand = seed;
if ( Rand >= 0x8000 )
if ( Rand >= 0x8000L )
Rand++;
args[0] = Rand;

View File

@ -87,7 +87,7 @@
OTL_Int index;
OTL_Bool subst = 0;
if ( parser->context_len != 0xFFFF && parser->context_len < 1 )
if ( parser->context_len != 0xFFFFU && parser->context_len < 1 )
goto Exit;
gindex = otl_parser_get_gindex( parser );
@ -107,7 +107,7 @@
{
OTL_Int delta = OTL_NEXT_SHORT(p);
gindex = ( gindex + delta ) & 0xFFFF;
gindex = ( gindex + delta ) & 0xFFFFU;
otl_parser_replace_1( parser, gindex );
subst = 1;
}
@ -223,7 +223,7 @@
OTL_Int index;
OTL_Bool subst = 0;
if ( context_len != 0xFFFF && context_len < 1 )
if ( context_len != 0xFFFFU && context_len < 1 )
goto Exit;
gindex = otl_parser_get_gindex( parser );
@ -341,7 +341,7 @@
OTL_GSUB_Alternate alternate = parser->alternate;
if ( context_len != 0xFFFF && context_len < 1 )
if ( context_len != 0xFFFFU && context_len < 1 )
goto Exit;
if ( alternate == NULL )

View File

@ -1,6 +1,6 @@
/***************************************************************************/
/* */
/* ciderrs.h */
/* pshnterr.h */
/* */
/* PS Hinter error codes (specification only). */
/* */
@ -30,7 +30,7 @@
#undef __FTERRORS_H__
#define FT_ERR_PREFIX PSH_Err_
#define FT_ERR_BASE FT_Mod_Err_PSH
#define FT_ERR_BASE FT_Mod_Err_PShinter
#include FT_ERRORS_H

View File

@ -1184,7 +1184,7 @@
for ( n = 0; n < count * 2; n++ )
{
y += coords[n];
stems[n] = ( y + 0x8000 ) >> 16;
stems[n] = ( y + 0x8000L ) >> 16;
}
/* compute lengths */

View File

@ -125,10 +125,6 @@ FT_BEGIN_HEADER
} PS_DimensionRec, *PS_Dimension;
/* magic value used within PS_HintsRec */
#define PS_HINTS_MAGIC 0x68696e74 /* "hint" */
/* glyph hints descriptor */
/* dimension 0 => X coordinates + vertical hints/stems */
/* dimension 1 => Y coordinates + horizontal hints/stems */

View File

@ -207,7 +207,7 @@
{
uni_char = ps_unicode_value( gname );
if ( uni_char != 0 && uni_char != 0xFFFF )
if ( uni_char != 0 && uni_char != 0xFFFFL )
{
map->unicode = (FT_UInt)uni_char;
map->glyph_index = n;
@ -268,7 +268,7 @@
max = mid - 1;
}
return 0xFFFF;
return 0xFFFFU;
}

File diff suppressed because it is too large Load Diff

View File

@ -558,7 +558,7 @@
/* Compute style flags. */
/* */
flags = 0;
if ( has_outline == TRUE && face->os2.version != 0xFFFF )
if ( has_outline == TRUE && face->os2.version != 0xFFFFU )
{
/* we have an OS/2 table; use the `fsSelection' field */
if ( face->os2.fsSelection & 1 )
@ -719,7 +719,7 @@
/* some fonts have the OS/2 "sTypoAscender", "sTypoDescender" & */
/* "sTypoLineGap" fields set to 0, like ARIALNB.TTF */
if ( face->os2.version != 0xFFFF && root->ascender )
if ( face->os2.version != 0xFFFFU && root->ascender )
{
FT_Int height;

View File

@ -635,7 +635,7 @@
for ( i = 0; i < face->num_sbit_strikes; i++ )
{
if ( ( face->sbit_strikes[i].y_ppem == y_ppem ) &&
if ( ( face->sbit_strikes[i].y_ppem == y_ppem ) &&
( ( x_ppem == 0 ) ||
( face->sbit_strikes[i].x_ppem == x_ppem ) ) )
{

File diff suppressed because it is too large Load Diff

View File

@ -226,7 +226,7 @@
size->ttmetrics.valid = FALSE;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
size->strike_index = 0xFFFF;
size->strike_index = 0xFFFFU;
#endif
return tt_size_reset( size );
@ -256,7 +256,7 @@
size->metrics = size->root.metrics;
size->ttmetrics.valid = FALSE;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
size->strike_index = 0xFFFF;
size->strike_index = 0xFFFFU;
#endif
return tt_size_reset( size );

View File

@ -728,32 +728,31 @@
sbit_metrics = &size->strike_metrics;
error = sfnt->set_sbit_strike(face,
metrics->x_ppem, metrics->y_ppem,
&strike_index);
error = sfnt->set_sbit_strike( face,
metrics->x_ppem, metrics->y_ppem,
&strike_index );
if ( !error )
{
TT_SBit_Strike strike = face->sbit_strikes + strike_index;
sbit_metrics->x_ppem = metrics->x_ppem;
sbit_metrics->y_ppem = metrics->y_ppem;
sbit_metrics->x_ppem = metrics->x_ppem;
sbit_metrics->y_ppem = metrics->y_ppem;
#if 0
/*
* sbit_metrics->?_scale
* are not used now.
*/
sbit_metrics->x_scale = 1 << 16;
sbit_metrics->y_scale = 1 << 16;
sbit_metrics->x_scale = 1 << 16;
sbit_metrics->y_scale = 1 << 16;
#endif
sbit_metrics->ascender = strike->hori.ascender << 6;
sbit_metrics->descender = strike->hori.descender << 6;
sbit_metrics->ascender = strike->hori.ascender << 6;
sbit_metrics->descender = strike->hori.descender << 6;
/* XXX: Is this correct? */
sbit_metrics->height = sbit_metrics->ascender -
sbit_metrics->descender;
sbit_metrics->height = sbit_metrics->ascender - sbit_metrics->descender;
/* XXX: Is this correct? */
sbit_metrics->max_advance = ( strike->hori.min_origin_SB +

View File

@ -4,7 +4,7 @@
/* */
/* Type 42 error codes (specification only). */
/* */
/* Copyright 2002 by */
/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -30,7 +30,7 @@
#undef __FTERRORS_H__
#define FT_ERR_PREFIX T42_Err_
#define FT_ERR_BASE FT_Mod_Err_T42
#define FT_ERR_BASE FT_Mod_Err_Type42
#include FT_ERRORS_H