2000-08-17 09:18:04 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* psaux.h */
|
|
|
|
/* */
|
|
|
|
/* Auxiliary functions and data structures related to PostScript fonts */
|
|
|
|
/* (specification). */
|
|
|
|
/* */
|
Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.
* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.
* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.
* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.
* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 11:12:50 +02:00
|
|
|
/* Copyright 1996-2001, 2002, 2003 by */
|
2000-08-17 09:18:04 +02:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#ifndef __PSAUX_H__
|
|
|
|
#define __PSAUX_H__
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_INTERNAL_OBJECTS_H
|
|
|
|
#include FT_INTERNAL_TYPE1_TYPES_H
|
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
2000-08-17 09:18:04 +02:00
|
|
|
|
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** T1_TABLE *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
* src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
* src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
Ditto.
* src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
variables.
* include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
to...
(T1_Builder_FuncsRec): This.
(T1_Builder_Funcs): New typedef.
(PSAux_Interface): Remove compiler warnings.
* src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
(t1_builder_funcs): Updated.
* src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
(PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
(PSH_AlignmentRec): Updated.
* include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
typo.
* include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
* src/base/ftstream (FT_Get_Char): Rename to...
(FT_Stream_Get_Char): This.
* src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
a built-in function in gcc, causing warning messages with gcc 3.0.
* src/autohint/ahglyph.c (ah_outline_load): Ditto.
* src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
Ditto.
* src/cff/cffload.c (cff_new_index, cff_done_index,
cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
CFF_Done_Font): Ditto.
* src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
* src/pshinter/pshalgo1.c (psh1_hint_table_record,
psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_table_record,
psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
* src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
TT_Get_PS_Name): Ditto.
* src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
load_truetype_glyph): Ditto.
* src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
* src/type1/t1afm.c (T1_Get_Kerning): Ditto.
* include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
2002-03-07 22:59:59 +01:00
|
|
|
typedef struct PS_TableRec_* PS_Table;
|
|
|
|
typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs;
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
|
2000-08-23 04:47:57 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-02-28 17:10:29 +01:00
|
|
|
/* PS_Table_FuncsRec */
|
2000-08-23 04:47:57 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* A set of function pointers to manage PS_Table objects. */
|
2000-08-23 04:47:57 +02:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* table_init :: Used to initialize a table. */
|
|
|
|
/* */
|
|
|
|
/* table_done :: Finalizes resp. destroy a given table. */
|
|
|
|
/* */
|
|
|
|
/* table_add :: Adds a new object to a table. */
|
2000-08-23 04:47:57 +02:00
|
|
|
/* */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* table_release :: Releases table data, then finalizes it. */
|
|
|
|
/* */
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct PS_Table_FuncsRec_
|
2000-08-23 04:47:57 +02:00
|
|
|
{
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_Error
|
2002-02-28 17:10:29 +01:00
|
|
|
(*init)( PS_Table table,
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_Int count,
|
|
|
|
FT_Memory memory );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*done)( PS_Table table );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_Error
|
* include/freetype/internal/ftdriver.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/psaux.h, src/cid/cidgload.c,
src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h,
src/pshinter/pshrec.c, src/pshinter/pshalgo.c,
src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c,
src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c,
src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c,
src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c,
src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h:
Many casts and slight argument type changes to make it work with
a 16bit compiler.
2003-06-05 06:31:05 +02:00
|
|
|
(*add)( PS_Table table,
|
|
|
|
FT_Int index,
|
|
|
|
void* object,
|
|
|
|
FT_PtrDist length );
|
2000-08-23 04:47:57 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*release)( PS_Table table );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} PS_Table_FuncsRec;
|
2000-08-23 04:47:57 +02:00
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-02-28 17:10:29 +01:00
|
|
|
/* PS_TableRec */
|
2000-08-17 03:09:06 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-08-21 06:58:49 +02:00
|
|
|
/* A PS_Table is a simple object used to store an array of objects in */
|
2000-08-17 03:09:06 +02:00
|
|
|
/* a single memory block. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* block :: The address in memory of the growheap's block. This */
|
|
|
|
/* can change between two object adds, due to */
|
|
|
|
/* reallocation. */
|
|
|
|
/* */
|
|
|
|
/* cursor :: The current top of the grow heap within its block. */
|
|
|
|
/* */
|
|
|
|
/* capacity :: The current size of the heap block. Increments by */
|
|
|
|
/* 1kByte chunks. */
|
|
|
|
/* */
|
|
|
|
/* max_elems :: The maximum number of elements in table. */
|
|
|
|
/* */
|
|
|
|
/* num_elems :: The current number of elements in table. */
|
|
|
|
/* */
|
|
|
|
/* elements :: A table of element addresses within the block. */
|
|
|
|
/* */
|
|
|
|
/* lengths :: A table of element sizes within the block. */
|
|
|
|
/* */
|
|
|
|
/* memory :: The object used for memory operations */
|
|
|
|
/* (alloc/realloc). */
|
|
|
|
/* */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* funcs :: A table of method pointers for this object. */
|
2000-08-23 04:47:57 +02:00
|
|
|
/* */
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct PS_TableRec_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2002-03-14 11:09:35 +01:00
|
|
|
FT_Byte* block; /* current memory block */
|
|
|
|
FT_Offset cursor; /* current cursor in memory block */
|
|
|
|
FT_Offset capacity; /* current size of memory block */
|
|
|
|
FT_Long init;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
FT_Int max_elems;
|
|
|
|
FT_Int num_elems;
|
|
|
|
FT_Byte** elements; /* addresses of table elements */
|
|
|
|
FT_Int* lengths; /* lengths of table elements */
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
FT_Memory memory;
|
|
|
|
PS_Table_FuncsRec funcs;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} PS_TableRec;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** T1 FIELDS & TOKENS *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct PS_ParserRec_* PS_Parser;
|
|
|
|
|
|
|
|
typedef struct T1_TokenRec_* T1_Token;
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct T1_FieldRec_* T1_Field;
|
2000-08-23 19:32:42 +02:00
|
|
|
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
/* simple enumeration type used to identify token types */
|
2002-03-14 11:09:35 +01:00
|
|
|
typedef enum T1_TokenType_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_TOKEN_TYPE_NONE = 0,
|
|
|
|
T1_TOKEN_TYPE_ANY,
|
|
|
|
T1_TOKEN_TYPE_STRING,
|
|
|
|
T1_TOKEN_TYPE_ARRAY,
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
/* do not remove */
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_TOKEN_TYPE_MAX
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
} T1_TokenType;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* a simple structure used to identify tokens */
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct T1_TokenRec_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Byte* start; /* first character of token in input stream */
|
|
|
|
FT_Byte* limit; /* first character after the token */
|
2002-03-14 11:09:35 +01:00
|
|
|
T1_TokenType type; /* type of token */
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} T1_TokenRec;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* enumeration type used to identify object fields */
|
2002-03-14 11:09:35 +01:00
|
|
|
typedef enum T1_FieldType_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_FIELD_TYPE_NONE = 0,
|
|
|
|
T1_FIELD_TYPE_BOOL,
|
Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.
* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.
* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.
* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.
* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 11:12:50 +02:00
|
|
|
T1_FIELD_TYPE_BOOL_P,
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_FIELD_TYPE_INTEGER,
|
Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.
* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.
* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.
* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.
* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 11:12:50 +02:00
|
|
|
T1_FIELD_TYPE_INTEGER_P,
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_FIELD_TYPE_FIXED,
|
Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.
* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.
* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.
* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.
* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 11:12:50 +02:00
|
|
|
T1_FIELD_TYPE_FIXED_P,
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_FIELD_TYPE_STRING,
|
2002-07-11 13:26:21 +02:00
|
|
|
T1_FIELD_TYPE_BBOX,
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_FIELD_TYPE_INTEGER_ARRAY,
|
|
|
|
T1_FIELD_TYPE_FIXED_ARRAY,
|
|
|
|
T1_FIELD_TYPE_CALLBACK,
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
/* do not remove */
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_FIELD_TYPE_MAX
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
} T1_FieldType;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
typedef enum T1_FieldLocation_
|
2000-08-24 00:47:44 +02:00
|
|
|
{
|
2002-03-14 11:09:35 +01:00
|
|
|
T1_FIELD_LOCATION_CID_INFO,
|
|
|
|
T1_FIELD_LOCATION_FONT_DICT,
|
|
|
|
T1_FIELD_LOCATION_FONT_INFO,
|
|
|
|
T1_FIELD_LOCATION_PRIVATE,
|
2002-07-11 13:26:21 +02:00
|
|
|
T1_FIELD_LOCATION_BBOX,
|
2000-08-24 00:47:44 +02:00
|
|
|
|
|
|
|
/* do not remove */
|
2002-03-14 11:09:35 +01:00
|
|
|
T1_FIELD_LOCATION_MAX
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
} T1_FieldLocation;
|
2000-08-24 00:47:44 +02:00
|
|
|
|
2000-08-24 18:29:15 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef void
|
2002-03-14 11:09:35 +01:00
|
|
|
(*T1_Field_ParseFunc)( FT_Face face,
|
|
|
|
FT_Pointer parser );
|
2000-08-24 00:47:44 +02:00
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
/* structure type used to model object fields */
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct T1_FieldRec_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2002-03-14 11:09:35 +01:00
|
|
|
const char* ident; /* field identifier */
|
|
|
|
T1_FieldLocation location;
|
|
|
|
T1_FieldType type; /* type of field */
|
|
|
|
T1_Field_ParseFunc reader;
|
|
|
|
FT_UInt offset; /* offset of field in object */
|
|
|
|
FT_Byte size; /* size of field in bytes */
|
|
|
|
FT_UInt array_max; /* maximal number of elements for */
|
|
|
|
/* array */
|
|
|
|
FT_UInt count_offset; /* offset of element count for */
|
|
|
|
/* arrays */
|
2002-02-28 17:10:29 +01:00
|
|
|
} T1_FieldRec;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
|
2000-08-24 00:47:44 +02:00
|
|
|
#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname ) \
|
2000-08-24 18:29:15 +02:00
|
|
|
{ \
|
|
|
|
_ident, T1CODE, _type, \
|
|
|
|
0, \
|
|
|
|
FT_FIELD_OFFSET( _fname ), \
|
|
|
|
FT_FIELD_SIZE( _fname ), \
|
|
|
|
0, 0 \
|
2000-08-24 00:47:44 +02:00
|
|
|
},
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_NEW_CALLBACK_FIELD( _ident, _reader ) \
|
|
|
|
{ \
|
|
|
|
_ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
|
2002-03-14 11:09:35 +01:00
|
|
|
(T1_Field_ParseFunc)_reader, \
|
2002-03-30 00:23:28 +01:00
|
|
|
0, 0, \
|
|
|
|
0, 0 \
|
2000-08-24 00:47:44 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max ) \
|
2000-08-24 18:29:15 +02:00
|
|
|
{ \
|
|
|
|
_ident, T1CODE, _type, \
|
|
|
|
0, \
|
|
|
|
FT_FIELD_OFFSET( _fname ), \
|
|
|
|
FT_FIELD_SIZE_DELTA( _fname ), \
|
|
|
|
_max, \
|
|
|
|
FT_FIELD_OFFSET( num_ ## _fname ) \
|
|
|
|
},
|
|
|
|
|
|
|
|
#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max ) \
|
2000-08-24 00:47:44 +02:00
|
|
|
{ \
|
|
|
|
_ident, T1CODE, _type, \
|
|
|
|
0, \
|
|
|
|
FT_FIELD_OFFSET( _fname ), \
|
|
|
|
FT_FIELD_SIZE_DELTA( _fname ), \
|
2000-08-24 18:29:15 +02:00
|
|
|
_max, 0 \
|
2000-08-24 00:47:44 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_TYPE_BOOL( _ident, _fname ) \
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.
* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.
* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.
* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.
* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 11:12:50 +02:00
|
|
|
#define T1_FIELD_TYPE_BOOL_P( _ident, _fname ) \
|
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL_P, _fname )
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_NUM( _ident, _fname ) \
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.
* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.
* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.
* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.
* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 11:12:50 +02:00
|
|
|
#define T1_FIELD_NUM_P( _ident, _fname ) \
|
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_P, _fname )
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_FIXED( _ident, _fname ) \
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.
* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.
* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.
* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers. Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.
* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.
* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 11:12:50 +02:00
|
|
|
#define T1_FIELD_FIXED_P( _ident, _fname ) \
|
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_P, _fname )
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_STRING( _ident, _fname ) \
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
2002-07-11 13:26:21 +02:00
|
|
|
#define T1_FIELD_BBOX( _ident, _fname ) \
|
|
|
|
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname )
|
|
|
|
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax ) \
|
|
|
|
T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
|
|
|
|
_fname, _fmax )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax ) \
|
|
|
|
T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
|
|
|
|
_fname, _fmax )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax ) \
|
|
|
|
T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
|
|
|
|
_fname, _fmax )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
|
|
|
#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax ) \
|
2002-03-30 00:23:28 +01:00
|
|
|
T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
|
|
|
|
_fname, _fmax )
|
2000-08-24 00:47:44 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define T1_FIELD_CALLBACK( _ident, _name ) \
|
2000-08-24 00:47:44 +02:00
|
|
|
T1_NEW_CALLBACK_FIELD( _ident, _name )
|
|
|
|
|
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** T1 PARSER *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef const struct PS_Parser_FuncsRec_* PS_Parser_Funcs;
|
|
|
|
|
|
|
|
typedef struct PS_Parser_FuncsRec_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2001-06-28 19:49:10 +02:00
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*init)( PS_Parser parser,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Byte* base,
|
|
|
|
FT_Byte* limit,
|
|
|
|
FT_Memory memory );
|
2001-06-28 19:49:10 +02:00
|
|
|
|
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*done)( PS_Parser parser );
|
2001-06-28 19:49:10 +02:00
|
|
|
|
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*skip_spaces)( PS_Parser parser );
|
2001-06-28 19:49:10 +02:00
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*skip_alpha)( PS_Parser parser );
|
2001-06-28 19:49:10 +02:00
|
|
|
|
|
|
|
FT_Long
|
2002-02-28 17:10:29 +01:00
|
|
|
(*to_int)( PS_Parser parser );
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_Fixed
|
2002-02-28 17:10:29 +01:00
|
|
|
(*to_fixed)( PS_Parser parser,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Int power_ten );
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_Int
|
2002-02-28 17:10:29 +01:00
|
|
|
(*to_coord_array)( PS_Parser parser,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Int max_coords,
|
|
|
|
FT_Short* coords );
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_Int
|
2002-02-28 17:10:29 +01:00
|
|
|
(*to_fixed_array)( PS_Parser parser,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Int max_values,
|
|
|
|
FT_Fixed* values,
|
|
|
|
FT_Int power_ten );
|
2001-06-28 19:49:10 +02:00
|
|
|
|
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*to_token)( PS_Parser parser,
|
|
|
|
T1_Token token );
|
2001-06-28 19:49:10 +02:00
|
|
|
void
|
2002-02-28 17:10:29 +01:00
|
|
|
(*to_token_array)( PS_Parser parser,
|
|
|
|
T1_Token tokens,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_UInt max_tokens,
|
|
|
|
FT_Int* pnum_tokens );
|
2001-06-28 19:49:10 +02:00
|
|
|
|
|
|
|
FT_Error
|
2002-02-28 17:10:29 +01:00
|
|
|
(*load_field)( PS_Parser parser,
|
|
|
|
const T1_Field field,
|
2002-03-30 00:23:28 +01:00
|
|
|
void** objects,
|
|
|
|
FT_UInt max_objects,
|
|
|
|
FT_ULong* pflags );
|
2001-06-28 19:49:10 +02:00
|
|
|
|
|
|
|
FT_Error
|
2002-02-28 17:10:29 +01:00
|
|
|
(*load_field_table)( PS_Parser parser,
|
|
|
|
const T1_Field field,
|
2002-03-30 00:23:28 +01:00
|
|
|
void** objects,
|
|
|
|
FT_UInt max_objects,
|
|
|
|
FT_ULong* pflags );
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} PS_Parser_FuncsRec;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-02-28 17:10:29 +01:00
|
|
|
/* PS_ParserRec */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2002-02-28 17:10:29 +01:00
|
|
|
/* A PS_Parser is an object used to parse a Type 1 font very quickly. */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* cursor :: The current position in the text. */
|
|
|
|
/* */
|
|
|
|
/* base :: Start of the processed text. */
|
|
|
|
/* */
|
|
|
|
/* limit :: End of the processed text. */
|
|
|
|
/* */
|
|
|
|
/* error :: The last error returned. */
|
|
|
|
/* */
|
|
|
|
/* memory :: The object used for memory operations (alloc/realloc). */
|
|
|
|
/* */
|
|
|
|
/* funcs :: A table of functions for the parser. */
|
|
|
|
/* */
|
2002-03-30 00:23:28 +01:00
|
|
|
typedef struct PS_ParserRec_
|
2000-08-23 04:47:57 +02:00
|
|
|
{
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Byte* cursor;
|
|
|
|
FT_Byte* base;
|
|
|
|
FT_Byte* limit;
|
|
|
|
FT_Error error;
|
|
|
|
FT_Memory memory;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
PS_Parser_FuncsRec funcs;
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} PS_ParserRec;
|
2000-08-23 04:47:57 +02:00
|
|
|
|
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
2000-08-17 09:18:04 +02:00
|
|
|
/***** T1 BUILDER *****/
|
2000-08-17 03:09:06 +02:00
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
typedef struct T1_BuilderRec_* T1_Builder;
|
2000-08-23 04:47:57 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-14 11:09:35 +01:00
|
|
|
(*T1_Builder_Check_Points_Func)( T1_Builder builder,
|
|
|
|
FT_Int count );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef void
|
2002-03-14 11:09:35 +01:00
|
|
|
(*T1_Builder_Add_Point_Func)( T1_Builder builder,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Pos x,
|
|
|
|
FT_Pos y,
|
|
|
|
FT_Byte flag );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-14 11:09:35 +01:00
|
|
|
(*T1_Builder_Add_Point1_Func)( T1_Builder builder,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Pos x,
|
|
|
|
FT_Pos y );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-14 11:09:35 +01:00
|
|
|
(*T1_Builder_Add_Contour_Func)( T1_Builder builder );
|
2000-08-23 04:47:57 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-14 11:09:35 +01:00
|
|
|
(*T1_Builder_Start_Point_Func)( T1_Builder builder,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Pos x,
|
|
|
|
FT_Pos y );
|
2000-08-23 04:47:57 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef void
|
2002-03-14 11:09:35 +01:00
|
|
|
(*T1_Builder_Close_Contour_Func)( T1_Builder builder );
|
2000-08-23 04:47:57 +02:00
|
|
|
|
|
|
|
|
* src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
* src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
Ditto.
* src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
variables.
* include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
to...
(T1_Builder_FuncsRec): This.
(T1_Builder_Funcs): New typedef.
(PSAux_Interface): Remove compiler warnings.
* src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
(t1_builder_funcs): Updated.
* src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
(PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
(PSH_AlignmentRec): Updated.
* include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
typo.
* include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
* src/base/ftstream (FT_Get_Char): Rename to...
(FT_Stream_Get_Char): This.
* src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
a built-in function in gcc, causing warning messages with gcc 3.0.
* src/autohint/ahglyph.c (ah_outline_load): Ditto.
* src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
Ditto.
* src/cff/cffload.c (cff_new_index, cff_done_index,
cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
CFF_Done_Font): Ditto.
* src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
* src/pshinter/pshalgo1.c (psh1_hint_table_record,
psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_table_record,
psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
* src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
TT_Get_PS_Name): Ditto.
* src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
load_truetype_glyph): Ditto.
* src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
* src/type1/t1afm.c (T1_Get_Kerning): Ditto.
* include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
2002-03-07 22:59:59 +01:00
|
|
|
typedef const struct T1_Builder_FuncsRec_* T1_Builder_Funcs;
|
|
|
|
|
|
|
|
typedef struct T1_Builder_FuncsRec_
|
2000-08-23 04:47:57 +02:00
|
|
|
{
|
2001-12-05 02:22:05 +01:00
|
|
|
void
|
2002-03-14 11:09:35 +01:00
|
|
|
(*init)( T1_Builder builder,
|
2001-12-05 02:22:05 +01:00
|
|
|
FT_Face face,
|
|
|
|
FT_Size size,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_Bool hinting );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
void
|
2002-03-14 11:09:35 +01:00
|
|
|
(*done)( T1_Builder builder );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-08-23 04:47:57 +02:00
|
|
|
T1_Builder_Check_Points_Func check_points;
|
|
|
|
T1_Builder_Add_Point_Func add_point;
|
|
|
|
T1_Builder_Add_Point1_Func add_point1;
|
|
|
|
T1_Builder_Add_Contour_Func add_contour;
|
|
|
|
T1_Builder_Start_Point_Func start_point;
|
|
|
|
T1_Builder_Close_Contour_Func close_contour;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
* src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
* src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
Ditto.
* src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
variables.
* include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
to...
(T1_Builder_FuncsRec): This.
(T1_Builder_Funcs): New typedef.
(PSAux_Interface): Remove compiler warnings.
* src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
(t1_builder_funcs): Updated.
* src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
(PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
(PSH_AlignmentRec): Updated.
* include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
typo.
* include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
* src/base/ftstream (FT_Get_Char): Rename to...
(FT_Stream_Get_Char): This.
* src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
a built-in function in gcc, causing warning messages with gcc 3.0.
* src/autohint/ahglyph.c (ah_outline_load): Ditto.
* src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
Ditto.
* src/cff/cffload.c (cff_new_index, cff_done_index,
cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
CFF_Done_Font): Ditto.
* src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
* src/pshinter/pshalgo1.c (psh1_hint_table_record,
psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_table_record,
psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
* src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
TT_Get_PS_Name): Ditto.
* src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
load_truetype_glyph): Ditto.
* src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
* src/type1/t1afm.c (T1_Get_Kerning): Ditto.
* include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
2002-03-07 22:59:59 +01:00
|
|
|
} T1_Builder_FuncsRec;
|
2000-08-23 04:47:57 +02:00
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Structure> */
|
2002-03-14 11:09:35 +01:00
|
|
|
/* T1_BuilderRec */
|
2000-08-17 03:09:06 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used during glyph loading to store its outline. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* memory :: The current memory object. */
|
|
|
|
/* */
|
|
|
|
/* face :: The current face object. */
|
|
|
|
/* */
|
|
|
|
/* glyph :: The current glyph slot. */
|
|
|
|
/* */
|
2000-08-17 09:18:04 +02:00
|
|
|
/* loader :: XXX */
|
2000-08-17 03:09:06 +02:00
|
|
|
/* */
|
|
|
|
/* base :: The base glyph outline. */
|
|
|
|
/* */
|
2000-08-17 09:18:04 +02:00
|
|
|
/* current :: The current glyph outline. */
|
|
|
|
/* */
|
2000-08-17 03:09:06 +02:00
|
|
|
/* max_points :: maximum points in builder outline */
|
|
|
|
/* */
|
|
|
|
/* max_contours :: Maximal number of contours in builder outline. */
|
|
|
|
/* */
|
|
|
|
/* last :: The last point position. */
|
|
|
|
/* */
|
|
|
|
/* scale_x :: The horizontal scale (FUnits to sub-pixels). */
|
|
|
|
/* */
|
|
|
|
/* scale_y :: The vertical scale (FUnits to sub-pixels). */
|
|
|
|
/* */
|
|
|
|
/* pos_x :: The horizontal translation (if composite glyph). */
|
|
|
|
/* */
|
|
|
|
/* pos_y :: The vertical translation (if composite glyph). */
|
|
|
|
/* */
|
|
|
|
/* left_bearing :: The left side bearing point. */
|
|
|
|
/* */
|
|
|
|
/* advance :: The horizontal advance vector. */
|
|
|
|
/* */
|
|
|
|
/* bbox :: Unused. */
|
|
|
|
/* */
|
|
|
|
/* path_begun :: A flag which indicates that a new path has begun. */
|
|
|
|
/* */
|
|
|
|
/* load_points :: If this flag is not set, no points are loaded. */
|
|
|
|
/* */
|
|
|
|
/* no_recurse :: Set but not used. */
|
|
|
|
/* */
|
|
|
|
/* error :: An error code that is only used to report memory */
|
|
|
|
/* allocation problems. */
|
|
|
|
/* */
|
|
|
|
/* metrics_only :: A boolean indicating that we only want to compute */
|
|
|
|
/* the metrics of a given glyph, not load all of its */
|
|
|
|
/* points. */
|
|
|
|
/* */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* funcs :: An array of function pointers for the builder. */
|
2000-08-23 04:47:57 +02:00
|
|
|
/* */
|
2002-03-14 11:09:35 +01:00
|
|
|
typedef struct T1_BuilderRec_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Memory memory;
|
|
|
|
FT_Face face;
|
|
|
|
FT_GlyphSlot glyph;
|
|
|
|
FT_GlyphLoader loader;
|
|
|
|
FT_Outline* base;
|
|
|
|
FT_Outline* current;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Vector last;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Fixed scale_x;
|
|
|
|
FT_Fixed scale_y;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Pos pos_x;
|
|
|
|
FT_Pos pos_y;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Vector left_bearing;
|
|
|
|
FT_Vector advance;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_BBox bbox; /* bounding box */
|
|
|
|
FT_Bool path_begun;
|
|
|
|
FT_Bool load_points;
|
|
|
|
FT_Bool no_recurse;
|
|
|
|
FT_Bool shift;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Error error; /* only used for memory errors */
|
|
|
|
FT_Bool metrics_only;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
void* hints_funcs; /* hinter-specific */
|
|
|
|
void* hints_globals; /* hinter-specific */
|
2001-10-18 13:46:25 +02:00
|
|
|
|
* src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
* src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
Ditto.
* src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
variables.
* include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
to...
(T1_Builder_FuncsRec): This.
(T1_Builder_Funcs): New typedef.
(PSAux_Interface): Remove compiler warnings.
* src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
(t1_builder_funcs): Updated.
* src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
(PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
(PSH_AlignmentRec): Updated.
* include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
typo.
* include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
* src/base/ftstream (FT_Get_Char): Rename to...
(FT_Stream_Get_Char): This.
* src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
a built-in function in gcc, causing warning messages with gcc 3.0.
* src/autohint/ahglyph.c (ah_outline_load): Ditto.
* src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
Ditto.
* src/cff/cffload.c (cff_new_index, cff_done_index,
cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
CFF_Done_Font): Ditto.
* src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
* src/pshinter/pshalgo1.c (psh1_hint_table_record,
psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_table_record,
psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
* src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
TT_Get_PS_Name): Ditto.
* src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
load_truetype_glyph): Ditto.
* src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
* src/type1/t1afm.c (T1_Get_Kerning): Ditto.
* include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
2002-03-07 22:59:59 +01:00
|
|
|
T1_Builder_FuncsRec funcs;
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
} T1_BuilderRec;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2000-08-23 00:36:33 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** T1 DECODER *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
#if 0
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2000-08-23 00:36:33 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */
|
|
|
|
/* calls during glyph loading. */
|
|
|
|
/* */
|
|
|
|
#define T1_MAX_SUBRS_CALLS 8
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
2000-08-23 19:32:42 +02:00
|
|
|
/* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */
|
|
|
|
/* minimum of 16 is required. */
|
2000-08-23 00:36:33 +02:00
|
|
|
/* */
|
|
|
|
#define T1_MAX_CHARSTRINGS_OPERANDS 32
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
#endif /* 0 */
|
2000-08-23 00:36:33 +02:00
|
|
|
|
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct T1_Decoder_ZoneRec_
|
2000-08-23 00:36:33 +02:00
|
|
|
{
|
|
|
|
FT_Byte* cursor;
|
|
|
|
FT_Byte* base;
|
|
|
|
FT_Byte* limit;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} T1_Decoder_ZoneRec, *T1_Decoder_Zone;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct T1_DecoderRec_* T1_Decoder;
|
|
|
|
typedef const struct T1_Decoder_FuncsRec_* T1_Decoder_Funcs;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-02-28 17:10:29 +01:00
|
|
|
(*T1_Decoder_Callback)( T1_Decoder decoder,
|
|
|
|
FT_UInt glyph_index );
|
2000-08-23 04:47:57 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct T1_Decoder_FuncsRec_
|
2000-08-23 04:47:57 +02:00
|
|
|
{
|
2001-12-05 02:22:05 +01:00
|
|
|
FT_Error
|
2002-03-30 00:23:28 +01:00
|
|
|
(*init)( T1_Decoder decoder,
|
|
|
|
FT_Face face,
|
|
|
|
FT_Size size,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_Byte** glyph_names,
|
|
|
|
PS_Blend blend,
|
|
|
|
FT_Bool hinting,
|
2002-08-28 00:34:20 +02:00
|
|
|
FT_Render_Mode hint_mode,
|
2002-03-30 00:23:28 +01:00
|
|
|
T1_Decoder_Callback callback );
|
2001-12-05 02:22:05 +01:00
|
|
|
|
|
|
|
void
|
2002-03-30 00:23:28 +01:00
|
|
|
(*done)( T1_Decoder decoder );
|
2001-12-05 02:22:05 +01:00
|
|
|
|
|
|
|
FT_Error
|
2002-02-28 17:10:29 +01:00
|
|
|
(*parse_charstrings)( T1_Decoder decoder,
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Byte* base,
|
|
|
|
FT_UInt len );
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} T1_Decoder_FuncsRec;
|
2000-08-23 04:47:57 +02:00
|
|
|
|
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
typedef struct T1_DecoderRec_
|
2000-08-23 00:36:33 +02:00
|
|
|
{
|
2002-03-14 11:09:35 +01:00
|
|
|
T1_BuilderRec builder;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_Long stack[T1_MAX_CHARSTRINGS_OPERANDS];
|
|
|
|
FT_Long* top;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1];
|
|
|
|
T1_Decoder_Zone zone;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
PSNames_Service psnames; /* for seac */
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_UInt num_glyphs;
|
|
|
|
FT_Byte** glyph_names;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2001-03-12 13:04:29 +01:00
|
|
|
FT_Int lenIV; /* internal for sub routine calls */
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_UInt num_subrs;
|
|
|
|
FT_Byte** subrs;
|
|
|
|
FT_Int* subrs_len; /* array of subrs length (optional) */
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_Matrix font_matrix;
|
2000-08-24 00:47:44 +02:00
|
|
|
FT_Vector font_offset;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_Int flex_state;
|
|
|
|
FT_Int num_flex_vectors;
|
|
|
|
FT_Vector flex_vectors[7];
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2002-03-14 11:09:35 +01:00
|
|
|
PS_Blend blend; /* for multiple master support */
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2002-08-28 00:34:20 +02:00
|
|
|
FT_Render_Mode hint_mode;
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
T1_Decoder_Callback parse_callback;
|
2002-02-28 17:10:29 +01:00
|
|
|
T1_Decoder_FuncsRec funcs;
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2002-02-28 17:10:29 +01:00
|
|
|
} T1_DecoderRec;
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
|
2002-03-21 16:02:54 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** TYPE1 CHARMAPS *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
typedef const struct T1_CMap_ClassesRec_* T1_CMap_Classes;
|
|
|
|
|
|
|
|
typedef struct T1_CMap_ClassesRec_
|
|
|
|
{
|
|
|
|
FT_CMap_Class standard;
|
|
|
|
FT_CMap_Class expert;
|
|
|
|
FT_CMap_Class custom;
|
|
|
|
FT_CMap_Class unicode;
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2002-03-21 16:02:54 +01:00
|
|
|
} T1_CMap_ClassesRec;
|
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
and the new FT_Set_Hint_Flags high-level API
2002-07-09 00:26:11 +02:00
|
|
|
|
2000-08-23 00:36:33 +02:00
|
|
|
|
2000-08-17 03:09:06 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** PSAux Module Interface *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2002-03-21 16:02:54 +01:00
|
|
|
typedef struct PSAux_ServiceRec_
|
2000-08-17 03:09:06 +02:00
|
|
|
{
|
2002-03-28 09:07:16 +01:00
|
|
|
/* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */
|
|
|
|
const PS_Table_FuncsRec* ps_table_funcs;
|
|
|
|
const PS_Parser_FuncsRec* ps_parser_funcs;
|
|
|
|
const T1_Builder_FuncsRec* t1_builder_funcs;
|
|
|
|
const T1_Decoder_FuncsRec* t1_decoder_funcs;
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
void
|
|
|
|
(*t1_decrypt)( FT_Byte* buffer,
|
|
|
|
FT_Offset length,
|
|
|
|
FT_UShort seed );
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
T1_CMap_Classes t1_cmap_classes;
|
2002-03-21 16:02:54 +01:00
|
|
|
|
|
|
|
} PSAux_ServiceRec, *PSAux_Service;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* backwards-compatible type definition */
|
2002-03-21 16:02:54 +01:00
|
|
|
typedef PSAux_ServiceRec PSAux_Interface;
|
2000-08-17 03:09:06 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_END_HEADER
|
2000-08-17 09:18:04 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#endif /* __PSAUX_H__ */
|
2000-08-17 09:18:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|