Set `face_index' field in FT_Face for all font formats.
* cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init), sfnt/sfobjs.c (sfnt_init_face): Do it. * docs/CHANGES: Document it.
This commit is contained in:
parent
66043b1c4f
commit
1ad384d881
|
@ -1,3 +1,12 @@
|
||||||
|
2008-12-26 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Set `face_index' field in FT_Face for all font formats.
|
||||||
|
|
||||||
|
* cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init),
|
||||||
|
sfnt/sfobjs.c (sfnt_init_face): Do it.
|
||||||
|
|
||||||
|
* docs/CHANGES: Document it.
|
||||||
|
|
||||||
2008-12-22 Steve Grubb
|
2008-12-22 Steve Grubb
|
||||||
|
|
||||||
* builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files.
|
* builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files.
|
||||||
|
|
|
@ -14,6 +14,11 @@ CHANGES BETWEEN 2.3.8 and 2.3.7
|
||||||
configuration macros TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
|
configuration macros TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
|
||||||
TT_CONFIG_OPTION_UNPATENTED_HINTING were defined.
|
TT_CONFIG_OPTION_UNPATENTED_HINTING were defined.
|
||||||
|
|
||||||
|
- The `face_index' field in the `FT_Face' structure wasn't
|
||||||
|
initialized properly after calling FT_Open_Face and friends with
|
||||||
|
a positive face index for CFFs, WinFNTs, and, most importantly,
|
||||||
|
for TrueType Collections (TTCs).
|
||||||
|
|
||||||
|
|
||||||
II. IMPORTANT CHANGES
|
II. IMPORTANT CHANGES
|
||||||
|
|
||||||
|
|
|
@ -465,8 +465,7 @@
|
||||||
pure_cff = 0;
|
pure_cff = 0;
|
||||||
|
|
||||||
/* load font directory */
|
/* load font directory */
|
||||||
error = sfnt->load_face( stream, face,
|
error = sfnt->load_face( stream, face, 0, num_params, params );
|
||||||
face_index, num_params, params );
|
|
||||||
if ( error )
|
if ( error )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
@ -515,6 +514,8 @@
|
||||||
cff->pshinter = pshinter;
|
cff->pshinter = pshinter;
|
||||||
cff->psnames = (void*)psnames;
|
cff->psnames = (void*)psnames;
|
||||||
|
|
||||||
|
cffface->face_index = face_index;
|
||||||
|
|
||||||
/* Complement the root flags with some interesting information. */
|
/* Complement the root flags with some interesting information. */
|
||||||
/* Note that this is only necessary for pure CFF and CEF fonts; */
|
/* Note that this is only necessary for pure CFF and CEF fonts; */
|
||||||
/* SFNT based fonts use the `name' table instead. */
|
/* SFNT based fonts use the `name' table instead. */
|
||||||
|
|
|
@ -324,6 +324,7 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* check the face index */
|
/* check the face index */
|
||||||
|
/* XXX: handle CID fonts with more than a single face */
|
||||||
if ( face_index != 0 )
|
if ( face_index != 0 )
|
||||||
{
|
{
|
||||||
FT_ERROR(( "cid_face_init: invalid face index\n" ));
|
FT_ERROR(( "cid_face_init: invalid face index\n" ));
|
||||||
|
|
|
@ -468,7 +468,8 @@
|
||||||
if ( error )
|
if ( error )
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
face->root.num_faces = face->ttc_header.count;
|
face->root.num_faces = face->ttc_header.count;
|
||||||
|
face->root.face_index = face_index;
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,7 +326,7 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* check the face index */
|
/* check the face index */
|
||||||
if ( face_index != 0 )
|
if ( face_index > 0 )
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T1_Face_Init: invalid face index\n" ));
|
FT_ERROR(( "T1_Face_Init: invalid face index\n" ));
|
||||||
error = T1_Err_Invalid_Argument;
|
error = T1_Err_Invalid_Argument;
|
||||||
|
@ -343,7 +343,7 @@
|
||||||
|
|
||||||
|
|
||||||
root->num_glyphs = type1->num_glyphs;
|
root->num_glyphs = type1->num_glyphs;
|
||||||
root->face_index = face_index;
|
root->face_index = 0;
|
||||||
|
|
||||||
root->face_flags = FT_FACE_FLAG_SCALABLE |
|
root->face_flags = FT_FACE_FLAG_SCALABLE |
|
||||||
FT_FACE_FLAG_HORIZONTAL |
|
FT_FACE_FLAG_HORIZONTAL |
|
||||||
|
|
|
@ -188,7 +188,7 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* check the face index */
|
/* check the face index */
|
||||||
if ( face_index != 0 )
|
if ( face_index > 0 )
|
||||||
{
|
{
|
||||||
FT_ERROR(( "T42_Face_Init: invalid face index\n" ));
|
FT_ERROR(( "T42_Face_Init: invalid face index\n" ));
|
||||||
error = T42_Err_Invalid_Argument;
|
error = T42_Err_Invalid_Argument;
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
|
|
||||||
root->num_glyphs = type1->num_glyphs;
|
root->num_glyphs = type1->num_glyphs;
|
||||||
root->num_charmaps = 0;
|
root->num_charmaps = 0;
|
||||||
root->face_index = face_index;
|
root->face_index = 0;
|
||||||
|
|
||||||
root->face_flags = FT_FACE_FLAG_SCALABLE |
|
root->face_flags = FT_FACE_FLAG_SCALABLE |
|
||||||
FT_FACE_FLAG_HORIZONTAL |
|
FT_FACE_FLAG_HORIZONTAL |
|
||||||
|
|
|
@ -736,6 +736,8 @@
|
||||||
FT_PtrDist family_size;
|
FT_PtrDist family_size;
|
||||||
|
|
||||||
|
|
||||||
|
root->face_index = face_index;
|
||||||
|
|
||||||
root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
|
root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
|
||||||
FT_FACE_FLAG_HORIZONTAL;
|
FT_FACE_FLAG_HORIZONTAL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue