* src/base/ftobjs.c, src/sfnt/ttcmap0.c, src/type1/t1objs.c:
various fixes to make the FT_CMaps support work correctly (more tests are still needed)
This commit is contained in:
parent
636fdbd4a4
commit
5f33c9009e
@ -1,5 +1,10 @@
|
||||
2002-03-22 David Turner <david@freetype.org>
|
||||
|
||||
* src/base/ftobjs.c, src/sfnt/ttcmap0.c, src/type1/t1objs.c:
|
||||
|
||||
various fixes to make the FT_CMaps support work correctly
|
||||
(more tests are still needed)
|
||||
|
||||
* include/freetype/internal/ftobjs.h,
|
||||
src/sfnt/Jamfile, src/sfnt/rules.mk,
|
||||
src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
|
||||
|
@ -612,6 +612,28 @@
|
||||
if ( face->generic.finalizer )
|
||||
face->generic.finalizer( face );
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_USE_CMAPS
|
||||
|
||||
/* discard charmaps */
|
||||
{
|
||||
FT_Int n;
|
||||
|
||||
for ( n = 0; n < face->num_charmaps; n++ )
|
||||
{
|
||||
FT_CMap cmap = FT_CMAP( face->charmaps[n] );
|
||||
|
||||
FT_CMap_Done( cmap );
|
||||
|
||||
face->charmaps[n] = NULL;
|
||||
}
|
||||
|
||||
FT_FREE( face->charmaps );
|
||||
face->num_charmaps = 0;
|
||||
}
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_USE_CMAPS */
|
||||
|
||||
|
||||
/* finalize format-specific stuff */
|
||||
if ( clazz->done_face )
|
||||
clazz->done_face( face );
|
||||
|
@ -642,7 +642,7 @@
|
||||
p = deltas + n*2; delta = TT_PEEK_SHORT(p);
|
||||
p = offsets + n*2; offset = TT_PEEK_USHORT(p);
|
||||
|
||||
if ( end > start )
|
||||
if ( start > end )
|
||||
FT_INVALID_DATA;
|
||||
|
||||
if ( n > 0 && start <= last )
|
||||
@ -713,14 +713,14 @@
|
||||
|
||||
if ( code <= end )
|
||||
{
|
||||
index = (FT_UInt)( char_code - start );
|
||||
index = code;
|
||||
|
||||
p = q + num_segs2 - 2; delta = TT_PEEK_SHORT(p);
|
||||
p += num_segs2; offset = TT_PEEK_USHORT(p);
|
||||
|
||||
if ( offset != 0 )
|
||||
{
|
||||
p += offset + 2*index;
|
||||
p += offset + 2*(index - start);
|
||||
index = TT_PEEK_USHORT(p);
|
||||
}
|
||||
|
||||
@ -1575,6 +1575,8 @@
|
||||
|
||||
charmap.platform_id = TT_NEXT_USHORT(p);
|
||||
charmap.encoding_id = TT_NEXT_USHORT(p);
|
||||
charmap.face = FT_FACE(face);
|
||||
charmap.encoding = 0; /* will be filled later */
|
||||
offset = TT_NEXT_ULONG(p);
|
||||
|
||||
if ( offset && table + offset + 2 < limit )
|
||||
|
@ -324,9 +324,7 @@
|
||||
FT_Face root = (FT_Face)&face->root;
|
||||
|
||||
|
||||
root->num_glyphs = face->type1.num_glyphs;
|
||||
root->num_charmaps = 1;
|
||||
|
||||
root->num_glyphs = face->type1.num_glyphs;
|
||||
root->face_index = face_index;
|
||||
root->face_flags = FT_FACE_FLAG_SCALABLE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user