2000-12-13 20:55:11 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* cfftypes.h */
|
|
|
|
/* */
|
|
|
|
/* Basic OpenType/CFF type definitions and interface (specification */
|
|
|
|
/* only). */
|
|
|
|
/* */
|
2011-03-24 09:29:23 +01:00
|
|
|
/* Copyright 1996-2003, 2006-2008, 2010-2011 by */
|
2000-12-13 20:55:11 +01: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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __CFFTYPES_H__
|
|
|
|
#define __CFFTYPES_H__
|
|
|
|
|
2000-12-14 00:44:37 +01:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_FREETYPE_H
|
2007-01-13 15:01:36 +01:00
|
|
|
#include FT_TYPE1_TABLES_H
|
Improve CFF string (especially glyphname) lookup performance.
We do this by avoiding memory allocation and file I/O. This is
Savannah patch #7104.
* src/cff/cfftypes.h: Include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_SubFontRec): Remove `num_local_subrs'.
(CFF_FontRec): Add `num_strings', `strings', and `string_pool'
fields.
Remove `string_index' and `num_global_subrs' fields.
Use real types instead of `void' for `pshinter' and `psnames' fields.
* src/cff/cffload.c: Don't include PS cmaps service.
(cff_index_get_pointers): Add `pool' parameter which allows to
insert an extra NUL character for each String INDEX entry.
(cff_index_get_name): Make it a local function.
(cff_index_get_string): New function.
(cff_subfont_load): Updated.
(cff_font_load): Initialize `num_strings', `strings', and
`string_pool' fields in the `CFF_FontRec' structure.
(cff_index_get_sid_string): Use `cff_index_get_string' instead of
`cff_index_get_name'.
(cff_font_done): Updated.
* src/cff/cffload.h: Don't include PS cmaps service.
(cff_index_get_string): Added.
(cff_index_get_sid_string): Updated.
* src/cff/cffobjs.c: Don't include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_size_get_globals_funcs, cff_slot_init): Updated.
(cff_face_init): Follow `cff_index_get_name',
`cff_index_get_string', and `cff_index_get_sid_string' changes.
* src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
(cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
(cff_cmap_unicode_init): Updated.
* src/cff/cffdrivr.c: Don't include PS cmap service.
(cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
service.
(cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
`cff_index_get_sid_string' change.
(cff_get_name_index): Use `cff_index_get_string' instead of
`cff_index_get_name'.
* src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_decoder_init, cff_decoder_prepare): Updated.
2010-03-02 13:00:55 +01:00
|
|
|
#include FT_INTERNAL_SERVICE_H
|
|
|
|
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
|
|
|
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
|
2000-12-14 00:44:37 +01:00
|
|
|
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-30 00:23:28 +01:00
|
|
|
/* CFF_IndexRec */
|
2000-12-13 20:55:11 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used to model a CFF Index table. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2001-01-03 01:27:46 +01:00
|
|
|
/* stream :: The source input stream. */
|
2000-12-13 20:55:11 +01:00
|
|
|
/* */
|
2007-01-05 14:14:08 +01:00
|
|
|
/* start :: The position of the first index byte in the */
|
2007-01-06 08:47:45 +01:00
|
|
|
/* input stream. */
|
2007-01-05 14:14:08 +01:00
|
|
|
/* */
|
2000-12-13 20:55:11 +01:00
|
|
|
/* count :: The number of elements in the index. */
|
|
|
|
/* */
|
|
|
|
/* off_size :: The size in bytes of object offsets in index. */
|
|
|
|
/* */
|
|
|
|
/* data_offset :: The position of first data byte in the index's */
|
|
|
|
/* bytes. */
|
|
|
|
/* */
|
2007-01-06 08:47:45 +01:00
|
|
|
/* data_size :: The size of the data table in this index. */
|
2007-01-05 14:14:08 +01:00
|
|
|
/* */
|
2007-01-06 08:47:45 +01:00
|
|
|
/* offsets :: A table of element offsets in the index. Must be */
|
|
|
|
/* loaded explicitly. */
|
2000-12-13 20:55:11 +01:00
|
|
|
/* */
|
|
|
|
/* bytes :: If the index is loaded in memory, its bytes. */
|
|
|
|
/* */
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct CFF_IndexRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
|
|
|
FT_Stream stream;
|
2007-01-05 14:14:08 +01:00
|
|
|
FT_ULong start;
|
2000-12-13 20:55:11 +01:00
|
|
|
FT_UInt count;
|
|
|
|
FT_Byte off_size;
|
|
|
|
FT_ULong data_offset;
|
2007-01-05 14:14:08 +01:00
|
|
|
FT_ULong data_size;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
FT_ULong* offsets;
|
|
|
|
FT_Byte* bytes;
|
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
} CFF_IndexRec, *CFF_Index;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct CFF_EncodingRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
2000-12-30 02:13:07 +01:00
|
|
|
FT_UInt format;
|
|
|
|
FT_ULong offset;
|
2001-06-28 19:49:10 +02:00
|
|
|
|
* src/cff/cffcmap.c, src/cff/cffcmap.h, Jamfile, rules.mk: new files added
to support charmaps for CFF fonts
* src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/cff/cffparse.c, src/cffparse.h, src/cff/cffgload.c,
src/cff/cffgload.h: adding support for CFF charmaps, reformatting the
sources, and removing some bugs in the Encoding and Charset loaders
2002-07-10 18:52:06 +02:00
|
|
|
FT_UInt count;
|
|
|
|
FT_UShort sids [256]; /* avoid dynamic allocations */
|
|
|
|
FT_UShort codes[256];
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
} CFF_EncodingRec, *CFF_Encoding;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2000-12-30 02:13:07 +01:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
typedef struct CFF_CharsetRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2000-12-30 02:13:07 +01:00
|
|
|
FT_UInt format;
|
|
|
|
FT_ULong offset;
|
|
|
|
|
|
|
|
FT_UShort* sids;
|
2003-12-12 16:38:39 +01:00
|
|
|
FT_UShort* cids; /* the inverse mapping of `sids'; only needed */
|
|
|
|
/* for CID-keyed fonts */
|
2006-03-21 19:41:40 +01:00
|
|
|
FT_UInt max_cid;
|
2007-01-05 14:14:08 +01:00
|
|
|
FT_UInt num_glyphs;
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
} CFF_CharsetRec, *CFF_Charset;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
typedef struct CFF_FontRecDictRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
|
|
|
FT_UInt version;
|
|
|
|
FT_UInt notice;
|
|
|
|
FT_UInt copyright;
|
|
|
|
FT_UInt full_name;
|
|
|
|
FT_UInt family_name;
|
|
|
|
FT_UInt weight;
|
|
|
|
FT_Bool is_fixed_pitch;
|
|
|
|
FT_Fixed italic_angle;
|
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
|
|
|
FT_Fixed underline_position;
|
|
|
|
FT_Fixed underline_thickness;
|
2000-12-13 20:55:11 +01:00
|
|
|
FT_Int paint_type;
|
|
|
|
FT_Int charstring_type;
|
|
|
|
FT_Matrix font_matrix;
|
2011-09-07 15:01:20 +02:00
|
|
|
FT_Bool has_font_matrix;
|
2008-05-15 01:05:38 +02:00
|
|
|
FT_ULong units_per_em; /* temporarily used as scaling value also */
|
2000-12-13 20:55:11 +01:00
|
|
|
FT_Vector font_offset;
|
|
|
|
FT_ULong unique_id;
|
|
|
|
FT_BBox font_bbox;
|
|
|
|
FT_Pos stroke_width;
|
|
|
|
FT_ULong charset_offset;
|
|
|
|
FT_ULong encoding_offset;
|
|
|
|
FT_ULong charstrings_offset;
|
|
|
|
FT_ULong private_offset;
|
|
|
|
FT_ULong private_size;
|
|
|
|
FT_Long synthetic_base;
|
|
|
|
FT_UInt embedded_postscript;
|
|
|
|
|
|
|
|
/* these should only be used for the top-level font dictionary */
|
|
|
|
FT_UInt cid_registry;
|
|
|
|
FT_UInt cid_ordering;
|
2009-07-31 17:32:06 +02:00
|
|
|
FT_Long cid_supplement;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
FT_Long cid_font_version;
|
|
|
|
FT_Long cid_font_revision;
|
|
|
|
FT_Long cid_font_type;
|
2003-12-18 09:18:37 +01:00
|
|
|
FT_ULong cid_count;
|
2000-12-13 20:55:11 +01:00
|
|
|
FT_ULong cid_uid_base;
|
|
|
|
FT_ULong cid_fd_array_offset;
|
|
|
|
FT_ULong cid_fd_select_offset;
|
|
|
|
FT_UInt cid_font_name;
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
} CFF_FontRecDictRec, *CFF_FontRecDict;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct CFF_PrivateRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
|
|
|
FT_Byte num_blue_values;
|
|
|
|
FT_Byte num_other_blues;
|
|
|
|
FT_Byte num_family_blues;
|
|
|
|
FT_Byte num_family_other_blues;
|
|
|
|
|
|
|
|
FT_Pos blue_values[14];
|
|
|
|
FT_Pos other_blues[10];
|
|
|
|
FT_Pos family_blues[14];
|
|
|
|
FT_Pos family_other_blues[10];
|
|
|
|
|
|
|
|
FT_Fixed blue_scale;
|
|
|
|
FT_Pos blue_shift;
|
|
|
|
FT_Pos blue_fuzz;
|
|
|
|
FT_Pos standard_width;
|
|
|
|
FT_Pos standard_height;
|
|
|
|
|
|
|
|
FT_Byte num_snap_widths;
|
|
|
|
FT_Byte num_snap_heights;
|
|
|
|
FT_Pos snap_widths[13];
|
|
|
|
FT_Pos snap_heights[13];
|
|
|
|
FT_Bool force_bold;
|
|
|
|
FT_Fixed force_bold_threshold;
|
|
|
|
FT_Int lenIV;
|
|
|
|
FT_Int language_group;
|
|
|
|
FT_Fixed expansion_factor;
|
|
|
|
FT_Long initial_random_seed;
|
|
|
|
FT_ULong local_subrs_offset;
|
|
|
|
FT_Pos default_width;
|
|
|
|
FT_Pos nominal_width;
|
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
} CFF_PrivateRec, *CFF_Private;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
typedef struct CFF_FDSelectRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
|
|
|
FT_Byte format;
|
|
|
|
FT_UInt range_count;
|
|
|
|
|
|
|
|
/* that's the table, taken from the file `as is' */
|
|
|
|
FT_Byte* data;
|
|
|
|
FT_UInt data_size;
|
|
|
|
|
|
|
|
/* small cache for format 3 only */
|
|
|
|
FT_UInt cache_first;
|
|
|
|
FT_UInt cache_count;
|
|
|
|
FT_Byte cache_fd;
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
} CFF_FDSelectRec, *CFF_FDSelect;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* A SubFont packs a font dict and a private dict together. They are */
|
|
|
|
/* needed to support CID-keyed CFF fonts. */
|
2002-03-14 09:57:10 +01:00
|
|
|
typedef struct CFF_SubFontRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
2002-03-14 09:57:10 +01:00
|
|
|
CFF_FontRecDictRec font_dict;
|
2002-03-30 00:23:28 +01:00
|
|
|
CFF_PrivateRec private_dict;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
CFF_IndexRec local_subrs_index;
|
Improve CFF string (especially glyphname) lookup performance.
We do this by avoiding memory allocation and file I/O. This is
Savannah patch #7104.
* src/cff/cfftypes.h: Include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_SubFontRec): Remove `num_local_subrs'.
(CFF_FontRec): Add `num_strings', `strings', and `string_pool'
fields.
Remove `string_index' and `num_global_subrs' fields.
Use real types instead of `void' for `pshinter' and `psnames' fields.
* src/cff/cffload.c: Don't include PS cmaps service.
(cff_index_get_pointers): Add `pool' parameter which allows to
insert an extra NUL character for each String INDEX entry.
(cff_index_get_name): Make it a local function.
(cff_index_get_string): New function.
(cff_subfont_load): Updated.
(cff_font_load): Initialize `num_strings', `strings', and
`string_pool' fields in the `CFF_FontRec' structure.
(cff_index_get_sid_string): Use `cff_index_get_string' instead of
`cff_index_get_name'.
(cff_font_done): Updated.
* src/cff/cffload.h: Don't include PS cmaps service.
(cff_index_get_string): Added.
(cff_index_get_sid_string): Updated.
* src/cff/cffobjs.c: Don't include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_size_get_globals_funcs, cff_slot_init): Updated.
(cff_face_init): Follow `cff_index_get_name',
`cff_index_get_string', and `cff_index_get_sid_string' changes.
* src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
(cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
(cff_cmap_unicode_init): Updated.
* src/cff/cffdrivr.c: Don't include PS cmap service.
(cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
service.
(cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
`cff_index_get_sid_string' change.
(cff_get_name_index): Use `cff_index_get_string' instead of
`cff_index_get_name'.
* src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_decoder_init, cff_decoder_prepare): Updated.
2010-03-02 13:00:55 +01:00
|
|
|
FT_Byte** local_subrs; /* array of pointers into Local Subrs INDEX data */
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
} CFF_SubFontRec, *CFF_SubFont;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2011-03-24 09:29:23 +01:00
|
|
|
#define CFF_MAX_CID_FONTS 256
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
typedef struct CFF_FontRec_
|
2000-12-13 20:55:11 +01:00
|
|
|
{
|
2002-03-14 09:57:10 +01:00
|
|
|
FT_Stream stream;
|
|
|
|
FT_Memory memory;
|
|
|
|
FT_UInt num_faces;
|
|
|
|
FT_UInt num_glyphs;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
FT_Byte version_major;
|
|
|
|
FT_Byte version_minor;
|
|
|
|
FT_Byte header_size;
|
|
|
|
FT_Byte absolute_offsize;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
CFF_IndexRec name_index;
|
|
|
|
CFF_IndexRec top_dict_index;
|
|
|
|
CFF_IndexRec global_subrs_index;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
CFF_EncodingRec encoding;
|
|
|
|
CFF_CharsetRec charset;
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
CFF_IndexRec charstrings_index;
|
|
|
|
CFF_IndexRec font_dict_index;
|
|
|
|
CFF_IndexRec private_index;
|
|
|
|
CFF_IndexRec local_subrs_index;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
FT_String* font_name;
|
Improve CFF string (especially glyphname) lookup performance.
We do this by avoiding memory allocation and file I/O. This is
Savannah patch #7104.
* src/cff/cfftypes.h: Include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_SubFontRec): Remove `num_local_subrs'.
(CFF_FontRec): Add `num_strings', `strings', and `string_pool'
fields.
Remove `string_index' and `num_global_subrs' fields.
Use real types instead of `void' for `pshinter' and `psnames' fields.
* src/cff/cffload.c: Don't include PS cmaps service.
(cff_index_get_pointers): Add `pool' parameter which allows to
insert an extra NUL character for each String INDEX entry.
(cff_index_get_name): Make it a local function.
(cff_index_get_string): New function.
(cff_subfont_load): Updated.
(cff_font_load): Initialize `num_strings', `strings', and
`string_pool' fields in the `CFF_FontRec' structure.
(cff_index_get_sid_string): Use `cff_index_get_string' instead of
`cff_index_get_name'.
(cff_font_done): Updated.
* src/cff/cffload.h: Don't include PS cmaps service.
(cff_index_get_string): Added.
(cff_index_get_sid_string): Updated.
* src/cff/cffobjs.c: Don't include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_size_get_globals_funcs, cff_slot_init): Updated.
(cff_face_init): Follow `cff_index_get_name',
`cff_index_get_string', and `cff_index_get_sid_string' changes.
* src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
(cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
(cff_cmap_unicode_init): Updated.
* src/cff/cffdrivr.c: Don't include PS cmap service.
(cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
service.
(cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
`cff_index_get_sid_string' change.
(cff_get_name_index): Use `cff_index_get_string' instead of
`cff_index_get_name'.
* src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_decoder_init, cff_decoder_prepare): Updated.
2010-03-02 13:00:55 +01:00
|
|
|
|
|
|
|
/* array of pointers into Global Subrs INDEX data */
|
2002-03-14 09:57:10 +01:00
|
|
|
FT_Byte** global_subrs;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
Improve CFF string (especially glyphname) lookup performance.
We do this by avoiding memory allocation and file I/O. This is
Savannah patch #7104.
* src/cff/cfftypes.h: Include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_SubFontRec): Remove `num_local_subrs'.
(CFF_FontRec): Add `num_strings', `strings', and `string_pool'
fields.
Remove `string_index' and `num_global_subrs' fields.
Use real types instead of `void' for `pshinter' and `psnames' fields.
* src/cff/cffload.c: Don't include PS cmaps service.
(cff_index_get_pointers): Add `pool' parameter which allows to
insert an extra NUL character for each String INDEX entry.
(cff_index_get_name): Make it a local function.
(cff_index_get_string): New function.
(cff_subfont_load): Updated.
(cff_font_load): Initialize `num_strings', `strings', and
`string_pool' fields in the `CFF_FontRec' structure.
(cff_index_get_sid_string): Use `cff_index_get_string' instead of
`cff_index_get_name'.
(cff_font_done): Updated.
* src/cff/cffload.h: Don't include PS cmaps service.
(cff_index_get_string): Added.
(cff_index_get_sid_string): Updated.
* src/cff/cffobjs.c: Don't include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_size_get_globals_funcs, cff_slot_init): Updated.
(cff_face_init): Follow `cff_index_get_name',
`cff_index_get_string', and `cff_index_get_sid_string' changes.
* src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
(cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
(cff_cmap_unicode_init): Updated.
* src/cff/cffdrivr.c: Don't include PS cmap service.
(cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
service.
(cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
`cff_index_get_sid_string' change.
(cff_get_name_index): Use `cff_index_get_string' instead of
`cff_index_get_name'.
* src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_decoder_init, cff_decoder_prepare): Updated.
2010-03-02 13:00:55 +01:00
|
|
|
/* array of pointers into String INDEX data stored at string_pool */
|
|
|
|
FT_UInt num_strings;
|
|
|
|
FT_Byte** strings;
|
|
|
|
FT_Byte* string_pool;
|
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
CFF_SubFontRec top_font;
|
|
|
|
FT_UInt num_subfonts;
|
|
|
|
CFF_SubFont subfonts[CFF_MAX_CID_FONTS];
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
CFF_FDSelectRec fd_select;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
2001-12-20 14:14:18 +01:00
|
|
|
/* interface to PostScript hinter */
|
Improve CFF string (especially glyphname) lookup performance.
We do this by avoiding memory allocation and file I/O. This is
Savannah patch #7104.
* src/cff/cfftypes.h: Include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_SubFontRec): Remove `num_local_subrs'.
(CFF_FontRec): Add `num_strings', `strings', and `string_pool'
fields.
Remove `string_index' and `num_global_subrs' fields.
Use real types instead of `void' for `pshinter' and `psnames' fields.
* src/cff/cffload.c: Don't include PS cmaps service.
(cff_index_get_pointers): Add `pool' parameter which allows to
insert an extra NUL character for each String INDEX entry.
(cff_index_get_name): Make it a local function.
(cff_index_get_string): New function.
(cff_subfont_load): Updated.
(cff_font_load): Initialize `num_strings', `strings', and
`string_pool' fields in the `CFF_FontRec' structure.
(cff_index_get_sid_string): Use `cff_index_get_string' instead of
`cff_index_get_name'.
(cff_font_done): Updated.
* src/cff/cffload.h: Don't include PS cmaps service.
(cff_index_get_string): Added.
(cff_index_get_sid_string): Updated.
* src/cff/cffobjs.c: Don't include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_size_get_globals_funcs, cff_slot_init): Updated.
(cff_face_init): Follow `cff_index_get_name',
`cff_index_get_string', and `cff_index_get_sid_string' changes.
* src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
(cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
(cff_cmap_unicode_init): Updated.
* src/cff/cffdrivr.c: Don't include PS cmap service.
(cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
service.
(cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
`cff_index_get_sid_string' change.
(cff_get_name_index): Use `cff_index_get_string' instead of
`cff_index_get_name'.
* src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_decoder_init, cff_decoder_prepare): Updated.
2010-03-02 13:00:55 +01:00
|
|
|
PSHinter_Service pshinter;
|
2001-12-20 14:14:18 +01:00
|
|
|
|
* src/cff/cffcmap.c, src/cff/cffcmap.h, Jamfile, rules.mk: new files added
to support charmaps for CFF fonts
* src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/cff/cffparse.c, src/cffparse.h, src/cff/cffgload.c,
src/cff/cffgload.h: adding support for CFF charmaps, reformatting the
sources, and removing some bugs in the Encoding and Charset loaders
2002-07-10 18:52:06 +02:00
|
|
|
/* interface to Postscript Names service */
|
Improve CFF string (especially glyphname) lookup performance.
We do this by avoiding memory allocation and file I/O. This is
Savannah patch #7104.
* src/cff/cfftypes.h: Include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_SubFontRec): Remove `num_local_subrs'.
(CFF_FontRec): Add `num_strings', `strings', and `string_pool'
fields.
Remove `string_index' and `num_global_subrs' fields.
Use real types instead of `void' for `pshinter' and `psnames' fields.
* src/cff/cffload.c: Don't include PS cmaps service.
(cff_index_get_pointers): Add `pool' parameter which allows to
insert an extra NUL character for each String INDEX entry.
(cff_index_get_name): Make it a local function.
(cff_index_get_string): New function.
(cff_subfont_load): Updated.
(cff_font_load): Initialize `num_strings', `strings', and
`string_pool' fields in the `CFF_FontRec' structure.
(cff_index_get_sid_string): Use `cff_index_get_string' instead of
`cff_index_get_name'.
(cff_font_done): Updated.
* src/cff/cffload.h: Don't include PS cmaps service.
(cff_index_get_string): Added.
(cff_index_get_sid_string): Updated.
* src/cff/cffobjs.c: Don't include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_size_get_globals_funcs, cff_slot_init): Updated.
(cff_face_init): Follow `cff_index_get_name',
`cff_index_get_string', and `cff_index_get_sid_string' changes.
* src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
(cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
(cff_cmap_unicode_init): Updated.
* src/cff/cffdrivr.c: Don't include PS cmap service.
(cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
service.
(cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
`cff_index_get_sid_string' change.
(cff_get_name_index): Use `cff_index_get_string' instead of
`cff_index_get_name'.
* src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_decoder_init, cff_decoder_prepare): Updated.
2010-03-02 13:00:55 +01:00
|
|
|
FT_Service_PsCMaps psnames;
|
* src/cff/cffcmap.c, src/cff/cffcmap.h, Jamfile, rules.mk: new files added
to support charmaps for CFF fonts
* src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/cff/cffparse.c, src/cffparse.h, src/cff/cffgload.c,
src/cff/cffgload.h: adding support for CFF charmaps, reformatting the
sources, and removing some bugs in the Encoding and Charset loaders
2002-07-10 18:52:06 +02:00
|
|
|
|
2007-01-13 15:01:36 +01:00
|
|
|
/* since version 2.3.0 */
|
|
|
|
PS_FontInfoRec* font_info; /* font info dictionary */
|
|
|
|
|
2007-07-16 22:46:05 +02:00
|
|
|
/* since version 2.3.6 */
|
|
|
|
FT_String* registry;
|
|
|
|
FT_String* ordering;
|
2012-01-16 18:00:24 +01:00
|
|
|
|
2002-03-14 09:57:10 +01:00
|
|
|
} CFF_FontRec, *CFF_Font;
|
2000-12-13 20:55:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
|
|
|
#endif /* __CFFTYPES_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|