zenilib: zenilib/jni/external/freetype2/src/type1/t1load.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions | Variables
t1load.c File Reference
`#include <ft2build.h>`
`#include <FT_INTERNAL_DEBUG_H>`
`#include <FT_CONFIG_CONFIG_H>`
`#include <FT_MULTIPLE_MASTERS_H>`
`#include <FT_INTERNAL_TYPE1_TYPES_H>`
`#include <FT_INTERNAL_CALC_H>`
`#include "t1load.h"`
`#include "t1errors.h"`
`#include "t1tokens.h"`

Go to the source code of this file.

## Macros

#define | FT_COMPONENT trace_t1load
#define | T1_FIELD_COUNT ( sizeof ( t1_keywords ) / sizeof ( t1_keywords[0] ) )
#define | TABLE_EXTEND 5

## Functions

| mm_axis_unmap (PS_DesignMap axismap, FT_Fixed ncv)
| mm_weights_unmap (FT_Fixed *weights, FT_Fixed *axiscoords, FT_UInt axis_count)
static void | parse_blend_axis_types (T1_Face face, T1_Loader loader)
static void | parse_blend_design_map (T1_Face face, T1_Loader loader)
static void | parse_blend_design_positions (T1_Face face, T1_Loader loader)
static void | parse_buildchar (T1_Face face, T1_Loader loader)
static void | parse_charstrings (T1_Face face, T1_Loader loader)
static FT_Error | parse_dict (T1_Face face, T1_Loader loader, FT_Byte *base, FT_Long size)
static void | parse_encoding (T1_Face face, T1_Loader loader)
static void | parse_private (T1_Face face, T1_Loader loader)
static void | parse_subrs (T1_Face face, T1_Loader loader)
static void | parse_weight_vector (T1_Face face, T1_Loader loader)
static int | read_binary_data (T1_Parser parser, FT_Long *size, FT_Byte **base)
static FT_Error | t1_allocate_blend (T1_Face face, FT_UInt num_designs, FT_UInt num_axis)
| T1_Done_Blend (T1_Face face)
static void | t1_done_loader (T1_Loader loader)
| T1_Get_MM_Var (T1_Face face, FT_MM_Var **master)
| T1_Get_Multi_Master (T1_Face face, FT_Multi_Master *master)
static void | t1_init_loader (T1_Loader loader, T1_Face face)
static FT_Error | t1_load_keyword (T1_Face face, T1_Loader loader, const T1_Field field)
| T1_Open_Face (T1_Face face)
static void | t1_parse_font_matrix (T1_Face face, T1_Loader loader)
| T1_Set_MM_Blend (T1_Face face, FT_UInt num_coords, FT_Fixed *coords)
| T1_Set_MM_Design (T1_Face face, FT_UInt num_coords, FT_Long *coords)
| T1_Set_Var_Design (T1_Face face, FT_UInt num_coords, FT_Fixed *coords)

## Variables

static const T1_FieldRec | t1_keywords []

## Macro Definition Documentation

#define FT_COMPONENT trace_t1load

Definition at line 81 of file t1load.c.

#define T1_FIELD_COUNT ( sizeof ( t1_keywords ) / sizeof ( t1_keywords[0] ) )

Definition at line 1805 of file t1load.c.

#define TABLE_EXTEND 5

Definition at line 1467 of file t1load.c.

Referenced by parse_charstrings().

## Function Documentation

mm_axis_unmap | ( | PS_DesignMap | axismap,
|  | FT_Fixed | ncv
| ) |  |

Definition at line 223 of file t1load.c.

References FT_MulDiv(), INT_TO_FIXED, and j.

Referenced by T1_Get_MM_Var().

mm_weights_unmap | ( | FT_Fixed * | weights,
|  | FT_Fixed * | axiscoords,
|  | FT_UInt | axis_count
| ) |  |

Definition at line 259 of file t1load.c.

References FT_ASSERT, and T1_MAX_MM_AXIS.

Referenced by T1_Get_MM_Var().

static void parse_blend_axis_types | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 565 of file t1load.c.

References PS_BlendRec_::axis_names, T1_FaceRec_::blend, error, FT_ALLOC, FT_ERROR, FT_MEM_COPY, T1_TokenRec_::limit, FT_FaceRec_::memory, T1_FaceRec_::root, T1_TokenRec_::start, t1_allocate_blend(), T1_MAX_MM_AXIS, and T1_ToTokenArray.

static void parse_blend_design_map | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 729 of file t1load.c.

References T1_FaceRec_::blend, PS_DesignMap_::blend_points, PS_BlendRec_::design_map, PS_DesignMap_::design_points, error, FT_ERROR, FT_NEW_ARRAY, T1_TokenRec_::limit, map, FT_FaceRec_::memory, PS_DesignMap_::num_points, T1_FaceRec_::root, T1_TokenRec_::start, t1_allocate_blend(), T1_MAX_MM_AXIS, T1_MAX_MM_MAP_POINTS, T1_ToFixed, T1_ToInt, and T1_ToTokenArray.

static void parse_blend_design_positions | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 632 of file t1load.c.

References T1_FaceRec_::blend, PS_BlendRec_::design_pos, error, FT_ERROR, T1_TokenRec_::limit, T1_TokenRec_::start, t1_allocate_blend(), T1_MAX_MM_AXIS, T1_MAX_MM_DESIGNS, T1_ToFixed, and T1_ToTokenArray.

static void parse_buildchar | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 890 of file t1load.c.

References T1_FaceRec_::len_buildchar, NULL, and T1_ToFixedArray.

static void parse_charstrings | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 1471 of file t1load.c.

References error, FT_ALLOC, FT_FREE, FT_MEM_COPY, ft_strcmp, PS_Table_FuncsRec_::init, IS_PS_DELIM, PS_PrivateRec_::lenIV, T1_FontRec_::private_dict, PSAux_ServiceRec_::ps_table_funcs, T1_FaceRec_::psaux, read_binary_data(), T1_Add_Table, PSAux_ServiceRec_::t1_decrypt, T1_Skip_PS_Token, T1_Skip_Spaces, T1_ToInt, TABLE_EXTEND, and T1_FaceRec_::type1.

static FT_Error parse_dict | ( | T1_Face | face,
|  | T1_Loader | loader,
|  | FT_Byte * | base,
|  | FT_Long | size
| ) |  |

static

Definition at line 1810 of file t1load.c.

References T1_FieldRec_::dict, FT_Bool, FT_ERROR_BASE, ft_isdigit, ft_memcmp, ft_strcmp, ft_strlen, FT_TRACE1, T1_FieldRec_::ident, if(), IS_PS_TOKEN, NULL, read_binary_data(), T1_FIELD_DICT_FONTDICT, T1_FIELD_DICT_PRIVATE, T1_FONTDIR_AFTER_PRIVATE, t1_load_keyword(), T1_PRIVATE, T1_Skip_PS_Token, and T1_Skip_Spaces.

Referenced by T1_Open_Face().

static void parse_encoding | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 1137 of file t1load.c.

References T1_FontRec_::encoding, T1_FontRec_::encoding_type, error, FT_Bool, FT_ERROR, ft_isdigit, FT_NEW_ARRAY, FT_SET_ERROR, ft_strncmp, FT_TRACE6, PS_Table_FuncsRec_::init, IS_PS_DELIM, PSAux_ServiceRec_::ps_table_funcs, T1_FaceRec_::psaux, T1_Add_Table, T1_ENCODING_TYPE_ARRAY, T1_ENCODING_TYPE_EXPERT, T1_ENCODING_TYPE_ISOLATIN1, T1_ENCODING_TYPE_STANDARD, T1_Skip_PS_Token, T1_Skip_Spaces, T1_ToInt, and T1_FaceRec_::type1.

static void parse_private | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 1021 of file t1load.c.

References FT_UNUSED, and T1_PRIVATE.

static void parse_subrs | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 1337 of file t1load.c.

References error, FT_ALLOC, FT_FREE, FT_MEM_COPY, ft_strncmp, idx, PS_Table_FuncsRec_::init, PS_PrivateRec_::lenIV, T1_FontRec_::private_dict, PSAux_ServiceRec_::ps_table_funcs, T1_FaceRec_::psaux, read_binary_data(), T1_Add_Table, PSAux_ServiceRec_::t1_decrypt, T1_Skip_PS_Token, T1_Skip_Spaces, T1_ToInt, and T1_FaceRec_::type1.

static void parse_weight_vector | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 819 of file t1load.c.

References T1_FaceRec_::blend, PS_BlendRec_::default_weight_vector, error, FT_ERROR, T1_TokenRec_::limit, PS_BlendRec_::num_designs, T1_TokenRec_::start, t1_allocate_blend(), T1_MAX_MM_DESIGNS, T1_ToFixed, T1_ToTokenArray, and PS_BlendRec_::weight_vector.

static int read_binary_data | ( | T1_Parser | parser,
|  | FT_Long * | size,
|  | FT_Byte ** | base
| ) |  |

static

Definition at line 1031 of file t1load.c.

References FT_ERROR, ft_isdigit, T1_Skip_PS_Token, T1_Skip_Spaces, and T1_ToInt.

Referenced by parse_charstrings(), parse_dict(), and parse_subrs().

static FT_Error t1_allocate_blend | ( | T1_Face | face,
|  | FT_UInt | num_designs,
|  | FT_UInt | num_axis
| ) |  |

static

Definition at line 96 of file t1load.c.

References PS_BlendRec_::bboxes, T1_FaceRec_::blend, PS_BlendRec_::default_weight_vector, PS_BlendRec_::design_pos, error, T1_FontRec_::font_bbox, T1_FontRec_::font_info, PS_BlendRec_::font_infos, FT_NEW, FT_NEW_ARRAY, FT_FaceRec_::memory, PS_BlendRec_::num_axis, PS_BlendRec_::num_default_design_vector, PS_BlendRec_::num_designs, T1_FontRec_::private_dict, PS_BlendRec_::privates, T1_FaceRec_::root, T1_FaceRec_::type1, and PS_BlendRec_::weight_vector.

Referenced by parse_blend_axis_types(), parse_blend_design_map(), parse_blend_design_positions(), and parse_weight_vector().

T1_Done_Blend | ( | T1_Face | face | ) |

Definition at line 511 of file t1load.c.

References PS_BlendRec_::axis_names, PS_BlendRec_::bboxes, PS_BlendRec_::default_weight_vector, PS_BlendRec_::design_map, PS_DesignMap_::design_points, PS_BlendRec_::design_pos, PS_BlendRec_::font_infos, FT_FREE, PS_BlendRec_::num_axis, PS_BlendRec_::num_designs, PS_DesignMap_::num_points, PS_BlendRec_::privates, and PS_BlendRec_::weight_vector.

Referenced by T1_Face_Done(), and T1_Open_Face().

static void t1_done_loader | ( | T1_Loader | loader | ) |

static

Definition at line 2028 of file t1load.c.

References T1_Finalize_Parser(), and T1_Release_Table.

Referenced by T1_Open_Face().

T1_Get_MM_Var | ( | T1_Face | face,
|  | FT_MM_Var ** | master
| ) |  |

Definition at line 301 of file t1load.c.

References FT_Multi_Master_::axis, FT_MM_Var_::axis, FT_Var_Axis_::def, PS_BlendRec_::default_weight_vector, PS_BlendRec_::design_map, error, FT_ALLOC, FT_MAKE_TAG, ft_strcmp, i, INT_TO_FIXED, FT_Var_Axis_::maximum, FT_Var_Axis_::minimum, mm_axis_unmap(), mm_weights_unmap(), FT_Var_Axis_::name, FT_MM_Var_::namedstyle, NULL, FT_Multi_Master_::num_axis, FT_MM_Var_::num_axis, PS_BlendRec_::num_axis, FT_Multi_Master_::num_designs, FT_MM_Var_::num_designs, PS_BlendRec_::num_designs, FT_MM_Var_::num_namedstyles, sizeof(), FT_Var_Axis_::strid, T1_Get_Multi_Master(), T1_MAX_MM_AXIS, and FT_Var_Axis_::tag.

T1_Get_Multi_Master | ( | T1_Face | face,
|  | FT_Multi_Master * | master
| ) |  |

Definition at line 184 of file t1load.c.

References PS_BlendRec_::axis_names, PS_BlendRec_::design_map, PS_DesignMap_::design_points, error, map, PS_BlendRec_::num_axis, PS_BlendRec_::num_designs, and PS_DesignMap_::num_points.

Referenced by T1_Get_MM_Var().

static void t1_init_loader | ( | T1_Loader | loader,
|  | T1_Face | face
| ) |  |

static

Definition at line 2007 of file t1load.c.

References FT_MEM_ZERO, and FT_UNUSED.

Referenced by T1_Open_Face().

static FT_Error t1_load_keyword | ( | T1_Face | face,
|  | T1_Loader | loader,
|  | const T1_Field | field
| ) |  |

static

Definition at line 913 of file t1load.c.

References PS_BlendRec_::bboxes, T1_FaceRec_::blend, error, T1_FontRec_::font_bbox, T1_FontRec_::font_extra, T1_FontRec_::font_info, PS_BlendRec_::font_infos, T1_FieldRec_::location, NULL, PS_BlendRec_::num_designs, T1_FontRec_::private_dict, PS_BlendRec_::privates, T1_FieldRec_::reader, T1_FIELD_LOCATION_BBOX, T1_FIELD_LOCATION_BLEND, T1_FIELD_LOCATION_FACE, T1_FIELD_LOCATION_FONT_EXTRA, T1_FIELD_LOCATION_FONT_INFO, T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_PRIVATE, T1_FIELD_TYPE_CALLBACK, T1_FIELD_TYPE_FIXED_ARRAY, T1_FIELD_TYPE_INTEGER_ARRAY, T1_Load_Field, T1_Load_Field_Table, T1_FieldRec_::type, and T1_FaceRec_::type1.

Referenced by parse_dict().

T1_Open_Face | ( | T1_Face | face | ) |

Definition at line 2046 of file t1load.c.

References PS_PrivateRec_::blue_fuzz, PS_PrivateRec_::blue_scale, PS_PrivateRec_::blue_shift, T1_FontRec_::charstrings, T1_FontRec_::charstrings_block, T1_FontRec_::charstrings_len, T1_FontRec_::encoding, T1_FontRec_::encoding_type, error, PS_PrivateRec_::expansion_factor, FT_ERROR, FT_NEW_ARRAY, ft_strcmp, T1_FontRec_::glyph_names, T1_FontRec_::glyph_names_block, i, idx, if(), PS_PrivateRec_::lenIV, PS_PrivateRec_::num_blue_values, T1_FontRec_::num_glyphs, T1_FontRec_::num_subrs, parse_dict(), T1_FontRec_::private_dict, T1_FontRec_::subrs, T1_FontRec_::subrs_block, T1_FontRec_::subrs_len, T1_Done_Blend(), t1_done_loader(), T1_ENCODING_TYPE_ARRAY, T1_Get_Private_Dict(), t1_init_loader(), and T1_New_Parser().

Referenced by T1_Face_Init().

static void t1_parse_font_matrix | ( | T1_Face | face,
|  | T1_Loader | loader
| ) |  |

static

Definition at line 1078 of file t1load.c.

References T1_FontRec_::font_matrix, T1_FontRec_::font_offset, FT_ABS, FT_DivFix(), FT_ERROR, T1_FaceRec_::root, T1_ToFixedArray, T1_FaceRec_::type1, FT_FaceRec_::units_per_EM, FT_Vector_::x, FT_Matrix_::xx, FT_Matrix_::xy, FT_Vector_::y, FT_Matrix_::yx, and FT_Matrix_::yy.

T1_Set_MM_Blend | ( | T1_Face | face,
|  | FT_UInt | num_coords,
|  | FT_Fixed * | coords
| ) |  |

Definition at line 366 of file t1load.c.

References error, FT_MulFix(), m, PS_BlendRec_::num_axis, PS_BlendRec_::num_designs, and PS_BlendRec_::weight_vector.

Referenced by T1_Set_MM_Design().

T1_Set_MM_Design | ( | T1_Face | face,
|  | FT_UInt | num_coords,
|  | FT_Long * | coords
| ) |  |

Definition at line 413 of file t1load.c.

References PS_DesignMap_::blend_points, PS_BlendRec_::design_map, PS_DesignMap_::design_points, error, FT_MulDiv(), map, PS_BlendRec_::num_axis, PS_DesignMap_::num_points, T1_MAX_MM_DESIGNS, and T1_Set_MM_Blend().

Referenced by T1_Set_Var_Design().

T1_Set_Var_Design | ( | T1_Face | face,
|  | FT_UInt | num_coords,
|  | FT_Fixed * | coords
| ) |  |

Definition at line 489 of file t1load.c.

References error, FIXED_TO_INT, i, and T1_Set_MM_Design().

## Variable Documentation

const T1_FieldRec t1_keywords[]

static

Definition at line 1771 of file t1load.c.