#include <ft2build.h>
#include "ttgload.h"
#include "ttpload.h"
#include "tterrors.h"
Go to the source code of this file.
#define ARGS_ARE_WORDS 0x0001 |
#define ARGS_ARE_XY_VALUES 0x0002 |
Definition at line 53 of file ttgload.c.
Referenced by load_truetype_glyph(), and TT_Process_Composite_Component().
Definition at line 250 of file ttgload.c.
Referenced by compute_glyph_metrics(), load_truetype_glyph(), TT_Load_Glyph(), TT_Load_Simple_Glyph(), tt_loader_init(), and TT_Process_Simple_Glyph().
#define MORE_COMPONENTS 0x0020 |
#define TT_LOADER_SET_PP | ( | loader | ) |
Value:
do { \ (loader)->pp1.x = (loader)->bbox.xMin - (loader)->left_bearing; \ (loader)->pp1.y = 0; \ (loader)->pp2.x = (loader)->pp1.x + (loader)->advance; \ (loader)->pp2.y = 0; \ (loader)->pp3.x = 0; \ (loader)->pp3.y = (loader)->top_bearing + (loader)->bbox.yMax; \ (loader)->pp4.x = 0; \ (loader)->pp4.y = (loader)->pp3.y - (loader)->vadvance; \ } while ( 0 )
Definition at line 1169 of file ttgload.c.
Referenced by load_truetype_glyph().
#define USE_MY_METRICS 0x0200 |
#define WE_HAVE_A_2X2 0x0080 |
Definition at line 59 of file ttgload.c.
Referenced by TT_Load_Composite_Glyph(), and TT_Process_Composite_Component().
#define WE_HAVE_A_SCALE 0x0008 |
Definition at line 55 of file ttgload.c.
Referenced by TT_Load_Composite_Glyph(), and TT_Process_Composite_Component().
#define WE_HAVE_AN_XY_SCALE 0x0040 |
Definition at line 58 of file ttgload.c.
Referenced by TT_Load_Composite_Glyph(), and TT_Process_Composite_Component().
#define WE_HAVE_INSTR 0x0100 |
Definition at line 1585 of file ttgload.c.
References TT_LoaderRec_::bbox, error, TT_LoaderRec_::face, FT_DivFix(), FT_GLYPH_FORMAT_COMPOSITE, FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH, FT_LOAD_NO_SCALE, FT_MulFix(), FT_Outline_Get_CBox(), FT_Pos, FT_Incremental_InterfaceRec_::funcs, FT_Incremental_FuncsRec_::get_glyph_metrics, TT_LoaderRec_::glyph, height, IS_HINTED, RooFitShortHand::L(), TT_LoaderRec_::linear, TT_LoaderRec_::load_flags, metrics(), FT_Incremental_InterfaceRec_::object, TT_LoaderRec_::pp1, TT_LoaderRec_::pp2, TT_LoaderRec_::pp3, TT_LoaderRec_::pp4, TT_LoaderRec_::size, size, top(), TRUE, tt_face_get_device_metrics(), FT_Vector_::x, FT_BBox_::xMax, FT_BBox_::xMin, FT_Vector_::y, FT_BBox_::yMax, and FT_BBox_::yMin.
Referenced by TT_Load_Glyph().
static FT_Error load_truetype_glyph | ( | TT_Loader | loader, | |
FT_UInt | glyph_index, | |||
FT_UInt | recurse_count, | |||
FT_Bool | header_only | |||
) | [static] |
Definition at line 1192 of file ttgload.c.
References FT_SubGlyphRec_::arg1, FT_SubGlyphRec_::arg2, ARGS_ARE_XY_VALUES, TT_LoaderRec_::bbox, TT_LoaderRec_::byte_len, deltas, error, TT_LoaderRec_::face, FALSE, FT_SubGlyphRec_::flags, FT_GlyphSlotRec_::format, FT_Bool, FT_CONFIG_OPTION_INCREMENTAL, FT_FREE, FT_GLYPH_FORMAT_COMPOSITE, FT_GlyphLoader_Add(), FT_LOAD_NO_RECURSE, FT_LOAD_NO_SCALE, FT_MEM_ZERO, FT_MulFix(), FT_Stream_OpenMemory(), FT_TRACE2, TT_LoaderRec_::gloader, TT_LoaderRec_::glyf_offset, TT_LoaderRec_::glyph, TT_LoaderRec_::glyph_index, i, if(), FT_SubGlyphRec_::index, TT_LoaderRec_::ins_pos, IS_HINTED, RooFitShortHand::L(), TT_LoaderRec_::load_flags, FT_FaceRec_::memory, TT_LoaderRec_::n_contours, NULL, TT_LoaderRec_::pp1, TT_LoaderRec_::pp2, TT_LoaderRec_::pp3, TT_LoaderRec_::pp4, TT_LoaderRec_::size, start_point, TT_LoaderRec_::stream, TT_CONFIG_OPTION_GX_VAR_SUPPORT, tt_face_get_location(), tt_get_metrics(), TT_LOADER_SET_PP, TT_Process_Composite_Component(), TT_Process_Composite_Glyph(), TT_Process_Simple_Glyph(), TT_USE_BYTECODE_INTERPRETER, TT_Vary_Get_Glyph_Deltas(), USE_MY_METRICS, WE_HAVE_INSTR, FT_Vector_::x, FT_BBox_::xMax, FT_BBox_::xMin, FT_Vector_::y, FT_BBox_::yMax, and FT_BBox_::yMin.
Referenced by TT_Load_Glyph().
TT_Access_Glyph_Frame | ( | TT_Loader | loader, | |
FT_UInt | glyph_index, | |||
FT_ULong | offset, | |||
FT_UInt | byte_count | |||
) |
Definition at line 262 of file ttgload.c.
References error, FT_FRAME_ENTER, FT_STREAM_SEEK, FT_TRACE5, FT_UNUSED, and PC3::stream().
Referenced by TT_Init_Glyph_Loading().
TT_Forget_Glyph_Frame | ( | TT_Loader | loader | ) |
Definition at line 288 of file ttgload.c.
References FT_FRAME_EXIT, and PC3::stream().
Referenced by TT_Init_Glyph_Loading().
Definition at line 74 of file ttgload.c.
References FT_TRACE5.
Referenced by tt_get_advances(), and tt_get_metrics().
Definition at line 144 of file ttgload.c.
References TT_LoaderRec_::advance, error, TT_LoaderRec_::face, FALSE, FT_Bool, FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH, TT_LoaderRec_::left_bearing, TT_LoaderRec_::linear, TT_LoaderRec_::linear_def, TT_LoaderRec_::load_flags, metrics(), TT_LoaderRec_::top_bearing, TRUE, TT_Get_HMetrics(), TT_Get_VMetrics(), and TT_LoaderRec_::vadvance.
Referenced by load_truetype_glyph().
Definition at line 104 of file ttgload.c.
References FT_TRACE5, and FT_UNUSED.
Referenced by tt_get_advances(), and tt_get_metrics().
Definition at line 711 of file ttgload.c.
References FT_GlyphSlotRec_::control_len, TT_GlyphZoneRec_::cur, debug, error, TT_LoaderRec_::exec, FT_ARRAY_COPY, FT_Bool, FT_BOOL, FT_CURVE_TAG_HAS_SCANMODE, FT_LOAD_NO_SCALE, FT_PIX_ROUND, FT_Pos, FT_TRACE1, FT_UNUSED, TT_LoaderRec_::gloader, TT_LoaderRec_::glyph, TT_ExecContextRec_::glyphIns, TT_ExecContextRec_::GS, TT_ExecContextRec_::is_composite, TT_LoaderRec_::load_flags, TT_ExecContextRec_::metrics, TT_GlyphZoneRec_::n_points, TT_GlyphZoneRec_::org, TT_GlyphZoneRec_::orus, TT_ExecContextRec_::pedantic_hinting, TT_LoaderRec_::pp1, TT_LoaderRec_::pp2, TT_LoaderRec_::pp3, TT_LoaderRec_::pp4, TT_LoaderRec_::preserve_pps, TT_ExecContextRec_::pts, TT_GraphicsState_::scan_type, TT_LoaderRec_::size, FT_Outline_::tags, translate_array(), tt_coderange_glyph, TT_Run_Context(), TT_Set_CodeRange(), FT_Vector_::x, FT_Size_Metrics_::x_scale, FT_Vector_::y, FT_Size_Metrics_::y_scale, and TT_LoaderRec_::zone.
Referenced by TT_Process_Composite_Glyph(), and TT_Process_Simple_Glyph().
TT_Init_Glyph_Loading | ( | TT_Face | face | ) |
Definition at line 673 of file ttgload.c.
References TT_Access_Glyph_Frame(), TT_Forget_Glyph_Frame(), TT_Load_Composite_Glyph(), TT_Load_Glyph_Header(), and TT_Load_Simple_Glyph().
Referenced by tt_face_init().
TT_Load_Composite_Glyph | ( | TT_Loader | loader | ) |
Definition at line 552 of file ttgload.c.
References FT_SubGlyphRec_::arg1, FT_SubGlyphRec_::arg2, ARGS_ARE_WORDS, error, FT_SubGlyphRec_::flags, FT_GlyphLoader_CheckSubGlyphs(), FT_NEXT_CHAR, FT_NEXT_SHORT, FT_NEXT_USHORT, FT_STREAM_POS, FT_SubGlyphRec_::index, RooFitShortHand::L(), MORE_COMPONENTS, p, PC3::stream(), FT_SubGlyphRec_::transform, WE_HAVE_A_2X2, WE_HAVE_A_SCALE, WE_HAVE_AN_XY_SCALE, FT_Matrix_::xx, FT_Matrix_::xy, xy, FT_Matrix_::yx, and FT_Matrix_::yy.
Referenced by TT_Init_Glyph_Loading().
TT_Load_Glyph | ( | TT_Size | size, | |
TT_GlyphSlot | glyph, | |||
FT_UInt | glyph_index, | |||
FT_Int32 | load_flags | |||
) |
Definition at line 1958 of file ttgload.c.
References compute_glyph_metrics(), TT_LoaderRec_::exec, FALSE, FT_GLYPH_FORMAT_COMPOSITE, FT_GLYPH_FORMAT_OUTLINE, FT_IS_SCALABLE, FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH, FT_LOAD_NO_BITMAP, FT_LOAD_NO_SCALE, FT_LOAD_SBITS_ONLY, FT_OUTLINE_HIGH_PRECISION, FT_OUTLINE_IGNORE_DROPOUTS, FT_OUTLINE_INCLUDE_STUBS, FT_OUTLINE_SINGLE_PASS, FT_OUTLINE_SMART_DROPOUTS, FT_Outline_Translate(), TT_LoaderRec_::gloader, TT_ExecContextRec_::GS, if(), IS_HINTED, load_truetype_glyph(), TT_LoaderRec_::pp1, root, TT_GraphicsState_::scan_control, TT_GraphicsState_::scan_type, TRUE, TT_CONFIG_OPTION_EMBEDDED_BITMAPS, tt_loader_init(), void, and FT_Vector_::x.
Referenced by Load_Glyph().
TT_Load_Glyph_Header | ( | TT_Loader | loader | ) |
Definition at line 298 of file ttgload.c.
References FT_NEXT_SHORT, FT_TRACE5, and p.
Referenced by TT_Init_Glyph_Loading().
TT_Load_Simple_Glyph | ( | TT_Loader | load | ) |
Definition at line 326 of file ttgload.c.
References c, FT_Outline_::contours, error, flag, for(), FT_ASSERT, FT_CURVE_TAG_ON, FT_GLYPHLOADER_CHECK_POINTS, FT_MEM_COPY, FT_NEXT_BYTE, FT_NEXT_SHORT, FT_NEXT_USHORT, FT_Pos, FT_TRACE0, FT_TRACE5, if(), IS_HINTED, FT_Outline_::n_contours, FT_Outline_::n_points, NULL, p, FT_Outline_::points, FT_Outline_::tags, x, and y.
Referenced by TT_Init_Glyph_Loading().
static FT_Error tt_loader_init | ( | TT_Loader | loader, | |
TT_Size | size, | |||
TT_GlyphSlot | glyph, | |||
FT_Int32 | load_flags, | |||
FT_Bool | glyf_table_only | |||
) | [static] |
Definition at line 1811 of file ttgload.c.
References TT_LoaderRec_::exec, FT_GlyphSlotRec_::face, FT_Bool, FT_BOOL, FT_ERROR, FT_FACE_DRIVER, FT_LOAD_NO_HINTING, FT_LOAD_PEDANTIC, FT_LOAD_TARGET_MODE, FT_MEM_ZERO, FT_MulFix(), FT_RENDER_MODE_MONO, FT_STREAM_POS, TT_LoaderRec_::glyf_offset, TT_ExecContextRec_::glyphIns, TT_ExecContextRec_::grayscale, TT_ExecContextRec_::GS, i, if(), TT_GraphicsState_::instruct_control, TT_LoaderRec_::instructions, IS_HINTED, TT_ExecContextRec_::pedantic_hinting, size, PC3::stream(), tt_default_graphics_state, TT_Load_Context(), and TTAG_glyf.
Referenced by TT_Load_Glyph().
static void tt_prepare_zone | ( | TT_GlyphZone | zone, | |
FT_GlyphLoad | load, | |||
FT_UInt | start_point, | |||
FT_UInt | start_contour | |||
) | [static] |
Definition at line 684 of file ttgload.c.
References FT_Outline_::contours, TT_GlyphZoneRec_::contours, TT_GlyphZoneRec_::cur, FT_GlyphLoadRec_::extra_points, FT_GlyphLoadRec_::extra_points2, TT_GlyphZoneRec_::first_point, TT_GlyphZoneRec_::n_contours, FT_Outline_::n_contours, FT_Outline_::n_points, TT_GlyphZoneRec_::n_points, TT_GlyphZoneRec_::org, TT_GlyphZoneRec_::orus, FT_GlyphLoadRec_::outline, FT_Outline_::points, FT_Outline_::tags, and TT_GlyphZoneRec_::tags.
Referenced by TT_Process_Composite_Glyph(), and TT_Process_Simple_Glyph().
static FT_Error TT_Process_Composite_Component | ( | TT_Loader | loader, | |
FT_SubGlyph | subglyph, | |||
FT_UInt | start_point, | |||
FT_UInt | num_base_points | |||
) | [static] |
Definition at line 931 of file ttgload.c.
References FT_SubGlyphRec_::arg1, FT_SubGlyphRec_::arg2, ARGS_ARE_XY_VALUES, FT_SubGlyphRec_::flags, FT_Bool, FT_BOOL, FT_Pos, FT_Vector_Transform(), TT_LoaderRec_::gloader, i, if(), k, l, p1(), p2(), FT_SubGlyphRec_::transform, WE_HAVE_A_2X2, WE_HAVE_A_SCALE, WE_HAVE_AN_XY_SCALE, x, and y.
Referenced by load_truetype_glyph().
static FT_Error TT_Process_Composite_Glyph | ( | TT_Loader | loader, | |
FT_UInt | start_point, | |||
FT_UInt | start_contour | |||
) | [static] |
Definition at line 1089 of file ttgload.c.
References FT_GlyphSlotRec_::control_data, FT_GlyphSlotRec_::control_len, error, TT_LoaderRec_::exec, TT_LoaderRec_::face, FT_CURVE_TAG_TOUCH_BOTH, FT_GLYPHLOADER_CHECK_POINTS, FT_READ_USHORT, FT_STREAM_READ, FT_STREAM_SEEK, FT_TRACE0, FT_TRACE5, TT_LoaderRec_::gloader, TT_LoaderRec_::glyph, TT_ExecContextRec_::glyphIns, i, TT_LoaderRec_::ins_pos, TT_GlyphZoneRec_::n_points, FT_Outline_::n_points, FT_Outline_::points, TT_LoaderRec_::pp1, TT_LoaderRec_::pp2, TT_LoaderRec_::pp3, TT_LoaderRec_::pp4, TT_LoaderRec_::stream, PC3::stream(), FT_Outline_::tags, TT_GlyphZoneRec_::tags, TT_Hint_Glyph(), tt_prepare_zone(), and TT_LoaderRec_::zone.
Referenced by load_truetype_glyph().
Definition at line 828 of file ttgload.c.
References TT_GlyphZoneRec_::cur, deltas, error, TT_LoaderRec_::face, FT_ARRAY_COPY, FT_FREE, FT_LOAD_NO_SCALE, FT_MulFix(), TT_LoaderRec_::gloader, TT_LoaderRec_::glyph_index, i, IS_HINTED, TT_LoaderRec_::load_flags, FT_FaceRec_::memory, FT_Outline_::n_points, TT_GlyphZoneRec_::n_points, TT_GlyphZoneRec_::orus, FT_Outline_::points, TT_LoaderRec_::pp1, TT_LoaderRec_::pp2, TT_LoaderRec_::pp3, TT_LoaderRec_::pp4, TT_LoaderRec_::size, FT_Outline_::tags, TT_Hint_Glyph(), tt_prepare_zone(), TT_Vary_Get_Glyph_Deltas(), FT_Vector_::x, FT_Vector_::y, and TT_LoaderRec_::zone.
Referenced by load_truetype_glyph().