31#define Fix2Int( f ) ( (FT_Int)(FT_Short)( (f) >> 16 ) )
40#define FT_COMPONENT t1decode
137 FT_Service_PsCMaps psnames =
decoder->psnames;
141 if ( charcode < 0 || charcode > 255 )
144 glyph_name = psnames->adobe_std_strings(
145 psnames->adobe_std_encoding[charcode]);
153 name[0] == glyph_name[0] &&
162#ifdef T1_CONFIG_OPTION_OLD_ENGINE
190 FT_Service_PsCMaps psnames =
decoder->psnames;
194 if ( charcode < 0 || charcode > 255 )
197 glyph_name = psnames->adobe_std_strings(
198 psnames->adobe_std_encoding[charcode]);
206 name[0] == glyph_name[0] &&
263 FT_Int bchar_index, achar_index;
270#ifdef FT_CONFIG_OPTION_INCREMENTAL
277 FT_ERROR((
"t1operator_seac: invalid nested seac\n" ));
281 if (
decoder->builder.metrics_only )
283 FT_ERROR((
"t1operator_seac: unexpected seac\n" ));
288 adx +=
decoder->builder.left_bearing.x;
292#ifdef FT_CONFIG_OPTION_INCREMENTAL
293 if (
decoder->glyph_names == 0 &&
294 !
face->root.internal->incremental_interface )
296 if (
decoder->glyph_names == 0 )
300 " glyph names table not available in this font\n" ));
304#ifdef FT_CONFIG_OPTION_INCREMENTAL
305 if (
face->root.internal->incremental_interface )
314 bchar_index = t1_lookup_glyph_by_stdcharcode(
decoder, bchar );
315 achar_index = t1_lookup_glyph_by_stdcharcode(
decoder, achar );
318 if ( bchar_index < 0 || achar_index < 0 )
321 " invalid seac character code arguments\n" ));
327 if (
decoder->builder.no_recurse )
339 subg = loader->current.subglyphs;
342 subg->index = bchar_index;
350 subg->index = achar_index;
357 glyph->
subglyphs = loader->base.subglyphs;
358 glyph->
format = FT_GLYPH_FORMAT_COMPOSITE;
360 loader->current.num_subglyphs = 2;
372 left_bearing =
decoder->builder.left_bearing;
387 left_bearing =
decoder->builder.left_bearing;
391 decoder->builder.left_bearing.x = 0;
392 decoder->builder.left_bearing.y = 0;
394 decoder->builder.pos_x = adx - asb;
410 decoder->builder.left_bearing = left_bearing;
453 FT_Int known_othersubr_result_cnt = 0;
454 FT_Int unknown_othersubr_result_cnt = 0;
460#ifdef FT_DEBUG_LEVEL_TRACE
470 seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
491 zone->base = charstring_base;
492 limit =
zone->limit = charstring_base + charstring_len;
497 x = orig_x = builder->
pos_x;
498 y = orig_y = builder->
pos_y;
514 FT_ASSERT( known_othersubr_result_cnt == 0 ||
515 unknown_othersubr_result_cnt == 0 );
517#ifdef FT_DEBUG_LEVEL_TRACE
594 FT_ERROR((
"t1_decoder_parse_charstrings:"
595 " invalid escape (12+EOF)\n" ));
630 FT_ERROR((
"t1_decoder_parse_charstrings:"
631 " invalid escape (12+%d)\n",
640 FT_ERROR((
"t1_decoder_parse_charstrings:"
641 " unexpected EOF in integer\n" ));
645 value = (FT_Int32)( ( (FT_UInt32)
ip[0] << 24 ) |
646 ( (FT_UInt32)
ip[1] << 16 ) |
647 ( (FT_UInt32)
ip[2] << 8 ) |
661 FT_ERROR((
"t1_decoder_parse_charstrings:"
662 " no `div' after large integer\n" ));
678 value = (FT_Int32)
ip[-1] - 139;
683 FT_ERROR((
"t1_decoder_parse_charstrings:"
684 " unexpected EOF in integer\n" ));
689 value = ( (
ip[-2] - 247 ) * 256 ) +
ip[-1] + 108;
691 value = -( ( (
ip[-2] - 251 ) * 256 ) +
ip[-1] + 108 );
699 FT_ERROR((
"t1_decoder_parse_charstrings:"
700 " invalid byte (%d)\n",
ip[-1] ));
705 if ( unknown_othersubr_result_cnt > 0 )
717 unknown_othersubr_result_cnt = 0;
724 FT_ERROR((
"t1_decoder_parse_charstrings:"
725 " no `div' after large integer\n" ));
739 FT_ERROR((
"t1_decoder_parse_charstrings: stack overflow\n" ));
743#ifdef FT_DEBUG_LEVEL_TRACE
759#ifdef FT_DEBUG_LEVEL_TRACE
765 goto Stack_Underflow;
785 goto Stack_Underflow;
789 known_othersubr_result_cnt = 0;
790 unknown_othersubr_result_cnt = 0;
812 goto Unexpected_OtherSubr;
815 decoder->num_flex_vectors != 7 )
817 FT_ERROR((
"t1_decoder_parse_charstrings:"
818 " unexpected flex end\n" ));
825 known_othersubr_result_cnt = 2;
830 goto Unexpected_OtherSubr;
846 goto Unexpected_OtherSubr;
850 FT_ERROR((
"t1_decoder_parse_charstrings:"
851 " missing flex start\n" ));
878 goto Unexpected_OtherSubr;
880 known_othersubr_result_cnt = 1;
907 FT_ERROR((
"t1_decoder_parse_charstrings:"
908 " unexpected multiple masters operator\n" ));
912 num_points = (
FT_UInt)subr_no - 13 + ( subr_no == 18 );
915 FT_ERROR((
"t1_decoder_parse_charstrings:"
916 " incorrect number of multiple masters arguments\n" ));
936 delta =
top + num_points;
938 for ( nn = 0; nn < num_points; nn++ )
951 known_othersubr_result_cnt = (
FT_Int)num_points;
965 goto Unexpected_OtherSubr;
971 goto Unexpected_OtherSubr;
984 goto Unexpected_OtherSubr;
988 known_othersubr_result_cnt = 1;
995 goto Unexpected_OtherSubr;
999 known_othersubr_result_cnt = 1;
1006 goto Unexpected_OtherSubr;
1010 known_othersubr_result_cnt = 1;
1017 goto Unexpected_OtherSubr;
1021 known_othersubr_result_cnt = 1;
1033 goto Unexpected_OtherSubr;
1038 goto Unexpected_OtherSubr;
1054 goto Unexpected_OtherSubr;
1059 goto Unexpected_OtherSubr;
1064 known_othersubr_result_cnt = 1;
1081 goto Unexpected_OtherSubr;
1086 known_othersubr_result_cnt = 1;
1093 goto Unexpected_OtherSubr;
1100 if ( Rand >= 0x8000L )
1105 seed =
FT_MulFix( seed, 0x10000L - seed );
1110 known_othersubr_result_cnt = 1;
1114 if (
arg_cnt >= 0 && subr_no >= 0 )
1116 FT_ERROR((
"t1_decoder_parse_charstrings:"
1117 " unknown othersubr [%d %d], wish me luck\n",
1119 unknown_othersubr_result_cnt =
arg_cnt;
1124 Unexpected_OtherSubr:
1125 FT_ERROR((
"t1_decoder_parse_charstrings:"
1126 " invalid othersubr [%d %d]\n",
arg_cnt, subr_no ));
1130 top += known_othersubr_result_cnt;
1142 goto Stack_Underflow;
1150#ifdef FT_DEBUG_LEVEL_TRACE
1163 FT_TRACE0((
"t1_decoder_parse_charstrings:"
1164 " too much operands on the stack"
1165 " (seen %d, expected %d)\n",
1202#ifdef FT_DEBUG_LEVEL_TRACE
1204 if (
decoder->len_buildchar > 0 )
1211 for (
i = 0;
i <
decoder->len_buildchar;
i++ )
1236 orig_y =
y = builder->
pos_y;
1252 return t1operator_seac(
decoder,
1458 if ( idx < 0 || idx >=
decoder->num_subrs )
1460 FT_ERROR((
"t1_decoder_parse_charstrings:"
1461 " invalid subrs index\n" ));
1467 FT_ERROR((
"t1_decoder_parse_charstrings:"
1468 " too many nested subrs\n" ));
1495 FT_ERROR((
"t1_decoder_parse_charstrings:"
1496 " invoking empty subrs\n" ));
1509 if ( known_othersubr_result_cnt > 0 )
1511 known_othersubr_result_cnt--;
1516 if ( unknown_othersubr_result_cnt == 0 )
1518 FT_ERROR((
"t1_decoder_parse_charstrings:"
1519 " no more operands for othersubr\n" ));
1523 unknown_othersubr_result_cnt--;
1530 if ( zone <= decoder->zones )
1532 FT_ERROR((
"t1_decoder_parse_charstrings:"
1533 " unexpected return\n" ));
1611 if (
decoder->flex_state != 1 )
1613 FT_ERROR((
"t1_decoder_parse_charstrings:"
1614 " unexpected `setcurrentpoint'\n" ));
1632 FT_ERROR((
"t1_decoder_parse_charstrings:"
1633 " unhandled opcode %d\n",
op ));
1644#ifdef FT_DEBUG_LEVEL_TRACE
1662 return FT_THROW( Stack_Underflow );
1701#ifdef FT_DEBUG_LEVEL_TRACE
1713 zone->base = charstring_base;
1714 limit =
zone->limit = charstring_base + charstring_len;
1727#ifdef FT_DEBUG_LEVEL_TRACE
1774 FT_ERROR((
"t1_decoder_parse_metrics:"
1775 " invalid escape (12+EOF)\n" ));
1796 FT_ERROR((
"t1_decoder_parse_metrics:"
1797 " unexpected EOF in integer\n" ));
1801 value = (FT_Int32)( ( (FT_UInt32)
ip[0] << 24 ) |
1802 ( (FT_UInt32)
ip[1] << 16 ) |
1803 ( (FT_UInt32)
ip[2] << 8 ) |
1818 FT_ERROR((
"t1_decoder_parse_metrics:"
1819 " no `div' after large integer\n" ));
1828 value = (FT_Int32)( (FT_UInt32)
value << 16 );
1837 value = (FT_Int32)
ip[-1] - 139;
1842 FT_ERROR((
"t1_decoder_parse_metrics:"
1843 " unexpected EOF in integer\n" ));
1848 value = ( (
ip[-2] - 247 ) * 256 ) +
ip[-1] + 108;
1850 value = -( ( (
ip[-2] - 251 ) * 256 ) +
ip[-1] + 108 );
1854 value = (FT_Int32)( (FT_UInt32)
value << 16 );
1858 FT_ERROR((
"t1_decoder_parse_metrics:"
1859 " invalid byte (%d)\n",
ip[-1] ));
1866 FT_ERROR((
"t1_decoder_parse_metrics:"
1867 " no `div' after large integer\n" ));
1880 FT_ERROR((
"t1_decoder_parse_metrics: stack overflow\n" ));
1884#ifdef FT_DEBUG_LEVEL_TRACE
1902 goto Stack_Underflow;
1904#ifdef FT_DEBUG_LEVEL_TRACE
1916 " too much operands on the stack"
1917 " (seen %ld, expected %d)\n",
1997 if ( idx < 0 || idx >=
decoder->num_subrs )
1999 FT_ERROR((
"t1_decoder_parse_metrics:"
2000 " invalid subrs index\n" ));
2006 FT_ERROR((
"t1_decoder_parse_metrics:"
2007 " too many nested subrs\n" ));
2034 FT_ERROR((
"t1_decoder_parse_metrics:"
2035 " invoking empty subrs\n" ));
2048 if ( zone <= decoder->zones )
2050 FT_ERROR((
"t1_decoder_parse_metrics:"
2051 " unexpected return\n" ));
2062 FT_ERROR((
"t1_decoder_parse_metrics:"
2063 " unhandled opcode %d\n",
op ));
2076 FT_ERROR((
"t1_decoder_parse_metrics:"
2077 " no width, found op %d instead\n",
2083 return FT_THROW( Stack_Underflow );
2105 FT_Service_PsCMaps psnames;
2112 " the `psnames' module is not available\n" ));
2113 return FT_THROW( Unimplemented_Feature );
2126 decoder->glyph_names = glyph_names;
2127 decoder->hint_mode = hint_mode;
2129 decoder->parse_callback = parse_callback;
2146 if (
decoder->cf2_instance.finalizer )
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
enum FT_Render_Mode_ FT_Render_Mode
FT_DivFix(FT_Long a, FT_Long b)
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS
struct FT_GlyphSlotRec_ * FT_GlyphSlot
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
FT_MulFix(FT_Long a, FT_Long b)
#define FT_ASSERT(condition)
#define FT_TRACE0(varformat)
#define FT_ERROR(varformat)
#define FT_TRACE5(varformat)
#define FT_TRACE4(varformat)
cannot open resource broken file module version is too low unimplemented feature broken offset within table missing module invalid glyph index unsupported glyph image format invalid outline too many hints invalid object handle invalid module handle invalid size handle invalid charmap handle invalid stream handle too many extensions unlisted object invalid stream seek invalid stream read invalid frame operation invalid frame read raster corrupted negative height while rastering invalid opcode stack overflow bad argument invalid reference found ENDF opcode in execution stream invalid code range too many function definitions SFNT font table missing name table missing horizontal PostScript(post) table missing" ) FT_ERRORDEF_( Invalid_Horiz_Metrics
FT_GlyphLoader_Add(FT_GlyphLoader loader)
FT_GlyphLoader_Prepare(FT_GlyphLoader loader)
FT_GlyphLoader_CheckSubGlyphs(FT_GlyphLoader loader, FT_UInt n_subs)
size_t * ft_hash_num_lookup(FT_Int num, FT_Hash hash)
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_SET_ERROR(expression)
#define FT_ARRAY_ZERO(dest, count)
#define T1_MAX_CHARSTRINGS_OPERANDS
#define T1_MAX_SUBRS_CALLS
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble top
GLenum GLuint GLint GLenum face
GLboolean GLenum GLenum GLvoid * values
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
const struct T1_Hints_FuncsRec_ * T1_Hints_Funcs
typedefFT_BEGIN_HEADER struct PSH_GlobalsRec_ * PSH_Globals
int jpeg_marker_parser_method routine
static char memory[1024 *256]
FT_Error(* T1_Decoder_Callback)(T1_Decoder decoder, FT_UInt glyph_index)
FT_CALLBACK_TABLE_DEF const T1_Decoder_FuncsRec t1_decoder_funcs
t1_builder_close_contour(T1_Builder builder)
t1_builder_start_point(T1_Builder builder, FT_Pos x, FT_Pos y)
t1_builder_init(T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot glyph, FT_Bool hinting)
t1_builder_add_point1(T1_Builder builder, FT_Pos x, FT_Pos y)
t1_builder_check_points(T1_Builder builder, FT_Int count)
t1_builder_done(T1_Builder builder)
t1_builder_add_point(T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag)
FT_Slot_Internal internal
T1_ParseState parse_state
T1_Hints_SetStemFunc stem
T1_Hints_SetStem3Func stem3
static const FT_Int t1_args_count[op_max]
t1_decoder_parse_metrics(T1_Decoder decoder, FT_Byte *charstring_base, FT_UInt charstring_len)
enum T1_Operator_ T1_Operator
t1_decoder_done(T1_Decoder decoder)
t1_decoder_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 parse_callback)
t1_lookup_glyph_by_stdcharcode_ps(PS_Decoder *decoder, FT_Int charcode)
struct T1_FaceRec_ * T1_Face
static unsigned arg_cnt(const DISPPARAMS *dp)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList