* src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if

integer part is zero.
This commit is contained in:
Werner Lemberg 2008-04-13 05:55:36 +00:00
parent c32e83f23f
commit 048b756389
5 changed files with 25 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2008-04-13 Werner Lemberg <wl@gnu.org>
* src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if
integer part is zero.
2008-04-01 Werner Lemberg <wl@gnu.org>
Fix compilation with g++ 4.1 (with both `single' and `multi'

View File

@ -154,7 +154,7 @@
FT_UInt glyph_index,
FT_Int32 load_flags )
{
FT_Error error;
FT_Error error;
CFF_GlyphSlot slot = (CFF_GlyphSlot)cffslot;
CFF_Size size = (CFF_Size)cffsize;
@ -229,8 +229,8 @@
FT_FREE( gname );
error = CFF_Err_Ok;
Exit:
return error;
Exit:
return error;
}

View File

@ -31,6 +31,7 @@
#if 1
static const FT_UShort cff_isoadobe_charset[229] =
{
0, 1, 2, 3, 4, 5, 6, 7,
@ -175,13 +176,15 @@
363, 364, 365, 366, 367, 368, 369, 370,
371, 372, 373, 374, 375, 376, 377, 378
};
#endif
#endif /* 1 */
FT_LOCAL_DEF( FT_UShort )
cff_get_standard_encoding( FT_UInt charcode )
{
return (FT_UShort)(charcode < 256 ? cff_standard_encoding[charcode] : 0);
return (FT_UShort)( charcode < 256 ? cff_standard_encoding[charcode]
: 0 );
}

View File

@ -689,7 +689,7 @@
if ( pure_cff && cff->top_font.font_dict.cid_registry != 0xFFFFU )
goto Exit;
/* we didn't find a Unicode charmap -- synthetize one */
/* we didn't find a Unicode charmap -- synthesize one */
cmaprec.face = cffface;
cmaprec.platform_id = 3;
cmaprec.encoding_id = 1;

View File

@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (body). */
/* */
/* Copyright 2006 by */
/* Copyright 2006, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -187,10 +187,18 @@
if ( c < 0 || c >= 10 )
break;
if ( divider < 10000000L )
if ( !integral && power_ten > 0 )
{
power_ten--;
decimal = decimal * 10 + c;
divider *= 10;
}
else
{
if ( divider < 10000000L )
{
decimal = decimal * 10 + c;
divider *= 10;
}
}
}
}