40#define FT_COMPONENT cidgload
60#ifdef FT_CONFIG_OPTION_INCREMENTAL
62 face->root.internal->incremental_interface;
66 FT_TRACE1((
"cid_load_glyph: glyph index %d\n", glyph_index ));
68#ifdef FT_CONFIG_OPTION_INCREMENTAL
78 glyph_index, &glyph_data );
85 if ( glyph_data.
length != 0 )
112 glyph_index * entry_len ) ||
127 FT_TRACE0((
"cid_load_glyph: invalid glyph stream offsets\n" ));
132 glyph_length = off2 - off1;
133 if ( glyph_length == 0 )
135 if (
FT_ALLOC( charstring, glyph_length ) )
138 charstring, glyph_length ) )
156 dict =
cid->font_dicts + fd_select;
166 if ( cs_offset > glyph_length )
168 FT_TRACE0((
"cid_load_glyph: invalid glyph stream offsets\n" ));
175 psaux->t1_decrypt( charstring, glyph_length, 4330 );
178#ifdef T1_CONFIG_OPTION_OLD_ENGINE
181 decoder->builder.metrics_only )
182 error = psaux->t1_decoder_funcs->parse_charstrings_old(
184 charstring + cs_offset,
185 glyph_length - cs_offset );
187 if (
decoder->builder.metrics_only )
188 error = psaux->t1_decoder_funcs->parse_metrics(
190 charstring + cs_offset,
191 glyph_length - cs_offset );
199 psaux->ps_decoder_init( &psdecoder,
decoder,
TRUE );
206 error = psaux->t1_decoder_funcs->parse_charstrings(
208 charstring + cs_offset,
209 glyph_length - cs_offset );
220 force_scaling =
TRUE;
222 error = psaux->t1_decoder_funcs->parse_charstrings(
224 charstring + cs_offset,
225 glyph_length - cs_offset );
230#ifdef FT_CONFIG_OPTION_INCREMENTAL
290 if (!decoder_allocated)
293#define decoder (*decoder_allocated)
317 free(decoder_allocated);
327 decoder.builder.metrics_only = 1;
328 decoder.builder.load_points = 0;
332 for ( glyph_index = 0; glyph_index <
face->root.num_glyphs;
345 free(decoder_allocated);
360 FT_Int32 load_flags )
366 if (!decoder_allocated)
return FT_Err_Out_Of_Memory;
368#define decoder (*decoder_allocated)
383 if ( glyph_index >= (
FT_UInt)
face->root.num_glyphs )
392 glyph->
x_scale = cidsize->metrics.x_scale;
393 glyph->
y_scale = cidsize->metrics.y_scale;
395 cidglyph->outline.n_points = 0;
396 cidglyph->outline.n_contours = 0;
402 glyph->
hint = hinting;
404 cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
421 must_finish_decoder =
TRUE;
431 hinting = glyph->
hint;
434 font_matrix =
decoder.font_matrix;
435 font_offset =
decoder.font_offset;
440 must_finish_decoder =
FALSE;
455 cidglyph->metrics.horiBearingX =
457 cidglyph->metrics.horiAdvance =
460 internal->glyph_matrix = font_matrix;
461 internal->glyph_delta = font_offset;
473 cidglyph->linearHoriAdvance =
475 cidglyph->internal->glyph_transformed = 0;
478 metrics->vertAdvance = (
face->cid.font_bbox.yMax -
479 face->cid.font_bbox.yMin ) >> 16;
480 cidglyph->linearVertAdvance =
metrics->vertAdvance;
482 cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
484 if ( cidsize->metrics.y_ppem < 24 )
488 if ( font_matrix.
xx != 0x10000L || font_matrix.
yy != 0x10000L ||
489 font_matrix.
xy != 0 || font_matrix.
yx != 0 )
499 if ( font_offset.
x || font_offset.
y )
505 metrics->horiAdvance += font_offset.
x;
506 metrics->vertAdvance += font_offset.
y;
520 if ( !hinting || !
decoder.builder.hints_funcs )
521 for (
n =
cur->n_points;
n > 0;
n--,
vec++ )
551 if ( must_finish_decoder )
555 free(decoder_allocated);
ios_base &_STLP_CALL internal(ios_base &__s)
cid_slot_load_glyph(FT_GlyphSlot cidglyph, FT_Size cidsize, FT_UInt glyph_index, FT_Int32 load_flags)
cid_load_glyph(T1_Decoder decoder, FT_UInt glyph_index)
cid_get_offset(FT_Byte **start, FT_Byte offsize)
struct CID_GlyphSlotRec_ * CID_GlyphSlot
#define FT_CALLBACK_DEF(x)
#define FT_LOAD_VERTICAL_LAYOUT
#define FT_LOAD_TARGET_MODE(x)
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
#define FT_LOAD_NO_RECURSE
#define FT_LOAD_NO_HINTING
FT_MulFix(FT_Long a, FT_Long b)
#define FT_TRACE0(varformat)
#define FT_TRACE1(varformat)
#define FT_HINTING_FREETYPE
#define FT_OUTLINE_HIGH_PRECISION
#define FT_OUTLINE_REVERSE_FILL
#define FT_ALLOC(ptr, size)
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
#define FT_FACE_DRIVER(x)
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
#define FT_FRAME_ENTER(size)
#define FT_STREAM_SEEK(position)
#define FT_STREAM_READ_AT(position, buffer, count)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLenum GLuint GLint GLenum face
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
static char memory[1024 *256]
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
struct PSAux_ServiceRec_ * PSAux_Service
PS_PrivateRec private_dict
FT_Incremental_FreeGlyphDataFunc free_glyph_data
FT_Incremental_GetGlyphDataFunc get_glyph_data
FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics
const FT_Incremental_FuncsRec * funcs
const T1_Decoder_FuncsRec * t1_decoder_funcs
CFF_SubFont current_subfont
void(* done)(T1_Decoder decoder)
FT_Error(* init)(T1_Decoder decoder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Byte **glyph_names, PS_Blend blend, FT_Bool hinting, FT_Render_Mode hint_mode, T1_Decoder_Callback callback)
struct CID_FaceRec_ * CID_Face