22 #include FT_INTERNAL_DEBUG_H 23 #include FT_INTERNAL_STREAM_H 25 #include FT_INTERNAL_CALC_H 37 #define FT_COMPONENT trace_cidgload 55 #ifdef FT_CONFIG_OPTION_INCREMENTAL 61 FT_TRACE4((
"cid_load_glyph: glyph index %d\n", glyph_index ));
63 #ifdef FT_CONFIG_OPTION_INCREMENTAL 73 glyph_index, &glyph_data );
80 if ( glyph_data.
length != 0 )
82 glyph_length = glyph_data.
length - cid->fd_bytes;
102 FT_UInt entry_len = cid->fd_bytes + cid->gd_bytes;
107 glyph_index * entry_len ) ||
118 if ( fd_select >= (
FT_UInt)cid->num_dicts )
123 if ( glyph_length == 0 )
125 if (
FT_ALLOC( charstring, glyph_length ) )
128 charstring, glyph_length ) )
141 decoder->subrs = cid_subrs->
code;
142 decoder->subrs_len = 0;
145 dict = cid->font_dicts + fd_select;
154 cs_offset = ( decoder->lenIV >= 0 ? decoder->lenIV : 0 );
157 if ( decoder->lenIV >= 0 )
158 psaux->t1_decrypt( charstring, glyph_length, 4330 );
160 error = decoder->funcs.parse_charstrings(
161 decoder, charstring + cs_offset,
162 (
FT_Int)glyph_length - cs_offset );
167 #ifdef FT_CONFIG_OPTION_INCREMENTAL 181 glyph_index,
FALSE, &metrics );
249 for ( glyph_index = 0; glyph_index < face->root.
num_glyphs;
294 glyph->
x_scale = cidsize->metrics.x_scale;
295 glyph->
y_scale = cidsize->metrics.y_scale;
297 cidglyph->outline.n_points = 0;
298 cidglyph->outline.n_contours = 0;
305 error = psaux->t1_decoder_funcs->init( &decoder,
332 psaux->t1_decoder_funcs->done( &decoder );
347 cidglyph->metrics.horiBearingX =
349 cidglyph->metrics.horiAdvance =
352 internal->glyph_matrix = font_matrix;
353 internal->glyph_delta = font_offset;
354 internal->glyph_transformed = 1;
364 metrics->horiAdvance =
366 cidglyph->linearHoriAdvance =
368 cidglyph->internal->glyph_transformed = 0;
373 cidglyph->linearVertAdvance = metrics->vertAdvance;
377 if ( cidsize->metrics.y_ppem < 24 )
387 advance.
x = metrics->horiAdvance;
390 metrics->horiAdvance = advance.
x + font_offset.
x;
393 advance.
y = metrics->vertAdvance;
395 metrics->vertAdvance = advance.
y + font_offset.
y;
409 for ( n = cur->
n_points; n > 0; n--, vec++ )
416 metrics->horiAdvance =
FT_MulFix( metrics->horiAdvance, x_scale );
417 metrics->vertAdvance =
FT_MulFix( metrics->vertAdvance, y_scale );
423 metrics->width = cbox.
xMax - cbox.
xMin;
424 metrics->height = cbox.
yMax - cbox.
yMin;
426 metrics->horiBearingX = cbox.
xMin;
427 metrics->horiBearingY = cbox.
yMax;
433 metrics->vertAdvance );
#define FT_ALLOC(ptr, size)
#define FT_LOAD_VERTICAL_LAYOUT
struct CID_FaceRec_ * CID_Face
FT_Incremental_GetGlyphDataFunc get_glyph_data
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
const T1_Decoder_FuncsRec * t1_decoder_funcs
void(* done)(T1_Decoder decoder)
#define FT_LOAD_NO_HINTING
return FT_THROW(Missing_Property)
#define FT_LOAD_NO_RECURSE
FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics
FT_Incremental_FreeGlyphDataFunc free_glyph_data
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
PS_PrivateRec private_dict
FT_BEGIN_HEADER typedef unsigned char FT_Bool
FT_Face_Internal internal
GLenum GLuint GLint GLenum face
#define FT_TRACE4(varformat)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
cid_slot_load_glyph(FT_GlyphSlot cidglyph, FT_Size cidsize, FT_UInt glyph_index, FT_Int32 load_flags)
#define FT_STREAM_READ_AT(position, buffer, count)
#define FT_OUTLINE_HIGH_PRECISION
struct PSAux_ServiceRec_ * PSAux_Service
#define FT_CALLBACK_DEF(x)
struct CID_GlyphSlotRec_ * CID_GlyphSlot
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
const FT_Incremental_FuncsRec * funcs
#define FT_STREAM_SEEK(position)
FT_MulFix(FT_Long a, FT_Long b)
FT_Vector_Transform(FT_Vector *vec, const FT_Matrix *matrix)
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
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)
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
#define FT_FRAME_ENTER(size)
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
cid_get_offset(FT_Byte **start, FT_Byte offsize)
cid_load_glyph(T1_Decoder decoder, FT_UInt glyph_index)
FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE
#define FT_OUTLINE_REVERSE_FILL
#define FT_LOAD_TARGET_MODE(x)