40#define FT_COMPONENT cffgload
49#ifdef FT_CONFIG_OPTION_INCREMENTAL
52 if (
face->root.internal->incremental_interface )
56 face->root.internal->incremental_interface->funcs->get_glyph_data(
57 face->root.internal->incremental_interface->object,
84#ifndef FT_CONFIG_OPTION_INCREMENTAL
88#ifdef FT_CONFIG_OPTION_INCREMENTAL
91 if (
face->root.internal->incremental_interface )
99 face->root.internal->incremental_interface->funcs->free_glyph_data(
100 face->root.internal->incremental_interface->object, &
data );
153 decoder.builder.metrics_only = 1;
154 decoder.builder.load_points = 0;
158 for ( glyph_index = 0; glyph_index <
face->root.num_glyphs;
167 &charstring, &charstring_len );
184 *max_advance =
decoder.builder.advance.x;
197 FT_Int32 load_flags )
203 FT_Bool hinting, scaled, force_scaling;
213 force_scaling =
FALSE;
222 if ( glyph_index != 0 )
226 if ( glyph_index == 0 )
227 return FT_THROW( Invalid_Argument );
231 return FT_THROW( Invalid_Argument );
236 glyph->x_scale = 0x10000L;
237 glyph->y_scale = 0x10000L;
240 glyph->x_scale =
size->root.metrics.x_scale;
241 glyph->y_scale =
size->root.metrics.y_scale;
244#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
257 if (
size->strike_index != 0xFFFFFFFFUL &&
279 glyph->root.outline.n_points = 0;
280 glyph->root.outline.n_contours = 0;
285 glyph->root.metrics.horiBearingX = (
FT_Pos)
metrics.horiBearingX * 64;
286 glyph->root.metrics.horiBearingY = (
FT_Pos)
metrics.horiBearingY * 64;
287 glyph->root.metrics.horiAdvance = (
FT_Pos)
metrics.horiAdvance * 64;
289 glyph->root.metrics.vertBearingX = (
FT_Pos)
metrics.vertBearingX * 64;
290 glyph->root.metrics.vertBearingY = (
FT_Pos)
metrics.vertBearingY * 64;
291 glyph->root.metrics.vertAdvance = (
FT_Pos)
metrics.vertAdvance * 64;
293 glyph->root.format = FT_GLYPH_FORMAT_BITMAP;
297 glyph->root.bitmap_left =
metrics.vertBearingX;
298 glyph->root.bitmap_top =
metrics.vertBearingY;
302 glyph->root.bitmap_left =
metrics.horiBearingX;
303 glyph->root.bitmap_top =
metrics.horiBearingY;
312 glyph->root.linearHoriAdvance =
advance;
315 face->vertical_info &&
316 face->vertical.number_Of_VMetrics > 0 );
319 if ( has_vertical_info )
325 glyph->root.linearVertAdvance =
advance;
330 if (
face->os2.version != 0xFFFFU )
331 glyph->root.linearVertAdvance = (
FT_Pos)
332 (
face->os2.sTypoAscender -
face->os2.sTypoDescender );
334 glyph->root.linearVertAdvance = (
FT_Pos)
335 (
face->horizontal.Ascender -
face->horizontal.Descender );
347 return FT_THROW( Invalid_Argument );
369 if ( top_upm != sub_upm )
371 glyph->x_scale =
FT_MulDiv( glyph->x_scale, top_upm, sub_upm );
372 glyph->y_scale =
FT_MulDiv( glyph->y_scale, top_upm, sub_upm );
374 force_scaling =
TRUE;
383 glyph->root.outline.n_points = 0;
384 glyph->root.outline.n_contours = 0;
391 glyph->hint = hinting;
392 glyph->scaled = scaled;
393 glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
396#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
418 &charstring, &charstring_len );
420 goto Glyph_Build_Finished;
424 goto Glyph_Build_Finished;
426#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
450 force_scaling =
TRUE;
451 glyph->hint = hinting;
462 goto Glyph_Build_Finished;
464#ifdef FT_CONFIG_OPTION_INCREMENTAL
467 if (
face->root.internal->incremental_interface )
469 glyph->root.control_data =
NULL;
470 glyph->root.control_len = 0;
482 if ( csindex->offsets )
484 glyph->root.control_data = csindex->bytes +
485 csindex->offsets[glyph_index] - 1;
486 glyph->root.control_len = (
FT_Long)charstring_len;
490 Glyph_Build_Finished:
497#ifdef FT_CONFIG_OPTION_INCREMENTAL
501 face->root.internal->incremental_interface &&
502 face->root.internal->incremental_interface->funcs->get_glyph_metrics )
512 error =
face->root.internal->incremental_interface->funcs->get_glyph_metrics(
513 face->root.internal->incremental_interface->object,
536 glyph->root.metrics.horiBearingX =
decoder.builder.left_bearing.x;
537 glyph->root.metrics.horiAdvance =
decoder.glyph_width;
538 internal->glyph_matrix = font_matrix;
539 internal->glyph_delta = font_offset;
549 if (
face->horizontal.number_Of_HMetrics )
559 metrics->horiAdvance = horiAdvance;
560 metrics->horiBearingX = horiBearingX;
561 glyph->root.linearHoriAdvance = horiAdvance;
567 glyph->root.linearHoriAdvance =
decoder.glyph_width;
570 glyph->root.internal->glyph_transformed = 0;
572 has_vertical_info =
FT_BOOL(
face->vertical_info &&
573 face->vertical.number_Of_VMetrics > 0 );
576 if ( has_vertical_info )
586 metrics->vertBearingY = vertBearingY;
587 metrics->vertAdvance = vertAdvance;
592 if (
face->os2.version != 0xFFFFU )
594 face->os2.sTypoDescender );
597 face->horizontal.Descender );
600 glyph->root.linearVertAdvance =
metrics->vertAdvance;
602 glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
604 glyph->root.outline.flags = 0;
605 if (
size &&
size->root.metrics.y_ppem < 24 )
611 if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L ||
612 font_matrix.xy != 0 || font_matrix.yx != 0 )
622 if ( font_offset.x || font_offset.y )
628 metrics->horiAdvance += font_offset.x;
629 metrics->vertAdvance += font_offset.y;
643 if ( !hinting || !
decoder.builder.hints_funcs )
644 for (
n =
cur->n_points;
n > 0;
n--,
vec++ )
664 if ( has_vertical_info )
ios_base &_STLP_CALL internal(ios_base &__s)
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
cff_slot_load(CFF_GlyphSlot glyph, CFF_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
cff_get_glyph_data(TT_Face face, FT_UInt glyph_index, FT_Byte **pointer, FT_ULong *length)
cff_free_glyph_data(TT_Face face, FT_Byte **pointer, FT_ULong length)
cff_charset_cid_to_gindex(CFF_Charset charset, FT_UInt cid)
cff_index_forget_element(CFF_Index idx, FT_Byte **pbytes)
cff_fd_select_get(CFF_FDSelect fdselect, FT_UInt glyph_index)
cff_index_access_element(CFF_Index idx, FT_UInt element, FT_Byte **pbytes, FT_ULong *pbyte_len)
FT_BEGIN_HEADER typedef TT_Face CFF_Face
struct CFF_FontRec_ * CFF_Font
FT_BEGIN_HEADER struct CFF_IndexRec_ * CFF_Index
#define FT_LOAD_VERTICAL_LAYOUT
#define FT_LOAD_TARGET_MODE(x)
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
#define FT_LOAD_SBITS_ONLY
#define FT_LOAD_NO_BITMAP
#define FT_LOAD_NO_RECURSE
#define FT_LOAD_ADVANCE_ONLY
#define FT_LOAD_NO_HINTING
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_MulFix(FT_Long a, FT_Long b)
#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
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei const GLvoid * pointer
GLenum GLuint GLint GLenum face
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
GLuint GLsizei GLsizei * length
struct @1789::@1790 driver
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
struct PSAux_ServiceRec_ * PSAux_Service
SFNT_Interface * SFNT_Service
CFF_SubFont subfonts[CFF_MAX_CID_FONTS]
CFF_IndexRec charstrings_index
CFF_FDSelectRec fd_select
CFF_FontRecDictRec font_dict
void(* ps_decoder_init)(PS_Decoder *ps_decoder, void *decoder, FT_Bool is_t1)
const CFF_Decoder_FuncsRec * cff_decoder_funcs
TT_Load_Table_Func load_eblc
TT_Load_SBit_Image_Func load_sbit_image
struct TT_FaceRec_ * TT_Face