various improvements for 2.1.4. see ChangeLog, I've got problems with

copy & paste on my desktop !!
This commit is contained in:
David Turner 2003-01-30 23:24:18 +00:00
parent 06fa55c892
commit 7ca3b5e304
19 changed files with 219 additions and 131 deletions

View File

@ -1,8 +1,28 @@
2002-11-18 David Turner <david@freetype.org>
2002-01-31 David Turner <david@freetype.org>
* src/gzip/adler32.c, src/gzip/ftgzip.c, src/gzip/infblock.c,
src/gzip/infcodes.c, src/gzip/inflate.c, src/gzip/inftrees.c,
src/gzip/infutil.c: removed old-style (K&R)function definitions. This
avoids warnings with Visual C++ at its most pedantic mode.
* Version 2.1.4 is released.
============================
* src/pfr/pfrsbit.c: removed compiler warnings
* src/cache/ftccmap.c: changed a FT_ERROR into a FT_TRACE1 since the
it caused "ftview" and others to dump too much junk when trying to
display a waterfall with a font without a Unicode charmap (e.g.
SYMBOL.TTF)
* src/autohint/ahtypes.h, src/autohint/ahhint.c, src/base/ftobjs.c,
src/truetype/ttobjs.c: implemented FT_CONFIG_CHESTER_BLUE_SCALE,
corresponding to the last patch from David Chester, but with a
much simpler (and saner) implementation.
* src/pshinter/pshalgo3.c: improved the Postscript hinter. Getting rid
of stem snapping seems to work well here (though the stems are still
slightly moved to increase contrast).
THIS IMPROVES ANTI-ALIASED RENDERING, BUT MONOCHROME AND LCD MODES
STILL SUCK... I need to work this a bit
2003-01-22 David Chester <davidchester@qmx.net>

View File

@ -65,7 +65,6 @@ FT2_COMPONENTS ?= gzip # support for gzip-compressed files.
base # base component (public APIs)
bdf # BDF font driver
cache # cache sub-system
ccg # Chinese Character Generator font driver
cff # CFF/CEF font driver
cid # Postscript CID-keyed font driver
pcf # PCF font driver
@ -101,7 +100,10 @@ if $(DEBUG_HINTER)
# We need "freetype2/include" in the current include path in order to
# compile any part of FreeType 2.
#
SubDirHdr += $(FT2_INCLUDE) ;
HDRS += $(FT2_INCLUDE) ;
#SubDirHdr += $(FT2_INCLUDE) ;
# Uncomment the following line if you want to build individual source files
# for each FreeType 2 module.

View File

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211MT_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211MT.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@ -152,7 +152,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype211ST.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype214ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@ -178,7 +178,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211ST_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214ST_D.lib"
!ENDIF
@ -231,6 +231,10 @@ SOURCE=..\..\..\src\base\ftglyph.c
# End Source File
# Begin Source File
SOURCE=..\..\..\src\gzip\ftgzip.c
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftinit.c
# SUBTRACT CPP /Fr
# End Source File

View File

@ -258,8 +258,8 @@ FT_BEGIN_HEADER
/* */
/* Don't define any of these macros to compile in `release' mode! */
/* */
#define FT_DEBUG_LEVEL_ERROR
#define FT_DEBUG_LEVEL_TRACE
/* #define FT_DEBUG_LEVEL_ERROR */
/* #define FT_DEBUG_LEVEL_TRACE */
/*************************************************************************/
@ -469,6 +469,13 @@ FT_BEGIN_HEADER
/* */
/*
* the FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
* improvements to the auto-hinter contributed by David Chester. They will
* most likely disappear completely in the next release. For now, you should
* always keep them defined
*
*/
#define FT_CONFIG_OPTION_CHESTER_HINTS
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
@ -477,6 +484,7 @@ FT_BEGIN_HEADER
# define FT_CONFIG_CHESTER_ASCENDER
# define FT_CONFIG_CHESTER_SERIF
# define FT_CONFIG_CHESTER_STEM
# define FT_CONFIG_CHESTER_BLUE_SCALE
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */

View File

@ -1310,8 +1310,8 @@
FT_Face face = hinter->face;
FT_GlyphSlot slot = face->glyph;
FT_Slot_Internal internal = slot->internal;
FT_Fixed x_scale = face->size->metrics.x_scale;
FT_Fixed y_scale = face->size->metrics.y_scale;
FT_Fixed x_scale = hinter->globals->x_scale;
FT_Fixed y_scale = hinter->globals->y_scale;
FT_Error error;
AH_Outline outline = hinter->glyph;
AH_Loader gloader = hinter->loader;
@ -1659,6 +1659,36 @@
}
#ifdef FT_CONFIG_CHESTER_BLUE_SCALE
/* try to optimize the y_scale so that the top of non-capital letters
* is aligned on a pixel boundary whenever possible
*/
{
AH_Globals design = &face_globals->design;
FT_Pos shoot = design->blue_shoots[ AH_BLUE_SMALL_TOP ];
/* the value of 'shoot' will be -1000 if the font doesn't have */
/* small latin letters; we simply check the sign here... */
if ( shoot > 0 )
{
FT_Pos scaled = FT_MulFix( shoot, y_scale );
FT_Pos fitted = ( scaled + 32 ) & -64;
if ( scaled != fitted )
{
/* adjust y_scale
*/
y_scale = FT_MulDiv( y_scale, fitted, scaled );
/* adust x_scale
*/
if ( fitted < scaled )
x_scale -= x_scale/50; /* x_scale*0.98 with integers */
}
}
}
#endif /* FT_CONFIG_CHESTER_BLUE_SCALE */
/* now, we must check the current character pixel size to see if we */
/* need to rescale the global metrics */
if ( face_globals->x_scale != x_scale ||
@ -1668,8 +1698,8 @@
ah_loader_rewind( hinter->loader );
/* reset hinting flags according to load flags and current render target */
hinter->do_horz_hints = !FT_BOOL( load_flags & FT_LOAD_NO_AUTOHINT );
hinter->do_vert_hints = !FT_BOOL( load_flags & FT_LOAD_NO_AUTOHINT );
hinter->do_horz_hints = FT_BOOL( !(load_flags & FT_LOAD_NO_AUTOHINT) );
hinter->do_vert_hints = FT_BOOL( !(load_flags & FT_LOAD_NO_AUTOHINT) );
#ifdef DEBUG_HINTER
hinter->do_horz_hints = !ah_debug_disable_vert; /* not a bug, the meaning */

View File

@ -476,12 +476,12 @@ FT_BEGIN_HEADER
/* */
typedef struct AH_Face_GlobalsRec_
{
FT_Face face;
FT_Face face;
AH_GlobalsRec design;
AH_GlobalsRec scaled;
FT_Fixed x_scale;
FT_Fixed y_scale;
FT_Bool control_overshoot;
FT_Fixed x_scale;
FT_Fixed y_scale;
FT_Bool control_overshoot;
} AH_Face_GlobalsRec, *AH_Face_Globals;

View File

@ -1387,11 +1387,19 @@
char_height = 1 * 64;
/* Compute pixel sizes in 26.6 units */
#ifdef FT_CONFIG_CHESTER_BLUE_SCALE
dim_x = ( char_width * horz_resolution ) / 72;
dim_y = ( char_height * vert_resolution ) / 72;
metrics->x_ppem = (FT_UShort)( (dim_x+32) >> 6 );
metrics->y_ppem = (FT_UShort)( (dim_y+32) >> 6 );
#else
dim_x = ( ( ( char_width * horz_resolution ) / 72 ) + 32 ) & -64;
dim_y = ( ( ( char_height * vert_resolution ) / 72 ) + 32 ) & -64;
metrics->x_ppem = (FT_UShort)( dim_x >> 6 );
metrics->y_ppem = (FT_UShort)( dim_y >> 6 );
#endif
metrics->x_scale = 0x10000L;
metrics->y_scale = 0x10000L;

4
src/cache/ftccmap.c vendored
View File

@ -131,7 +131,7 @@
ftc_cmap_node_weight( FTC_CMapNode cnode )
{
FT_UNUSED( cnode );
return sizeof ( *cnode );
}
@ -227,7 +227,7 @@
return error;
Bad_Descriptor:
FT_ERROR(( "ftp_cmap_family_init: invalid charmap descriptor\n" ));
FT_TRACE1(( "ftp_cmap_family_init: invalid charmap descriptor\n" ));
return FTC_Err_Invalid_Argument;
}

View File

@ -1538,10 +1538,10 @@
{
if ( FT_FRAME_ENTER( ( num_glyphs - 1 ) * 2 ) )
goto Exit;
for ( j = 1; j < num_glyphs; j++ )
charset->sids[j] = FT_GET_USHORT();
FT_FRAME_EXIT();
}
break;
@ -1748,7 +1748,7 @@
case 0:
{
FT_Byte* p;
/* by convention, GID 0 is always ".notdef" and is never */
/* coded in the font. Hence, the number of codes found */
/* in the table is 'count+1' */
@ -1759,7 +1759,7 @@
goto Exit;
p = (FT_Byte*)stream->cursor;
for ( j = 1; j <= count; j++ )
{
glyph_code = *p++;
@ -1774,7 +1774,7 @@
encoding->sids[glyph_code] = charset->sids[j];
}
}
FT_FRAME_EXIT();
}
break;
@ -1801,11 +1801,11 @@
/* Increment nleft, so we read `nleft + 1' codes/sids. */
nleft++;
/* compute max number of character codes */
if ( nleft > encoding->count )
if ( (FT_UInt)nleft > encoding->count )
encoding->count = nleft;
/* Fill in the range of codes/sids. */
for ( k = i; k < nleft + i; k++, glyph_code++ )
{
@ -1820,7 +1820,7 @@
}
}
}
/* simple check, one never knows what can be found in a font */
if ( encoding->count > 256 )
encoding->count = 256;
@ -1896,7 +1896,7 @@
Populate:
/* Construct code to GID mapping from code to SID mapping */
/* and charset. */
encoding->count = 0;
@ -1921,7 +1921,7 @@
else
{
encoding->codes[j] = (FT_UShort)i;
/* update encoding count */
if ( encoding->count < j+1 )
encoding->count = j+1;

View File

@ -18,10 +18,10 @@
#define DO16(buf) DO8(buf,0); DO8(buf,8);
/* ========================================================================= */
ZEXPORT(uLong) adler32(adler, buf, len)
uLong adler;
const Bytef *buf;
uInt len;
ZEXPORT(uLong) adler32( /* adler, buf, len) */
uLong adler,
const Bytef *buf,
uInt len )
{
unsigned long s1 = adler & 0xffff;
unsigned long s2 = (adler >> 16) & 0xffff;

View File

@ -96,10 +96,10 @@
#ifndef FT_CONFIG_OPTION_SYSTEM_ZLIB
local voidpf
zcalloc (opaque, items, size)
voidpf opaque;
unsigned items;
unsigned size;
zcalloc ( /* opaque, items, size) */
voidpf opaque,
unsigned items,
unsigned size )
{
return ft_gzip_alloc( opaque, items, size );
}

View File

@ -64,10 +64,10 @@ local const uInt border[] = { /* Order of the bit length code lengths */
*/
local void inflate_blocks_reset(s, z, c)
inflate_blocks_statef *s;
z_streamp z;
uLongf *c;
local void inflate_blocks_reset( /* s, z, c) */
inflate_blocks_statef *s,
z_streamp z,
uLongf *c )
{
if (c != Z_NULL)
*c = s->check;
@ -85,10 +85,10 @@ uLongf *c;
}
local inflate_blocks_statef *inflate_blocks_new(z, c, w)
z_streamp z;
check_func c;
uInt w;
local inflate_blocks_statef *inflate_blocks_new( /* z, c, w) */
z_streamp z,
check_func c,
uInt w )
{
inflate_blocks_statef *s;
@ -116,10 +116,10 @@ uInt w;
}
local int inflate_blocks(s, z, r)
inflate_blocks_statef *s;
z_streamp z;
int r;
local int inflate_blocks( /* s, z, r) */
inflate_blocks_statef *s,
z_streamp z,
int r )
{
uInt t; /* temporary storage */
uLong b; /* bit buffer */
@ -371,9 +371,9 @@ int r;
}
local int inflate_blocks_free(s, z)
inflate_blocks_statef *s;
z_streamp z;
local int inflate_blocks_free( /* s, z) */
inflate_blocks_statef *s,
z_streamp z )
{
inflate_blocks_reset(s, z, Z_NULL);
ZFREE(z, s->window);

View File

@ -55,11 +55,11 @@ struct inflate_codes_state {
};
local inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
uInt bl, bd;
inflate_huft *tl;
inflate_huft *td; /* need separate declaration for Borland C++ */
z_streamp z;
local inflate_codes_statef *inflate_codes_new( /* bl, bd, tl, td, z) */
uInt bl, uInt bd,
inflate_huft *tl,
inflate_huft *td, /* need separate declaration for Borland C++ */
z_streamp z )
{
inflate_codes_statef *c;
@ -77,10 +77,10 @@ z_streamp z;
}
local int inflate_codes(s, z, r)
inflate_blocks_statef *s;
z_streamp z;
int r;
local int inflate_codes( /* s, z, r) */
inflate_blocks_statef *s,
z_streamp z,
int r )
{
uInt j; /* temporary storage */
inflate_huft *t; /* temporary pointer */
@ -241,9 +241,9 @@ int r;
}
local void inflate_codes_free(c, z)
inflate_codes_statef *c;
z_streamp z;
local void inflate_codes_free( /* c, z) */
inflate_codes_statef *c,
z_streamp z )
{
ZFREE(z, c);
Tracev((stderr, "inflate: codes free\n"));

View File

@ -51,8 +51,8 @@ struct internal_state {
};
ZEXPORT(int) inflateReset(z)
z_streamp z;
ZEXPORT(int) inflateReset( /* z) */
z_streamp z )
{
if (z == Z_NULL || z->state == Z_NULL)
return Z_STREAM_ERROR;
@ -65,8 +65,8 @@ z_streamp z;
}
ZEXPORT(int) inflateEnd(z)
z_streamp z;
ZEXPORT(int) inflateEnd( /* z) */
z_streamp z )
{
if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
return Z_STREAM_ERROR;
@ -79,11 +79,11 @@ z_streamp z;
}
ZEXPORT(int) inflateInit2_(z, w, version, stream_size)
z_streamp z;
int w;
const char *version;
int stream_size;
ZEXPORT(int) inflateInit2_( /* z, w, version, stream_size) */
z_streamp z,
int w,
const char *version,
int stream_size )
{
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
stream_size != sizeof(z_stream))
@ -144,9 +144,9 @@ int stream_size;
#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
ZEXPORT(int) inflate(z, f)
z_streamp z;
int f;
ZEXPORT(int) inflate( /* z, f) */
z_streamp z,
int f )
{
int r;
uInt b;

View File

@ -92,21 +92,22 @@ local const uInt cpdext[30] = { /* Extra bits for distance codes */
/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */
#define BMAX 15 /* maximum bit length of any code */
local int huft_build(b, n, s, d, e, t, m, hp, hn, v)
uIntf *b; /* code lengths in bits (all assumed <= BMAX) */
uInt n; /* number of codes (assumed <= 288) */
uInt s; /* number of simple-valued codes (0..s-1) */
const uIntf *d; /* list of base values for non-simple codes */
const uIntf *e; /* list of extra bits for non-simple codes */
inflate_huft * FAR *t; /* result: starting table */
uIntf *m; /* maximum lookup bits, returns actual */
inflate_huft *hp; /* space for trees */
uInt *hn; /* hufts used in space */
uIntf *v; /* working area: values in order of bit length */
local int huft_build( /* b, n, s, d, e, t, m, hp, hn, v) */
uIntf *b, /* code lengths in bits (all assumed <= BMAX) */
uInt n, /* number of codes (assumed <= 288) */
uInt s, /* number of simple-valued codes (0..s-1) */
const uIntf *d, /* list of base values for non-simple codes */
const uIntf *e, /* list of extra bits for non-simple codes */
inflate_huft * FAR *t, /* result: starting table */
uIntf *m, /* maximum lookup bits, returns actual */
inflate_huft *hp, /* space for trees */
uInt *hn, /* hufts used in space */
uIntf *v /* working area: values in order of bit length */
/* Given a list of code lengths and a maximum table size, make a set of
tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
if the given code set is incomplete (the tables are still built in this
case), or Z_DATA_ERROR if the input is invalid. */
)
{
uInt a; /* counter for codes of length k */
@ -292,12 +293,13 @@ uIntf *v; /* working area: values in order of bit length */
}
local int inflate_trees_bits(c, bb, tb, hp, z)
uIntf *c; /* 19 code lengths */
uIntf *bb; /* bits tree desired/actual depth */
inflate_huft * FAR *tb; /* bits tree result */
inflate_huft *hp; /* space for trees */
z_streamp z; /* for messages */
local int inflate_trees_bits( /* c, bb, tb, hp, z) */
uIntf *c, /* 19 code lengths */
uIntf *bb, /* bits tree desired/actual depth */
inflate_huft * FAR *tb, /* bits tree result */
inflate_huft *hp, /* space for trees */
z_streamp z /* for messages */
)
{
int r;
uInt hn = 0; /* hufts used in space */
@ -319,16 +321,17 @@ z_streamp z; /* for messages */
}
local int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z)
uInt nl; /* number of literal/length codes */
uInt nd; /* number of distance codes */
uIntf *c; /* that many (total) code lengths */
uIntf *bl; /* literal desired/actual bit depth */
uIntf *bd; /* distance desired/actual bit depth */
inflate_huft * FAR *tl; /* literal/length tree result */
inflate_huft * FAR *td; /* distance tree result */
inflate_huft *hp; /* space for trees */
z_streamp z; /* for messages */
local int inflate_trees_dynamic( /* nl, nd, c, bl, bd, tl, td, hp, z) */
uInt nl, /* number of literal/length codes */
uInt nd, /* number of distance codes */
uIntf *c, /* that many (total) code lengths */
uIntf *bl, /* literal desired/actual bit depth */
uIntf *bd, /* distance desired/actual bit depth */
inflate_huft * FAR *tl, /* literal/length tree result */
inflate_huft * FAR *td, /* distance tree result */
inflate_huft *hp, /* space for trees */
z_streamp z /* for messages */
)
{
int r;
uInt hn = 0; /* hufts used in space */
@ -397,12 +400,13 @@ local inflate_huft *fixed_td;
#endif
local int inflate_trees_fixed(bl, bd, tl, td, z)
uIntf *bl; /* literal desired/actual bit depth */
uIntf *bd; /* distance desired/actual bit depth */
inflate_huft * FAR *tl; /* literal/length tree result */
inflate_huft * FAR *td; /* distance tree result */
z_streamp z; /* for memory allocation */
local int inflate_trees_fixed( /* bl, bd, tl, td, z) */
uIntf *bl, /* literal desired/actual bit depth */
uIntf *bd, /* distance desired/actual bit depth */
inflate_huft * FAR *tl, /* literal/length tree result */
inflate_huft * FAR *td, /* distance tree result */
z_streamp z /* for memory allocation */
)
{
#ifdef BUILDFIXED
/* build fixed tables if not already */

View File

@ -19,10 +19,10 @@ local uInt inflate_mask[17] = {
/* copy as much as possible from the sliding window to the output area */
local int inflate_flush(s, z, r)
inflate_blocks_statef *s;
z_streamp z;
int r;
local int inflate_flush( /* s, z, r) */
inflate_blocks_statef *s,
z_streamp z,
int r )
{
uInt n;
Bytef *p;

View File

@ -49,7 +49,7 @@
static void
pfr_bitwriter_init( PFR_BitWriter writer,
FT_Bitmap* target,
FT_Bool decreasing )
FT_UInt decreasing )
{
writer->line = target->buffer;
writer->pitch = target->pitch;
@ -107,7 +107,7 @@
}
else if ( mask == 0 )
{
cur[0] = c;
cur[0] = (FT_Byte)c;
mask = 0x80;
c = 0;
cur ++;
@ -115,7 +115,7 @@
}
if ( mask != 0x80 )
cur[0] = c;
cur[0] = (FT_Byte) c;
}
@ -185,7 +185,7 @@
}
else if ( mask == 0 )
{
cur[0] = c;
cur[0] = (FT_Byte) c;
mask = 0x80;
c = 0;
cur ++;
@ -249,7 +249,7 @@
}
else if ( mask == 0 )
{
cur[0] = c;
cur[0] = (FT_Byte) c;
c = 0;
mask = 0x80;
cur ++;
@ -281,7 +281,7 @@
FT_ULong* found_size )
{
FT_UInt left, right, char_len;
FT_Bool two = flags & 1;
FT_Bool two = FT_BOOL( flags & 1 );
FT_Byte* buff;
@ -583,7 +583,7 @@
pfr_lookup_bitmap_data( stream->cursor,
stream->limit,
strike->num_bitmaps,
strike->flags,
(FT_Byte) strike->flags,
character->char_code,
&gps_offset,
&gps_size );
@ -624,7 +624,7 @@
if ( !error )
{
glyph->root.format = FT_GLYPH_FORMAT_BITMAP;
/* Set up glyph bitmap and metrics */
glyph->root.bitmap.width = (FT_Int)xsize;
glyph->root.bitmap.rows = (FT_Int)ysize;

View File

@ -332,6 +332,7 @@
/*************************************************************************/
/*************************************************************************/
#if 0
static FT_Pos
psh3_dimension_quantize_len( PSH_Dimension dim,
FT_Pos len,
@ -380,6 +381,7 @@
return len;
}
#endif /* 0 */
#ifdef DEBUG_HINTER
@ -518,7 +520,7 @@
hint->cur_pos = pos;
hint->cur_len = fit_len;
#if 0
#if 0
/* stem adjustment tries to snap stem widths to standard
* ones. this is important to prevent unpleasant rounding
* artefacts...
@ -535,7 +537,7 @@
#else
/* this seems to be a bug !! */
pos = ( pos + ( (len >> 1) & -64 ) );
#endif
#endif
len = 64;
}
else
@ -554,7 +556,7 @@
if ( do_snapping )
{
pos = hint->cur_pos;
pos = hint->cur_pos;
len = hint->cur_len;
if ( len < 64 )
@ -620,7 +622,6 @@
FT_Pos pos = FT_MulFix( hint->org_pos, scale ) + delta;
FT_Pos len = FT_MulFix( hint->org_len, scale );
FT_Pos fit_center;
FT_Pos fit_len;
PSH_AlignmentRec align;

View File

@ -192,7 +192,6 @@
{
FT_Size_Metrics* metrics = &size->root.metrics;
TT_Face face = (TT_Face)size->root.face;
FT_Long dim_x, dim_y;
/* This bit flag, when set, indicates that the pixel size must be */
@ -204,9 +203,12 @@
/* really don't know whether this is useful, but hey, that's the */
/* spec :-) */
/* */
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
if ( ( face->header.Flags & 8 ) == 0 )
{
/* Compute pixel sizes in 26.6 units */
FT_Long dim_x, dim_y;
dim_x = ( char_width * horz_resolution + 36 ) / 72;
dim_y = ( char_height * vert_resolution + 36 ) / 72;
@ -216,6 +218,15 @@
metrics->x_ppem = (FT_UShort)( dim_x >> 6 );
metrics->y_ppem = (FT_UShort)( dim_y >> 6 );
}
#else
FT_UNUSED( vert_resolution );
FT_UNUSED( horz_resolution );
FT_UNUSED( char_height );
FT_UNUSED( char_width );
FT_UNUSED( face );
FT_UNUSED( metrics );
#endif
size->ttmetrics.valid = FALSE;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS