20 #include FT_INTERNAL_DEBUG_H 21 #include FT_CONFIG_CONFIG_H 22 #include FT_MULTIPLE_MASTERS_H 23 #include FT_INTERNAL_TYPE1_TYPES_H 37 #define FT_COMPONENT trace_cidload 49 for ( result = 0; offsize > 0; offsize-- )
85 error = parser->root.error;
113 if ( parser->num_dict < 0 || parser->num_dict >= cid->
num_dicts )
115 FT_ERROR((
"cid_load_keyword: invalid use of `%s'\n",
125 object = (
FT_Byte*)&dict->private_dict;
143 keyword, &dummy_object );
161 if ( parser->num_dict >= 0 && parser->num_dict < face->
cid.
num_dicts )
169 temp_scale =
FT_ABS( temp[3] );
178 if ( temp_scale != 0x10000L )
180 temp[0] =
FT_DivFix( temp[0], temp_scale );
181 temp[1] =
FT_DivFix( temp[1], temp_scale );
182 temp[2] =
FT_DivFix( temp[2], temp_scale );
183 temp[4] =
FT_DivFix( temp[4], temp_scale );
184 temp[5] =
FT_DivFix( temp[5], temp_scale );
188 matrix->
xx = temp[0];
189 matrix->
yx = temp[1];
190 matrix->
xy = temp[2];
191 matrix->
yy = temp[3];
194 offset->
x = temp[4] >> 16;
195 offset->
y = temp[5] >> 16;
252 if ( parser->num_dict >= 0 && parser->num_dict < face->
cid.
num_dicts )
287 parser->root.cursor = base;
288 parser->root.limit = base +
size;
301 parser->root.cursor = cur;
304 if ( parser->root.cursor >= limit )
305 newlimit = limit - 1 - 17;
307 newlimit = parser->root.cursor - 17;
310 for ( ; cur < newlimit; cur++ )
313 ft_strncmp( (
char*)cur,
"%ADOBeginFontDict", 17 ) == 0 )
322 cur = parser->root.cursor;
328 if ( parser->root.cursor >= limit || parser->root.error )
332 if ( *cur ==
'/' && cur + 2 < limit )
338 len = parser->root.cursor - cur;
340 if ( len > 0 && len < 22 )
355 if ( cur[0] == name[0] &&
361 for ( n = 1; n <
len; n++ )
362 if ( cur[n] != name[n] )
368 parser->root.error = cid_load_keyword( face,
371 if ( parser->root.error )
372 return parser->root.error;
381 cur = parser->root.cursor;
384 return parser->root.error;
407 for ( n = 0; n < cid->
num_dicts; n++, subr++ )
424 if ( num_subrs + 1 > max_offsets )
429 if ( new_max <= max_offsets )
438 max_offsets = new_max;
447 for ( count = 0; count <= num_subrs; count++ )
453 for ( count = 1; count <= num_subrs; count++ )
454 if ( offsets[count - 1] > offsets[count] )
459 data_len = offsets[num_subrs] - offsets[0];
470 for ( count = 1; count <= num_subrs; count++ )
475 len = offsets[
count] - offsets[count - 1];
482 for ( count = 0; count < num_subrs; count++ )
487 len = offsets[count + 1] - offsets[
count];
557 dlimit = d + data_len;
586 else if ( *p >=
'a' && *p <=
'f' )
588 else if ( *p >=
'A' && *p <=
'F' )
589 val = (
FT_Byte)( *p -
'A' + 10 );
590 else if ( *p ==
' ' ||
600 else if ( *p ==
'>' )
619 upper_nibble = (
FT_Byte)( 1 - upper_nibble );
644 cid_init_loader( &loader, face );
646 parser = &loader.parser;
652 error = cid_parse_dict( face, &loader,
654 parser->postscript_len );
658 if ( face_index < 0 )
664 if ( parser->binary_length )
668 cid_hex_to_binary( face->
binary_data, parser->binary_length,
669 parser->data_offset, face ) )
682 error = cid_read_subrs( face );
685 cid_done_loader( &loader );
#define FT_ALLOC(ptr, size)
cid_parser_done(CID_Parser *parser)
FT_DivFix(FT_Long a, FT_Long b)
for(n=1;n< outline->n_points;n++)
#define cid_parser_to_fixed(p, t)
cid_parser_new(CID_Parser *parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
#define FT_MEM_ZERO(dest, count)
return FT_THROW(Missing_Property)
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
PS_PrivateRec private_dict
FT_BEGIN_HEADER struct CID_Parser_ CID_Parser
#define cid_parser_to_int(p)
FT_Fixed expansion_factor
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLenum GLuint GLint GLenum face
#define cid_parser_load_field_table(p, f, o)
#define FT_ERROR(varformat)
#define FT_PAD_CEIL(x, n)
PS_FontExtraRec font_extra
FT_Fixed expansion_factor
struct T1_FieldRec_ * T1_Field
void(* t1_decrypt)(FT_Byte *buffer, FT_Offset length, FT_UShort seed)
#define cid_parser_skip_spaces(p)
GLsizei GLsizei GLenum GLenum const GLvoid * data
#define T1_FIELD_CALLBACK(_ident, _name, _dict)
struct PSAux_ServiceRec_ * PSAux_Service
struct FT_FaceRec_ * FT_Face
#define FT_CALLBACK_DEF(x)
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
FT_BEGIN_HEADER struct CID_Loader_ CID_Loader
cid_face_open(CID_Face face, FT_Int face_index)
parse_fd_array(CID_Face face, CID_Parser *parser)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
cid_parse_font_matrix(CID_Face face, CID_Parser *parser)
#define FT_NEW_ARRAY(ptr, count)
#define FT_STREAM_SEEK(position)
GLuint const GLchar * name
if(!abbox) return FT_THROW(Invalid_Argument)
T1_Field_ParseFunc reader
#define cid_parser_load_field(p, f, o)
T1_FieldLocation location
FT_Stream_OpenMemory(FT_Stream stream, const FT_Byte *base, FT_ULong size)
GLuint GLuint GLsizei count
#define FT_FRAME_ENTER(size)
#define cid_parser_skip_PS_token(p)
#define FT_STREAM_READ(buffer, count)
cid_get_offset(FT_Byte **start, FT_Byte offsize)
parse_expansion_factor(CID_Face face, CID_Parser *parser)
#define cid_parser_to_fixed_array(p, m, f, t)