21 #include FT_INTERNAL_CALC_H 22 #include FT_INTERNAL_DEBUG_H 23 #include FT_INTERNAL_STREAM_H 25 #include FT_INTERNAL_POSTSCRIPT_AUX_H 37 #define FT_COMPONENT trace_t1gload 72 decoder->font_matrix = type1->font_matrix;
73 decoder->font_offset = type1->font_offset;
80 error = inc->funcs->get_glyph_data( inc->object,
81 glyph_index, char_string );
88 char_string->pointer = type1->charstrings[glyph_index];
89 char_string->length = (
FT_Int)type1->charstrings_len[glyph_index];
93 error = decoder->funcs.parse_charstrings(
94 decoder, (
FT_Byte*)char_string->pointer,
95 char_string->length );
97 #ifdef FT_CONFIG_OPTION_INCREMENTAL 100 if ( !
error && inc && inc->funcs->get_glyph_metrics )
110 error = inc->funcs->get_glyph_metrics( inc->object,
111 glyph_index,
FALSE, &metrics );
130 decoder, glyph_index, &glyph_data );
133 #ifdef FT_CONFIG_OPTION_INCREMENTAL 141 face->
root.
internal->incremental_interface->funcs->free_glyph_data(
194 for ( glyph_index = 0; glyph_index < type1->
num_glyphs; glyph_index++ )
227 for ( nn = 0; nn <
count; nn++ )
255 for ( nn = 0; nn <
count; nn++ )
287 #ifdef FT_CONFIG_OPTION_INCREMENTAL 292 #ifdef FT_CONFIG_OPTION_INCREMENTAL 310 glyph->
x_scale = t1size->metrics.x_scale;
311 glyph->
y_scale = t1size->metrics.y_scale;
319 t1glyph->outline.n_points = 0;
320 t1glyph->outline.n_contours = 0;
339 must_finish_decoder =
TRUE;
356 #ifdef FT_CONFIG_OPTION_INCREMENTAL 357 glyph_data_loaded = 1;
364 decoder_funcs->
done( &decoder );
366 must_finish_decoder =
FALSE;
383 t1glyph->metrics.horiBearingX =
385 t1glyph->metrics.horiAdvance =
388 internal->glyph_matrix = font_matrix;
389 internal->glyph_delta = font_offset;
390 internal->glyph_transformed = 1;
400 metrics->horiAdvance =
402 t1glyph->linearHoriAdvance =
404 t1glyph->internal->glyph_transformed = 0;
411 t1glyph->linearVertAdvance = metrics->vertAdvance;
415 metrics->vertAdvance =
417 t1glyph->linearVertAdvance =
423 if ( t1size && t1size->metrics.y_ppem < 24 )
428 if ( font_matrix.
xx != 0x10000L || font_matrix.
yy != font_matrix.
xx ||
429 font_matrix.
xy != 0 || font_matrix.
yx != 0 )
432 if ( font_offset.
x || font_offset.
y )
437 advance.
x = metrics->horiAdvance;
440 metrics->horiAdvance = advance.
x + font_offset.
x;
442 advance.
y = metrics->vertAdvance;
444 metrics->vertAdvance = advance.
y + font_offset.
y;
459 for ( n = cur->
n_points; n > 0; n--, vec++ )
466 metrics->horiAdvance =
FT_MulFix( metrics->horiAdvance, x_scale );
467 metrics->vertAdvance =
FT_MulFix( metrics->vertAdvance, y_scale );
473 metrics->width = cbox.
xMax - cbox.
xMin;
474 metrics->height = cbox.
yMax - cbox.
yMin;
476 metrics->horiBearingX = cbox.
xMin;
477 metrics->horiBearingY = cbox.
yMax;
479 if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
483 metrics->vertAdvance );
490 t1glyph->control_len = glyph_data.
length;
496 #ifdef FT_CONFIG_OPTION_INCREMENTAL 497 if ( glyph_data_loaded && face->
root.
internal->incremental_interface )
499 face->
root.
internal->incremental_interface->funcs->free_glyph_data(
505 t1glyph->control_data = 0;
506 t1glyph->control_len = 0;
510 if ( must_finish_decoder )
511 decoder_funcs->
done( &decoder );
struct T1_GlyphSlotRec_ * T1_GlyphSlot
#define FT_LOAD_VERTICAL_LAYOUT
struct T1_FaceRec_ * T1_Face
FT_BEGIN_HEADER typedef signed long FT_Pos
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
const T1_Decoder_FuncsRec * t1_decoder_funcs
T1_Load_Glyph(FT_GlyphSlot t1glyph, FT_Size t1size, FT_UInt glyph_index, FT_Int32 load_flags)
void(* done)(T1_Decoder decoder)
#define FT_LOAD_NO_HINTING
return FT_THROW(Missing_Property)
#define FT_LOAD_NO_RECURSE
FT_BEGIN_HEADER typedef unsigned char FT_Bool
FT_Face_Internal internal
GLenum GLuint GLint GLenum face
#define FT_ASSERT(condition)
#define FT_CONFIG_OPTION_INCREMENTAL
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
#define FT_OUTLINE_HIGH_PRECISION
struct PSAux_ServiceRec_ * PSAux_Service
#define FT_CALLBACK_DEF(x)
FT_MulFix(FT_Long a, FT_Long b)
if(!abbox) return FT_THROW(Invalid_Argument)
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)
T1_Get_Advances(FT_Face t1face, FT_UInt first, FT_UInt count, FT_Int32 load_flags, FT_Fixed *advances)
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
T1_Compute_Max_Advance(T1_Face face, FT_Pos *max_advance)
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
T1_Parse_Glyph_And_Get_Char_String(T1_Decoder decoder, FT_UInt glyph_index, FT_Data *char_string)
FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE
#define FT_OUTLINE_REVERSE_FILL
T1_Parse_Glyph(T1_Decoder decoder, FT_UInt glyph_index)
#define FT_LOAD_TARGET_MODE(x)