if ( error )
goto Exit;
+ /* if we are performing a simple font format check, exit immediately */
+ /* (this is here for pure CFF) */
+ if ( face_index < 0 )
+ return FT_Err_Ok;
+
cff->pshinter = pshinter;
cff->psnames = psnames;
- cffface->face_index = face_index;
+ cffface->face_index = face_index & 0xFFFF;
/* Complement the root flags with some interesting information. */
/* Note that this is only necessary for pure CFF and CEF fonts; */
if ( !dict->has_font_matrix )
dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
- /* Normalize the font matrix so that `matrix->xx' is 1; the */
+ /* Normalize the font matrix so that `matrix->yy' is 1; the */
/* scaling is done with `units_per_em' then (at this point, */
/* it already contains the scaling factor, but without */
/* normalization of the matrix). */
(FT_Short)( dict->underline_thickness >> 16 );
/* retrieve font family & style name */
- cffface->family_name = cff_index_get_name( cff,
- (FT_UInt)face_index );
+ cffface->family_name = cff_index_get_name(
+ cff,
+ (FT_UInt)( face_index & 0xFFFF ) );
if ( cffface->family_name )
{
char* full = cff_index_get_sid_string( cff,