40#include FT_INTERNAL_DEBUG_H
47#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
48#include FT_MULTIPLE_MASTERS_H
49#include FT_SERVICE_MULTIPLE_MASTERS_H
52#include FT_SERVICE_CFF_TABLE_LOAD_H
55#define CF2_MAX_SIZE cf2_intToFixed( 2000 )
74 return FT_THROW( Invalid_Size_Handle );
79 if ( unitsPerEm > 0x7FFF )
144 builder = &
outline->decoder->builder;
166 builder = &
outline->decoder->builder;
210 builder = &
outline->decoder->builder;
316 FT_Bool is_t1 = decoder->builder.is_t1;
320 ( is_t1 || decoder->cff ) );
322 if ( is_t1 && !decoder->current_subfont )
324 FT_ERROR((
"cf2_decoder_parse_charstrings (Type 1): "
325 "SubFont missing. Use `t1_make_subfont' first\n" ));
329 memory = decoder->builder.memory;
335 if ( !decoder->cf2_instance->data )
337 decoder->cf2_instance->finalizer =
340 if (
FT_ALLOC( decoder->cf2_instance->data,
349 font->cffload = (FT_Service_CFFLoad)decoder->cff->cffload;
357 font->decoder = decoder;
358 font->outline.decoder = decoder;
366 FT_Bool no_stem_darkening_driver =
367 driver->no_stem_darkening;
368 FT_Char no_stem_darkening_font =
383 FT_ASSERT( charstring_base + charstring_len >= charstring_base );
387 buf.ptr = charstring_base;
388 buf.end = charstring_base + charstring_len;
407 font->renderingFlags = 0;
410 if ( scaled && ( !no_stem_darkening_font ||
411 ( no_stem_darkening_font < 0 &&
412 !no_stem_darkening_driver ) ) )
415 font->darkenParams[0] =
driver->darken_params[0];
416 font->darkenParams[1] =
driver->darken_params[1];
417 font->darkenParams[2] =
driver->darken_params[2];
418 font->darkenParams[3] =
driver->darken_params[3];
419 font->darkenParams[4] =
driver->darken_params[4];
420 font->darkenParams[5] =
driver->darken_params[5];
421 font->darkenParams[6] =
driver->darken_params[6];
422 font->darkenParams[7] =
driver->darken_params[7];
437 return FT_ERR( Invalid_File_Format );
450 FT_ASSERT( decoder && decoder->current_subfont );
452 return decoder->current_subfont;
462 return &decoder->cff->vstore;
472 return decoder->cff->top_font.font_dict.maxstack;
476#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
487 FT_Service_MultiMasters mm;
495 mm = (FT_Service_MultiMasters)
face->mm;
507 decoder->builder.face &&
508 decoder->builder.face->size );
520 decoder->builder.face->size->metrics.y_ppem );
530 FT_ASSERT( decoder && decoder->current_subfont );
533 decoder->current_subfont->private_dict.standard_height );
540 FT_ASSERT( decoder && decoder->current_subfont );
543 decoder->current_subfont->private_dict.standard_width );
554 FT_ASSERT( decoder && decoder->current_subfont );
557 decoder->current_subfont->private_dict.blue_scale,
560 decoder->current_subfont->private_dict.blue_shift );
562 decoder->current_subfont->private_dict.blue_fuzz );
573 FT_ASSERT( decoder && decoder->current_subfont );
575 *
count = decoder->current_subfont->private_dict.num_blue_values;
577 &decoder->current_subfont->private_dict.blue_values;
586 FT_ASSERT( decoder && decoder->current_subfont );
588 *
count = decoder->current_subfont->private_dict.num_other_blues;
590 &decoder->current_subfont->private_dict.other_blues;
599 FT_ASSERT( decoder && decoder->current_subfont );
601 *
count = decoder->current_subfont->private_dict.num_family_blues;
603 &decoder->current_subfont->private_dict.family_blues;
612 FT_ASSERT( decoder && decoder->current_subfont );
614 *
count = decoder->current_subfont->private_dict.num_family_other_blues;
616 &decoder->current_subfont->private_dict.family_other_blues;
623 FT_ASSERT( decoder && decoder->current_subfont );
625 return decoder->current_subfont->private_dict.language_group;
643 idx = (
CF2_UInt)( subrNum + decoder->globals_bias );
644 if (
idx >= decoder->num_globals )
650 buf->ptr = decoder->globals[
idx];
651 buf->end = decoder->globals[
idx + 1];
675#ifdef FT_CONFIG_OPTION_INCREMENTAL
678 if ( decoder->builder.face->internal->incremental_interface )
685 return FT_THROW( Invalid_Glyph_Format );
688 error = decoder->get_glyph_callback( (
TT_Face)decoder->builder.face,
699 buf->start = charstring;
700 buf->end = charstring +
len;
714 decoder->free_glyph_callback( (
TT_Face)decoder->builder.face,
732 face->root.internal->incremental_interface;
738 error = inc->funcs->get_glyph_data( inc->object,
739 glyph_index, &glyph_data );
744 glyph_data.
pointer = type1->charstrings[glyph_index];
745 glyph_data.
length = (
FT_Int)type1->charstrings_len[glyph_index];
754 FT_ASSERT( charstring_base + charstring_len >= charstring_base );
758 buf->ptr = charstring_base;
759 buf->end = charstring_base + charstring_len;
776#ifdef FT_CONFIG_OPTION_INCREMENTAL
782 if (
face->root.internal->incremental_interface )
783 face->root.internal->incremental_interface->funcs->free_glyph_data(
784 face->root.internal->incremental_interface->object,
802 idx = (
CF2_UInt)( subrNum + decoder->locals_bias );
803 if (
idx >= decoder->num_locals )
808 buf->start = decoder->locals[
idx];
810 if ( decoder->builder.is_t1 )
815 if ( decoder->locals_len )
816 buf->end =
buf->start + decoder->locals_len[
idx];
821 buf->start += ( decoder->lenIV >= 0 ? decoder->lenIV : 0 );
822 buf->end = decoder->locals[
idx + 1];
827 FT_ERROR((
"cf2_initLocalRegionBuffer (Type 1 mode):"
828 " invoking empty subrs\n" ));
833 buf->end = decoder->locals[
idx + 1];
845 FT_ASSERT( decoder && decoder->current_subfont );
848 decoder->current_subfont->private_dict.default_width );
855 FT_ASSERT( decoder && decoder->current_subfont );
858 decoder->current_subfont->private_dict.nominal_width );
870 outline->root.windingMomentum = 0;
cff_lookup_glyph_by_stdcharcode(CFF_Font cff, FT_Int charcode)
#define FT_CONFIG_OPTION_INCREMENTAL
FT_DivFix(FT_Long a, FT_Long b)
#define FT_ASSERT(condition)
#define FT_ERROR(varformat)
FT_GlyphLoader_Add(FT_GlyphLoader loader)
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_ALLOC(ptr, size)
#define FT_FACE_DRIVER(x)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
void(* FT_Generic_Finalizer)(void *object)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei width
GLuint GLenum GLenum transform
GLenum GLuint GLint GLenum face
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
static char memory[1024 *256]
struct @1673::@1674 driver
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
#define cf2_intToFixed(i)
#define cf2_fixedToInt(x)
cf2_getGlyphOutline(CF2_Font font, CF2_Buffer charstring, const CF2_Matrix *transform, CF2_F16Dot16 *glyphWidth)
static void cf2_builder_cubeTo(CF2_OutlineCallbacks callbacks, const CF2_CallbackParams params)
static void cf2_builder_moveTo(CF2_OutlineCallbacks callbacks, const CF2_CallbackParams params)
cf2_getBlueValues(PS_Decoder *decoder, size_t *count, FT_Pos **data)
cf2_freeSeacComponent(PS_Decoder *decoder, CF2_Buffer buf)
cf2_getLanguageGroup(PS_Decoder *decoder)
static FT_UShort cf2_getUnitsPerEm(PS_Decoder *decoder)
cf2_getVStore(PS_Decoder *decoder)
static void cf2_free_instance(void *ptr)
cf2_freeT1SeacComponent(PS_Decoder *decoder, CF2_Buffer buf)
static void cf2_setGlyphWidth(CF2_Outline outline, CF2_Fixed width)
cf2_initLocalRegionBuffer(PS_Decoder *decoder, CF2_Int subrNum, CF2_Buffer buf)
cf2_getNominalWidthX(PS_Decoder *decoder)
cf2_getStdVW(PS_Decoder *decoder)
static void cf2_outline_init(CF2_Outline outline, FT_Memory memory, FT_Error *error)
cf2_outline_reset(CF2_Outline outline)
static void cf2_getScaleAndHintFlag(PS_Decoder *decoder, CF2_Fixed *x_scale, CF2_Fixed *y_scale, FT_Bool *hinted, FT_Bool *scaled)
cf2_getFamilyOtherBlues(PS_Decoder *decoder, size_t *count, FT_Pos **data)
cf2_initGlobalRegionBuffer(PS_Decoder *decoder, CF2_Int subrNum, CF2_Buffer buf)
static void cf2_builder_lineTo(CF2_OutlineCallbacks callbacks, const CF2_CallbackParams params)
cf2_getT1SeacComponent(PS_Decoder *decoder, FT_UInt glyph_index, CF2_Buffer buf)
cf2_getPpemY(PS_Decoder *decoder)
cf2_getMaxstack(PS_Decoder *decoder)
static FT_Error cf2_checkTransform(const CF2_Matrix *transform, CF2_Int unitsPerEm)
cf2_decoder_parse_charstrings(PS_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
cf2_getStdHW(PS_Decoder *decoder)
cf2_getFamilyBlues(PS_Decoder *decoder, size_t *count, FT_Pos **data)
cf2_getOtherBlues(PS_Decoder *decoder, size_t *count, FT_Pos **data)
cf2_getSubfont(PS_Decoder *decoder)
cf2_outline_close(CF2_Outline outline)
cf2_getBlueMetrics(PS_Decoder *decoder, CF2_Fixed *blueScale, CF2_Fixed *blueShift, CF2_Fixed *blueFuzz)
cf2_getDefaultWidthX(PS_Decoder *decoder)
cf2_getSeacComponent(PS_Decoder *decoder, CF2_Int code, CF2_Buffer buf)
struct CF2_OutlineRec_ * CF2_Outline
#define CF2_FlagsDarkened
struct CF2_FontRec_ * CF2_Font
ps_builder_close_contour(PS_Builder *builder)
ps_builder_add_point(PS_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
ps_builder_add_point1(PS_Builder *builder, FT_Pos x, FT_Pos y)
ps_builder_start_point(PS_Builder *builder, FT_Pos x, FT_Pos y)
ps_builder_check_points(PS_Builder *builder, FT_Int count)
FT_BEGIN_HEADER struct CF2_BufferRec_ CF2_BufferRec
FT_BEGIN_HEADER struct CF2_BufferRec_ * CF2_Buffer
FT_Face_Internal internal
FT_Char no_stem_darkening
struct T1_FaceRec_ * T1_Face
struct TT_FaceRec_ * TT_Face
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList