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
26#include FT_INTERNAL_CFF_TYPES_H
39#define FT_COMPONENT t1gload
56#ifdef FT_CONFIG_OPTION_INCREMENTAL
58 face->root.internal->incremental_interface;
61#ifdef T1_CONFIG_OPTION_OLD_ENGINE
66 decoder->font_matrix = type1->font_matrix;
67 decoder->font_offset = type1->font_offset;
69#ifdef FT_CONFIG_OPTION_INCREMENTAL
75 glyph_index, char_string );
82 char_string->
pointer = type1->charstrings[glyph_index];
83 char_string->
length = (
FT_Int)type1->charstrings_len[glyph_index];
89#ifdef T1_CONFIG_OPTION_OLD_ENGINE
97 if (
decoder->builder.metrics_only )
108 psaux->ps_decoder_init( &psdecoder,
decoder,
TRUE );
111 &
face->type1.private_dict, &subfont );
128 *force_scaling =
TRUE;
138#ifdef FT_CONFIG_OPTION_INCREMENTAL
172 decoder, glyph_index, &glyph_data,
176#ifdef FT_CONFIG_OPTION_INCREMENTAL
183 if (
face->root.internal->incremental_interface )
184 face->root.internal->incremental_interface->funcs->free_glyph_data(
185 face->root.internal->incremental_interface->object,
219 if (!decoder_allocated)
223#define decoder (*decoder_allocated)
249 free(decoder_allocated);
256 decoder.builder.metrics_only = 1;
257 decoder.builder.load_points = 0;
269 FT_TRACE6((
"T1_Compute_Max_Advance:\n" ));
273 for ( glyph_index = 0; glyph_index < type1->
num_glyphs; glyph_index++ )
277 if ( glyph_index == 0 ||
decoder.builder.advance.x > *max_advance )
278 *max_advance =
decoder.builder.advance.x;
283 FT_TRACE6((
"T1_Compute_Max_Advance: max advance: %f\n",
284 *max_advance / 65536.0 ));
289 free(decoder_allocated);
307 if (!decoder_allocated)
310#define decoder (*decoder_allocated)
325 for ( nn = 0; nn <
count; nn++ )
329 FT_TRACE5((
" idx %d: advance height 0 font units\n",
334 free(decoder_allocated);
351 free(decoder_allocated);
358 decoder.builder.metrics_only = 1;
359 decoder.builder.load_points = 0;
369 for ( nn = 0; nn <
count; nn++ )
377 FT_TRACE5((
" idx %d: advance width %d font unit%s\n",
380 advances[nn] == 1 ?
"" :
"s" ));
384 free(decoder_allocated);
396 FT_Int32 load_flags )
402 if (!decoder_allocated)
405#define decoder (*decoder_allocated)
422#ifdef FT_CONFIG_OPTION_INCREMENTAL
427#ifdef FT_CONFIG_OPTION_INCREMENTAL
428 if ( glyph_index >= (
FT_UInt)
face->root.num_glyphs &&
429 !
face->root.internal->incremental_interface )
431 if ( glyph_index >= (
FT_UInt)
face->root.num_glyphs )
438 FT_TRACE1((
"T1_Load_Glyph: glyph index %d\n", glyph_index ));
447 glyph->
x_scale = t1size->metrics.x_scale;
448 glyph->
y_scale = t1size->metrics.y_scale;
456 t1glyph->outline.n_points = 0;
457 t1glyph->outline.n_contours = 0;
463 glyph->
hint = hinting;
479 must_finish_decoder =
TRUE;
483 decoder.num_subrs = type1->num_subrs;
485 decoder.subrs_len = type1->subrs_len;
486 decoder.subrs_hash = type1->subrs_hash;
497#ifdef FT_CONFIG_OPTION_INCREMENTAL
498 glyph_data_loaded = 1;
501 hinting = glyph->
hint;
502 font_matrix =
decoder.font_matrix;
503 font_offset =
decoder.font_offset;
508 must_finish_decoder =
FALSE;
525 t1glyph->metrics.horiBearingX =
527 t1glyph->metrics.horiAdvance =
530 internal->glyph_matrix = font_matrix;
531 internal->glyph_delta = font_offset;
543 t1glyph->linearHoriAdvance =
545 t1glyph->internal->glyph_transformed = 0;
550 metrics->vertAdvance = (
face->type1.font_bbox.yMax -
551 face->type1.font_bbox.yMin ) >> 16;
552 t1glyph->linearVertAdvance =
metrics->vertAdvance;
558 t1glyph->linearVertAdvance =
564 if ( t1size && t1size->metrics.y_ppem < 24 )
569 if ( font_matrix.
xx != 0x10000L || font_matrix.
yy != 0x10000L ||
570 font_matrix.
xy != 0 || font_matrix.
yx != 0 )
580 if ( font_offset.
x || font_offset.
y )
586 metrics->horiAdvance += font_offset.
x;
587 metrics->vertAdvance += font_offset.
y;
602 if ( !hinting || !
decoder.builder.hints_funcs )
603 for (
n =
cur->n_points;
n > 0;
n--,
vec++ )
634 t1glyph->control_len = glyph_data.
length;
640#ifdef FT_CONFIG_OPTION_INCREMENTAL
641 if ( glyph_data_loaded &&
face->root.internal->incremental_interface )
643 face->root.internal->incremental_interface->funcs->free_glyph_data(
644 face->root.internal->incremental_interface->object,
649 t1glyph->control_data =
NULL;
650 t1glyph->control_len = 0;
654 if ( must_finish_decoder )
658 free(decoder_allocated);
ios_base &_STLP_CALL internal(ios_base &__s)
#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_CALLBACK_DEF(x)
#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)
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
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 @1717::@1718 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