* src/psaux/psobjs.c (T1Radix): New function.
(t1_toint): Use it to handle numbers in radix format. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Add dummy for undocumented, obsolete opcode 15.
This commit is contained in:
parent
b3971ae105
commit
4ea7621019
29
ChangeLog
29
ChangeLog
@ -1,18 +1,25 @@
|
||||
2002-05-21 Martin Muskens <mmuskens@aurelon.com>
|
||||
|
||||
* src/psaux/psobjs.c (T1Radix): New function.
|
||||
(t1_toint): Use it to handle numbers in radix format.
|
||||
|
||||
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Add dummy
|
||||
for undocumented, obsolete opcode 15.
|
||||
|
||||
2002-05-21 David Turner <david@freetype.org>
|
||||
|
||||
* src/bdf/bdflic.c: removed compiler warning, and changed all tables
|
||||
to the "static const" storage specifier (instead of simply 'static')
|
||||
* src/bdf/bdflic.c: Removed compiler warning, and changed all tables
|
||||
to the "static const" storage specifier (instead of simply
|
||||
`static').
|
||||
|
||||
* src/type42/t32drivr.c, src/bdf/bdfdrivr.c:
|
||||
removing compiler warnings
|
||||
* src/type42/t32drivr.c, src/bdf/bdfdrivr.c: Removing compiler
|
||||
warnings.
|
||||
|
||||
* include/freetype/internal/ftbdf.h, src/base/ftbdf.c,
|
||||
src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk:
|
||||
|
||||
Adding a new API called "FT_Get_BDF_Charset_ID" to retrieve
|
||||
BDF-specific strings from a face. This is much cleaner
|
||||
than accessing the internal types "BDF_Public_Face" defined in
|
||||
FT_INTERNAL_BDF_TYPES_H
|
||||
* include/freetype/internal/ftbdf.h, src/base/ftbdf.c,
|
||||
src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk
|
||||
(FT_Get_BDF_Charset_ID): New API to retrieve BDF-specific strings
|
||||
from a face. This is much cleaner than accessing the internal types
|
||||
"BDF_Public_Face" defined in FT_INTERNAL_BDF_TYPES_H.
|
||||
|
||||
2002-05-21 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
|
@ -434,13 +434,50 @@
|
||||
}
|
||||
|
||||
|
||||
static FT_Long
|
||||
T1Radix( FT_Long radixBase,
|
||||
FT_Byte** cur,
|
||||
FT_Byte* limit )
|
||||
{
|
||||
FT_Long result = 0;
|
||||
FT_Byte radixEndChar0 =
|
||||
(FT_Byte)( radixBase > 10 ? '9' + 1 : '0' + radixBase );
|
||||
FT_Byte radixEndChar1 =
|
||||
(FT_Byte)( 'A' + radixBase - 10 );
|
||||
FT_Byte radixEndChar2 =
|
||||
(FT_Byte)( 'a' + radixBase - 10 );
|
||||
|
||||
|
||||
while( *cur < limit )
|
||||
{
|
||||
if ( (*cur)[0] >= '0' && (*cur)[0] < radixEndChar0 )
|
||||
result = result * radixBase + (*cur)[0] - '0';
|
||||
|
||||
else if ( radixBase > 10 &&
|
||||
(*cur)[0] >= 'A' && (*cur)[0] < radixEndChar1 )
|
||||
result = result * radixBase + ( (*cur)[0] - 'A' + 10 );
|
||||
|
||||
else if ( radixBase > 10 &&
|
||||
(*cur)[0] >= 'a' && (*cur)[0] < radixEndChar2 )
|
||||
result = result * radixBase + ( (*cur)[0] - 'a' + 10 );
|
||||
|
||||
else
|
||||
return result;
|
||||
|
||||
(*cur)++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static FT_Long
|
||||
t1_toint( FT_Byte** cursor,
|
||||
FT_Byte* limit )
|
||||
{
|
||||
FT_Long result = 0;
|
||||
FT_Byte* cur = *cursor;
|
||||
FT_Byte c = '\0', d;
|
||||
FT_Byte c = '\0', d;
|
||||
|
||||
|
||||
for ( ; cur < limit; cur++ )
|
||||
@ -463,7 +500,14 @@
|
||||
{
|
||||
d = (FT_Byte)( cur[0] - '0' );
|
||||
if ( d >= 10 )
|
||||
{
|
||||
if ( cur[0] == '#' )
|
||||
{
|
||||
cur++;
|
||||
result = T1Radix( result, &cur, limit );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
result = result * 10 + d;
|
||||
cur++;
|
||||
|
@ -432,6 +432,10 @@
|
||||
op = op_endchar;
|
||||
break;
|
||||
|
||||
case 15: /* undocumented, obsolete operator */
|
||||
op = op_none;
|
||||
break;
|
||||
|
||||
case 21:
|
||||
op = op_rmoveto;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user