38#define FT_COMPONENT t1gload
55#ifdef FT_CONFIG_OPTION_INCREMENTAL
57 face->root.internal->incremental_interface;
60#ifdef T1_CONFIG_OPTION_OLD_ENGINE
65 decoder->font_matrix = type1->font_matrix;
66 decoder->font_offset = type1->font_offset;
68#ifdef FT_CONFIG_OPTION_INCREMENTAL
74 glyph_index, char_string );
81 char_string->
pointer = type1->charstrings[glyph_index];
82 char_string->
length = (
FT_Int)type1->charstrings_len[glyph_index];
88#ifdef T1_CONFIG_OPTION_OLD_ENGINE
96 if (
decoder->builder.metrics_only )
107 psaux->ps_decoder_init( &psdecoder,
decoder,
TRUE );
110 &
face->type1.private_dict, &subfont );
127 *force_scaling =
TRUE;
137#ifdef FT_CONFIG_OPTION_INCREMENTAL
171 decoder, glyph_index, &glyph_data,
175#ifdef FT_CONFIG_OPTION_INCREMENTAL
182 if (
face->root.internal->incremental_interface )
183 face->root.internal->incremental_interface->funcs->free_glyph_data(
184 face->root.internal->incremental_interface->object,
218 if (!decoder_allocated)
222#define decoder (*decoder_allocated)
248 free(decoder_allocated);
255 decoder.builder.metrics_only = 1;
256 decoder.builder.load_points = 0;
268 FT_TRACE6((
"T1_Compute_Max_Advance:\n" ));
272 for ( glyph_index = 0; glyph_index < type1->
num_glyphs; glyph_index++ )
276 if ( glyph_index == 0 ||
decoder.builder.advance.x > *max_advance )
277 *max_advance =
decoder.builder.advance.x;
282 FT_TRACE6((
"T1_Compute_Max_Advance: max advance: %f\n",
283 *max_advance / 65536.0 ));
288 free(decoder_allocated);
306 if (!decoder_allocated)
309#define decoder (*decoder_allocated)
324 for ( nn = 0; nn <
count; nn++ )
328 FT_TRACE5((
" idx %d: advance height 0 font units\n",
333 free(decoder_allocated);
350 free(decoder_allocated);
357 decoder.builder.metrics_only = 1;
358 decoder.builder.load_points = 0;
368 for ( nn = 0; nn <
count; nn++ )
376 FT_TRACE5((
" idx %d: advance width %ld font unit%s\n",
379 advances[nn] == 1 ?
"" :
"s" ));
383 free(decoder_allocated);
395 FT_Int32 load_flags )
401 if (!decoder_allocated)
404#define decoder (*decoder_allocated)
421#ifdef FT_CONFIG_OPTION_INCREMENTAL
426#ifdef FT_CONFIG_OPTION_INCREMENTAL
427 if ( glyph_index >= (
FT_UInt)
face->root.num_glyphs &&
428 !
face->root.internal->incremental_interface )
430 if ( glyph_index >= (
FT_UInt)
face->root.num_glyphs )
437 FT_TRACE1((
"T1_Load_Glyph: glyph index %d\n", glyph_index ));
446 glyph->
x_scale = t1size->metrics.x_scale;
447 glyph->
y_scale = t1size->metrics.y_scale;
455 t1glyph->outline.n_points = 0;
456 t1glyph->outline.n_contours = 0;
462 glyph->
hint = hinting;
464 t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;
478 must_finish_decoder =
TRUE;
482 decoder.num_subrs = type1->num_subrs;
484 decoder.subrs_len = type1->subrs_len;
485 decoder.subrs_hash = type1->subrs_hash;
496#ifdef FT_CONFIG_OPTION_INCREMENTAL
497 glyph_data_loaded = 1;
500 hinting = glyph->
hint;
501 font_matrix =
decoder.font_matrix;
502 font_offset =
decoder.font_offset;
507 must_finish_decoder =
FALSE;
524 t1glyph->metrics.horiBearingX =
526 t1glyph->metrics.horiAdvance =
529 internal->glyph_matrix = font_matrix;
530 internal->glyph_delta = font_offset;
542 t1glyph->linearHoriAdvance =
544 t1glyph->internal->glyph_transformed = 0;
549 metrics->vertAdvance = (
face->type1.font_bbox.yMax -
550 face->type1.font_bbox.yMin ) >> 16;
551 t1glyph->linearVertAdvance =
metrics->vertAdvance;
557 t1glyph->linearVertAdvance =
561 t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;
563 if ( t1size && t1size->metrics.y_ppem < 24 )
568 if ( font_matrix.
xx != 0x10000L || font_matrix.
yy != 0x10000L ||
569 font_matrix.
xy != 0 || font_matrix.
yx != 0 )
579 if ( font_offset.
x || font_offset.
y )
585 metrics->horiAdvance += font_offset.
x;
586 metrics->vertAdvance += font_offset.
y;
601 if ( !hinting || !
decoder.builder.hints_funcs )
602 for (
n =
cur->n_points;
n > 0;
n--,
vec++ )
633 t1glyph->control_len = glyph_data.
length;
639#ifdef FT_CONFIG_OPTION_INCREMENTAL
640 if ( glyph_data_loaded &&
face->root.internal->incremental_interface )
642 face->root.internal->incremental_interface->funcs->free_glyph_data(
643 face->root.internal->incremental_interface->object,
648 t1glyph->control_data =
NULL;
649 t1glyph->control_len = 0;
653 if ( must_finish_decoder )
657 free(decoder_allocated);
ios_base &_STLP_CALL internal(ios_base &__s)
#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_ASSERT(condition)
#define FT_TRACE5(varformat)
#define FT_TRACE6(varformat)
#define FT_TRACE1(varformat)
#define FT_HINTING_FREETYPE
#define FT_OUTLINE_HIGH_PRECISION
#define FT_OUTLINE_REVERSE_FILL
FT_BEGIN_HEADER typedef signed long FT_Pos
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)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLenum GLuint GLint GLenum face
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
struct @1789::@1790 driver
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
struct PSAux_ServiceRec_ * PSAux_Service
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)
T1_Get_Advances(FT_Face t1face, FT_UInt first, FT_UInt count, FT_Int32 load_flags, FT_Fixed *advances)
T1_Compute_Max_Advance(T1_Face face, FT_Pos *max_advance)
T1_Load_Glyph(FT_GlyphSlot t1glyph, FT_Size t1size, FT_UInt glyph_index, FT_Int32 load_flags)
T1_Parse_Glyph(T1_Decoder decoder, FT_UInt glyph_index)
static FT_Error T1_Parse_Glyph_And_Get_Char_String(T1_Decoder decoder, FT_UInt glyph_index, FT_Data *char_string, FT_Bool *force_scaling)
struct T1_GlyphSlotRec_ * T1_GlyphSlot
struct T1_FaceRec_ * T1_Face