2018-06-03 22:00:42 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* t1tables.h
|
|
|
|
*
|
|
|
|
* Basic Type 1/Type 2 tables definitions and interface (specification
|
|
|
|
* only).
|
|
|
|
*
|
2023-01-17 09:18:25 +01:00
|
|
|
* Copyright (C) 1996-2023 by
|
2018-06-03 22:00:42 +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-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#ifndef T1TABLES_H_
|
|
|
|
#define T1TABLES_H_
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/freetype.h>
|
2000-12-01 00:12:33 +01:00
|
|
|
|
2003-11-04 08:44:19 +01:00
|
|
|
#ifdef FREETYPE_H
|
|
|
|
#error "freetype.h of FreeType 1 has been loaded!"
|
|
|
|
#error "Please fix the directory search order for header files"
|
|
|
|
#error "so that freetype.h of FreeType 2 is found first."
|
|
|
|
#endif
|
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_BEGIN_HEADER
|
2000-08-01 15:17:04 +02:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @section:
|
2018-06-03 22:00:42 +02:00
|
|
|
* type1_tables
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @title:
|
2018-06-03 22:00:42 +02:00
|
|
|
* Type 1 Tables
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @abstract:
|
2018-07-02 15:52:36 +02:00
|
|
|
* Type~1-specific font tables.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-07-02 15:52:36 +02:00
|
|
|
* This section contains the definition of Type~1-specific tables,
|
2018-06-03 22:00:42 +02:00
|
|
|
* including structures related to other PostScript font formats.
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @order:
|
2018-06-03 22:00:42 +02:00
|
|
|
* PS_FontInfoRec
|
|
|
|
* PS_FontInfo
|
|
|
|
* PS_PrivateRec
|
|
|
|
* PS_Private
|
|
|
|
*
|
|
|
|
* CID_FaceDictRec
|
|
|
|
* CID_FaceDict
|
|
|
|
* CID_FaceInfoRec
|
|
|
|
* CID_FaceInfo
|
|
|
|
*
|
|
|
|
* FT_Has_PS_Glyph_Names
|
|
|
|
* FT_Get_PS_Font_Info
|
|
|
|
* FT_Get_PS_Font_Private
|
|
|
|
* FT_Get_PS_Font_Value
|
|
|
|
*
|
|
|
|
* T1_Blend_Flags
|
|
|
|
* T1_EncodingType
|
|
|
|
* PS_Dict_Keys
|
|
|
|
*
|
|
|
|
*/
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
/* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */
|
|
|
|
/* structures in order to support Multiple Master fonts. */
|
2000-07-11 08:12:20 +02:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* PS_FontInfoRec
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* A structure used to model a Type~1 or Type~2 FontInfo dictionary.
|
|
|
|
* Note that for Multiple Master fonts, each instance has its own
|
|
|
|
* FontInfo dictionary.
|
|
|
|
*/
|
2008-05-28 23:51:57 +02:00
|
|
|
typedef struct PS_FontInfoRec_
|
2000-05-02 12:57:43 +02:00
|
|
|
{
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_String* version;
|
|
|
|
FT_String* notice;
|
|
|
|
FT_String* full_name;
|
|
|
|
FT_String* family_name;
|
|
|
|
FT_String* weight;
|
2003-08-18 00:31:23 +02:00
|
|
|
FT_Long italic_angle;
|
Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.
This change reimplements fix from 2003-05-30 without breaking
binary compatibility.
* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.
* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro. Updated all callers.
* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
* src/psaux/psobjs.c (ps_parser_load_field): Updated.
* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
|
|
|
FT_Bool is_fixed_pitch;
|
2003-08-18 00:31:23 +02:00
|
|
|
FT_Short underline_position;
|
|
|
|
FT_UShort underline_thickness;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2008-05-28 23:51:57 +02:00
|
|
|
} PS_FontInfoRec;
|
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* PS_FontInfo
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* A handle to a @PS_FontInfoRec structure.
|
|
|
|
*/
|
2008-05-28 23:51:57 +02:00
|
|
|
typedef struct PS_FontInfoRec_* PS_FontInfo;
|
2000-05-02 12:57:43 +02:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* T1_FontInfo
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-24 18:52:30 +02:00
|
|
|
* This type is equivalent to @PS_FontInfoRec. It is deprecated but kept
|
|
|
|
* to maintain source compatibility between various versions of FreeType.
|
2018-06-03 22:00:42 +02:00
|
|
|
*/
|
2002-03-30 14:16:35 +01:00
|
|
|
typedef PS_FontInfoRec T1_FontInfo;
|
2002-02-28 19:59:37 +01:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* PS_PrivateRec
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-24 18:52:30 +02:00
|
|
|
* A structure used to model a Type~1 or Type~2 private dictionary. Note
|
|
|
|
* that for Multiple Master fonts, each instance has its own Private
|
|
|
|
* dictionary.
|
2018-06-03 22:00:42 +02:00
|
|
|
*/
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct PS_PrivateRec_
|
2000-05-02 12:57:43 +02:00
|
|
|
{
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Int unique_id;
|
|
|
|
FT_Int lenIV;
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Byte num_blue_values;
|
|
|
|
FT_Byte num_other_blues;
|
|
|
|
FT_Byte num_family_blues;
|
|
|
|
FT_Byte num_family_other_blues;
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Short blue_values[14];
|
|
|
|
FT_Short other_blues[10];
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Short family_blues [14];
|
|
|
|
FT_Short family_other_blues[10];
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Fixed blue_scale;
|
|
|
|
FT_Int blue_shift;
|
|
|
|
FT_Int blue_fuzz;
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_UShort standard_width[1];
|
|
|
|
FT_UShort standard_height[1];
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Byte num_snap_widths;
|
|
|
|
FT_Byte num_snap_heights;
|
|
|
|
FT_Bool force_bold;
|
|
|
|
FT_Bool round_stem_up;
|
2000-05-02 12:57:43 +02:00
|
|
|
|
* include/freetype/fttrigon.h, src/base/fttrigon.c, src/base/ftbase.c,
src/base/Jamfile, src/base/rules.mk: adding trigonometric functions
to the core API (using Cordic algorithms).
* builds/top_level.mk, builds/newline, builds/detect.mk: fixed problems
with Make on Windows 2000, as well as problems when "make distclean" is
invoked on a non-Unix platform when there is no "config.mk" in the
current directory..
* builds/freetype.mk: fixed a problem with object deletions under
Dos/Windows/OS/2 systems
* src/tools: added new directory to hold tools and test programs
moved docmaker.py, glnames.py to it..
* src/tools/docmaker.py: improved the script to add the current date
at the footer of each web page (useful to distinguish between versions)
* Jamfile: fixed incorrect HDRMACRO argument.
* TODO: removed the cubic arc bbox computation note, since it has been
fixed recently..
* include/freetype/t1tables.h, include/freetype/config/ftoption.h:
formatting
2001-05-11 16:25:57 +02:00
|
|
|
FT_Short snap_widths [13]; /* including std width */
|
|
|
|
FT_Short snap_heights[13]; /* including std height */
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2004-02-25 22:17:49 +01:00
|
|
|
FT_Fixed expansion_factor;
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Long language_group;
|
|
|
|
FT_Long password;
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
FT_Short min_feature[2];
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2008-05-28 23:51:57 +02:00
|
|
|
} PS_PrivateRec;
|
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* PS_Private
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* A handle to a @PS_PrivateRec structure.
|
|
|
|
*/
|
2008-05-28 23:51:57 +02:00
|
|
|
typedef struct PS_PrivateRec_* PS_Private;
|
2002-02-28 19:59:37 +01:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* T1_Private
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-24 18:52:30 +02:00
|
|
|
* This type is equivalent to @PS_PrivateRec. It is deprecated but kept
|
|
|
|
* to maintain source compatibility between various versions of FreeType.
|
2018-06-03 22:00:42 +02:00
|
|
|
*/
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef PS_PrivateRec T1_Private;
|
2000-05-02 12:57:43 +02:00
|
|
|
|
2000-05-03 20:15:52 +02:00
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @enum:
|
2018-06-03 22:00:42 +02:00
|
|
|
* T1_Blend_Flags
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-24 18:52:30 +02:00
|
|
|
* A set of flags used to indicate which fields are present in a given
|
|
|
|
* blend dictionary (font info or private). Used to support Multiple
|
|
|
|
* Masters fonts.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @values:
|
2018-06-03 22:00:42 +02:00
|
|
|
* T1_BLEND_UNDERLINE_POSITION ::
|
|
|
|
* T1_BLEND_UNDERLINE_THICKNESS ::
|
|
|
|
* T1_BLEND_ITALIC_ANGLE ::
|
|
|
|
* T1_BLEND_BLUE_VALUES ::
|
|
|
|
* T1_BLEND_OTHER_BLUES ::
|
|
|
|
* T1_BLEND_STANDARD_WIDTH ::
|
|
|
|
* T1_BLEND_STANDARD_HEIGHT ::
|
|
|
|
* T1_BLEND_STEM_SNAP_WIDTHS ::
|
|
|
|
* T1_BLEND_STEM_SNAP_HEIGHTS ::
|
|
|
|
* T1_BLEND_BLUE_SCALE ::
|
|
|
|
* T1_BLEND_BLUE_SHIFT ::
|
|
|
|
* T1_BLEND_FAMILY_BLUES ::
|
|
|
|
* T1_BLEND_FAMILY_OTHER_BLUES ::
|
|
|
|
* T1_BLEND_FORCE_BOLD ::
|
|
|
|
*/
|
2008-05-29 00:17:28 +02:00
|
|
|
typedef enum T1_Blend_Flags_
|
2000-05-11 20:23:52 +02:00
|
|
|
{
|
2014-12-02 23:06:04 +01:00
|
|
|
/* required fields in a FontInfo blend dictionary */
|
2002-02-28 19:59:37 +01:00
|
|
|
T1_BLEND_UNDERLINE_POSITION = 0,
|
|
|
|
T1_BLEND_UNDERLINE_THICKNESS,
|
|
|
|
T1_BLEND_ITALIC_ANGLE,
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/* required fields in a Private blend dictionary */
|
2002-02-28 19:59:37 +01:00
|
|
|
T1_BLEND_BLUE_VALUES,
|
|
|
|
T1_BLEND_OTHER_BLUES,
|
|
|
|
T1_BLEND_STANDARD_WIDTH,
|
|
|
|
T1_BLEND_STANDARD_HEIGHT,
|
|
|
|
T1_BLEND_STEM_SNAP_WIDTHS,
|
|
|
|
T1_BLEND_STEM_SNAP_HEIGHTS,
|
|
|
|
T1_BLEND_BLUE_SCALE,
|
|
|
|
T1_BLEND_BLUE_SHIFT,
|
|
|
|
T1_BLEND_FAMILY_BLUES,
|
|
|
|
T1_BLEND_FAMILY_OTHER_BLUES,
|
|
|
|
T1_BLEND_FORCE_BOLD,
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
T1_BLEND_MAX /* do not remove */
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2000-05-24 23:12:02 +02:00
|
|
|
} T1_Blend_Flags;
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2006-05-12 10:00:13 +02:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/* these constants are deprecated; use the corresponding */
|
2018-09-04 10:37:44 +02:00
|
|
|
/* `T1_Blend_Flags` values instead */
|
2002-03-30 14:16:35 +01:00
|
|
|
#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
|
|
|
|
#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
|
|
|
|
#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
|
|
|
|
#define t1_blend_blue_values T1_BLEND_BLUE_VALUES
|
|
|
|
#define t1_blend_other_blues T1_BLEND_OTHER_BLUES
|
|
|
|
#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH
|
|
|
|
#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT
|
|
|
|
#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS
|
|
|
|
#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS
|
|
|
|
#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE
|
|
|
|
#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT
|
|
|
|
#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES
|
|
|
|
#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES
|
|
|
|
#define t1_blend_force_bold T1_BLEND_FORCE_BOLD
|
|
|
|
#define t1_blend_max T1_BLEND_MAX
|
2002-02-28 19:59:37 +01:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/* */
|
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
/* maximum number of Multiple Masters designs, as defined in the spec */
|
|
|
|
#define T1_MAX_MM_DESIGNS 16
|
2000-07-14 08:16:47 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
/* maximum number of Multiple Masters axes, as defined in the spec */
|
2002-07-11 13:26:21 +02:00
|
|
|
#define T1_MAX_MM_AXIS 4
|
2000-05-26 04:07:40 +02:00
|
|
|
|
|
|
|
/* maximum number of elements in a design map */
|
2000-07-11 08:12:20 +02:00
|
|
|
#define T1_MAX_MM_MAP_POINTS 20
|
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2000-05-24 23:12:02 +02:00
|
|
|
/* this structure is used to store the BlendDesignMap entry for an axis */
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct PS_DesignMap_
|
2000-05-11 20:23:52 +02:00
|
|
|
{
|
2000-05-24 23:12:02 +02:00
|
|
|
FT_Byte num_points;
|
2004-05-20 11:21:19 +02:00
|
|
|
FT_Long* design_points;
|
2000-05-24 23:12:02 +02:00
|
|
|
FT_Fixed* blend_points;
|
2000-07-14 08:16:47 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
} PS_DesignMapRec, *PS_DesignMap;
|
|
|
|
|
2017-05-03 23:54:29 +02:00
|
|
|
/* backward compatible definition */
|
2002-03-30 14:16:35 +01:00
|
|
|
typedef PS_DesignMapRec T1_DesignMap;
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2000-05-26 04:07:40 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct PS_BlendRec_
|
2000-05-11 20:23:52 +02:00
|
|
|
{
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_UInt num_designs;
|
|
|
|
FT_UInt num_axis;
|
|
|
|
|
|
|
|
FT_String* axis_names[T1_MAX_MM_AXIS];
|
|
|
|
FT_Fixed* design_pos[T1_MAX_MM_DESIGNS];
|
|
|
|
PS_DesignMapRec design_map[T1_MAX_MM_AXIS];
|
|
|
|
|
|
|
|
FT_Fixed* weight_vector;
|
|
|
|
FT_Fixed* default_weight_vector;
|
2000-07-14 08:16:47 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1];
|
|
|
|
PS_Private privates [T1_MAX_MM_DESIGNS + 1];
|
2000-07-14 08:16:47 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_ULong blend_bitflags;
|
2000-07-14 08:16:47 +02:00
|
|
|
|
2002-07-11 13:26:21 +02:00
|
|
|
FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1];
|
|
|
|
|
2007-01-10 15:18:15 +01:00
|
|
|
/* since 2.3.0 */
|
* freetype2/include/freetype/internal/psaux.h: New macros
IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT,
IS_PS_XDIGIT, and IS_PS_BASE85 (from freetype2/src/psaux/psconv.h).
(T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER,
T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND.
(T1_DecoderRec): New fields `buildchar' and `face'.
(IS_PS_TOKEN): New macro.
* freetype2/include/freetype/internal/t1types.h (T1_FaceRec): New
fields `ndv_idx', `cdv_idx', and `len_buildchar'.
* freetype2/include/freetype/t1tables.h (PS_BlendRec): New fields
`default_design_vector' and `num_default_design_vector'.
* freetype2/src/psaux/psconv.h: Move macros IS_PS_NEWLINE,
IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT,
and IS_PS_BASE85 to freetype2/include/freetype/internal/psaux.h.
* freetype2/src/psaux/psobjs.c (ps_parser_to_token_array): Allow
`token' argument to be NULL if we want only to count the number of
tokens.
(ps_tocoordarray): Allow `coords' argument to be NULL if we just
want to skip the array.
(ps_tofixedarray): Allow `values' argument to be NULL if we just
want to skip the array.
* freetype2/src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add
support for (partially commented out) othersubrs 19-25, 27, and 28.
(t1_decoder_init): Initialize new fields `face' and `buildchar'.
(t1_decoder_done): Release new field `buildchar'.
* freetype2/src/type1/t1load.c (parse_buildchar, parse_private): New
functions.
(t1_keywords): Register them.
(t1_allocate_blend): Updated.
(t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER,
T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND.
(parse_dict): Remove `keyword_flags' argument.
Use new macro IS_PS_TOKEN.
Changed function so that later PostScript definitions override
earlier ones.
(t1_init_loader): Initialize new field `keywords_encountered'.
(T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and
`len_buildchar'.
Remove `keywords_flags'.
* freetype2/src/type1/t1load.h (T1_LoaderRect): New field
`keywords_encountered'.
(T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros.
* freetype2/src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]:
New entries for parsing /NDV, /CDV, and /DesignVector.
2006-07-14 20:28:08 +02:00
|
|
|
|
|
|
|
/* undocumented, optional: the default design instance; */
|
|
|
|
/* corresponds to default_weight_vector -- */
|
|
|
|
/* num_default_design_vector == 0 means it is not present */
|
|
|
|
/* in the font and associated metrics files */
|
|
|
|
FT_UInt default_design_vector[T1_MAX_MM_DESIGNS];
|
|
|
|
FT_UInt num_default_design_vector;
|
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
} PS_BlendRec, *PS_Blend;
|
2000-07-14 08:16:47 +02:00
|
|
|
|
|
|
|
|
2017-05-03 23:54:29 +02:00
|
|
|
/* backward compatible definition */
|
2002-03-30 14:16:35 +01:00
|
|
|
typedef PS_BlendRec T1_Blend;
|
2000-05-11 20:23:52 +02:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* CID_FaceDictRec
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-07-31 10:42:21 +02:00
|
|
|
* A structure used to represent data in a CID top-level dictionary. In
|
2018-08-24 18:52:30 +02:00
|
|
|
* most cases, they are part of the font's '/FDArray' array. Within a
|
2018-07-31 10:42:21 +02:00
|
|
|
* CID font file, such (internal) subfont dictionaries are enclosed by
|
2018-08-24 18:52:30 +02:00
|
|
|
* '%ADOBeginFontDict' and '%ADOEndFontDict' comments.
|
2018-07-31 10:42:21 +02:00
|
|
|
*
|
2018-08-24 18:52:30 +02:00
|
|
|
* Note that `CID_FaceDictRec` misses a field for the '/FontName'
|
2018-07-31 10:42:21 +02:00
|
|
|
* keyword, specifying the subfont's name (the top-level font name is
|
2018-08-24 18:52:30 +02:00
|
|
|
* given by the '/CIDFontName' keyword). This is an oversight, but it
|
|
|
|
* doesn't limit the 'cid' font module's functionality because FreeType
|
2018-07-31 10:42:21 +02:00
|
|
|
* neither needs this entry nor gives access to CID subfonts.
|
2018-06-03 22:00:42 +02:00
|
|
|
*/
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct CID_FaceDictRec_
|
2000-05-03 20:15:52 +02:00
|
|
|
{
|
2002-02-28 19:59:37 +01:00
|
|
|
PS_PrivateRec private_dict;
|
2000-05-03 20:15:52 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_UInt len_buildchar;
|
|
|
|
FT_Fixed forcebold_threshold;
|
|
|
|
FT_Pos stroke_width;
|
2018-07-31 10:42:21 +02:00
|
|
|
FT_Fixed expansion_factor; /* this is a duplicate of */
|
|
|
|
/* `private_dict->expansion_factor' */
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_Byte paint_type;
|
|
|
|
FT_Byte font_type;
|
|
|
|
FT_Matrix font_matrix;
|
|
|
|
FT_Vector font_offset;
|
2000-06-01 05:27:48 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_UInt num_subrs;
|
|
|
|
FT_ULong subrmap_offset;
|
2021-10-08 04:41:56 +02:00
|
|
|
FT_UInt sd_bytes;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2008-05-31 09:03:30 +02:00
|
|
|
} CID_FaceDictRec;
|
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* CID_FaceDict
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* A handle to a @CID_FaceDictRec structure.
|
|
|
|
*/
|
2008-05-31 09:03:30 +02:00
|
|
|
typedef struct CID_FaceDictRec_* CID_FaceDict;
|
|
|
|
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* CID_FontDict
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* This type is equivalent to @CID_FaceDictRec. It is deprecated but
|
|
|
|
* kept to maintain source compatibility between various versions of
|
|
|
|
* FreeType.
|
|
|
|
*/
|
2002-03-30 14:16:35 +01:00
|
|
|
typedef CID_FaceDictRec CID_FontDict;
|
2002-02-28 19:59:37 +01:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* CID_FaceInfoRec
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* A structure used to represent CID Face information.
|
|
|
|
*/
|
2002-02-28 19:59:37 +01:00
|
|
|
typedef struct CID_FaceInfoRec_
|
2000-05-03 20:15:52 +02:00
|
|
|
{
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_String* cid_font_name;
|
|
|
|
FT_Fixed cid_version;
|
|
|
|
FT_Int cid_font_type;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_String* registry;
|
|
|
|
FT_String* ordering;
|
|
|
|
FT_Int supplement;
|
2000-05-03 20:15:52 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
PS_FontInfoRec font_info;
|
|
|
|
FT_BBox font_bbox;
|
|
|
|
FT_ULong uid_base;
|
2000-05-03 20:15:52 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_Int num_xuid;
|
|
|
|
FT_ULong xuid[16];
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_ULong cidmap_offset;
|
2021-10-08 04:41:56 +02:00
|
|
|
FT_UInt fd_bytes;
|
|
|
|
FT_UInt gd_bytes;
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_ULong cid_count;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2021-10-11 05:11:10 +02:00
|
|
|
FT_UInt num_dicts;
|
2002-02-28 19:59:37 +01:00
|
|
|
CID_FaceDict font_dicts;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2002-02-28 19:59:37 +01:00
|
|
|
FT_ULong data_offset;
|
2000-06-01 05:27:48 +02:00
|
|
|
|
2008-05-28 23:51:57 +02:00
|
|
|
} CID_FaceInfoRec;
|
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* CID_FaceInfo
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* A handle to a @CID_FaceInfoRec structure.
|
|
|
|
*/
|
2008-05-28 23:51:57 +02:00
|
|
|
typedef struct CID_FaceInfoRec_* CID_FaceInfo;
|
2000-05-03 20:15:52 +02:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @struct:
|
2018-06-03 22:00:42 +02:00
|
|
|
* CID_Info
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-24 18:52:30 +02:00
|
|
|
* This type is equivalent to @CID_FaceInfoRec. It is deprecated but kept
|
|
|
|
* to maintain source compatibility between various versions of FreeType.
|
2018-06-03 22:00:42 +02:00
|
|
|
*/
|
2002-03-30 14:16:35 +01:00
|
|
|
typedef CID_FaceInfoRec CID_Info;
|
2002-05-29 00:07:49 +02:00
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
2018-09-04 08:00:58 +02:00
|
|
|
/**************************************************************************
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @function:
|
2022-02-12 07:52:57 +01:00
|
|
|
* FT_Has_PS_Glyph_Names
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @description:
|
2022-02-12 07:52:57 +01:00
|
|
|
* Return true if a given face provides reliable PostScript glyph names.
|
|
|
|
* This is similar to using the @FT_HAS_GLYPH_NAMES macro, except that
|
|
|
|
* certain fonts (mostly TrueType) contain incorrect glyph name tables.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* When this function returns true, the caller is sure that the glyph
|
|
|
|
* names returned by @FT_Get_Glyph_Name are reliable.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @input:
|
2022-02-12 07:52:57 +01:00
|
|
|
* face ::
|
|
|
|
* face handle
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @return:
|
2022-02-12 07:52:57 +01:00
|
|
|
* Boolean. True if glyph names are reliable.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
*/
|
2002-05-29 00:07:49 +02:00
|
|
|
FT_EXPORT( FT_Int )
|
2002-05-29 00:38:05 +02:00
|
|
|
FT_Has_PS_Glyph_Names( FT_Face face );
|
2002-05-29 00:07:49 +02:00
|
|
|
|
|
|
|
|
2018-09-04 08:00:58 +02:00
|
|
|
/**************************************************************************
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @function:
|
2022-02-12 07:52:57 +01:00
|
|
|
* FT_Get_PS_Font_Info
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @description:
|
2022-02-12 07:52:57 +01:00
|
|
|
* Retrieve the @PS_FontInfoRec structure corresponding to a given
|
|
|
|
* PostScript font.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @input:
|
2022-02-12 07:52:57 +01:00
|
|
|
* face ::
|
|
|
|
* PostScript face handle.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @output:
|
2022-02-12 07:52:57 +01:00
|
|
|
* afont_info ::
|
2022-02-12 07:58:43 +01:00
|
|
|
* A pointer to a @PS_FontInfoRec object.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @return:
|
2022-02-12 07:52:57 +01:00
|
|
|
* FreeType error code. 0~means success.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @note:
|
2022-02-12 07:52:57 +01:00
|
|
|
* String pointers within the @PS_FontInfoRec structure are owned by the
|
2022-02-12 07:58:43 +01:00
|
|
|
* face and don't need to be freed by the caller. Missing entries in the
|
|
|
|
* font's FontInfo dictionary are represented by `NULL` pointers.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
2022-02-12 07:58:43 +01:00
|
|
|
* The following font formats support this feature: 'Type~1', 'Type~42',
|
|
|
|
* 'CFF', 'CID~Type~1'. For other font formats this function returns the
|
|
|
|
* `FT_Err_Invalid_Argument` error code.
|
|
|
|
*
|
|
|
|
* @example:
|
|
|
|
* ```
|
|
|
|
* PS_FontInfoRec font_info;
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* error = FT_Get_PS_Font_Info( face, &font_info );
|
|
|
|
* ...
|
|
|
|
* ```
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
*/
|
2002-05-29 00:07:49 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
2008-05-28 23:51:57 +02:00
|
|
|
FT_Get_PS_Font_Info( FT_Face face,
|
|
|
|
PS_FontInfo afont_info );
|
|
|
|
|
|
|
|
|
2018-09-04 08:00:58 +02:00
|
|
|
/**************************************************************************
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @function:
|
2022-02-12 07:52:57 +01:00
|
|
|
* FT_Get_PS_Font_Private
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @description:
|
2022-02-12 07:52:57 +01:00
|
|
|
* Retrieve the @PS_PrivateRec structure corresponding to a given
|
|
|
|
* PostScript font.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @input:
|
2022-02-12 07:52:57 +01:00
|
|
|
* face ::
|
|
|
|
* PostScript face handle.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @output:
|
2022-02-12 07:52:57 +01:00
|
|
|
* afont_private ::
|
2022-02-12 07:58:43 +01:00
|
|
|
* A pointer to a @PS_PrivateRec object.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @return:
|
2022-02-12 07:52:57 +01:00
|
|
|
* FreeType error code. 0~means success.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
* @note:
|
2022-02-12 07:52:57 +01:00
|
|
|
* The string pointers within the @PS_PrivateRec structure are owned by
|
|
|
|
* the face and don't need to be freed by the caller.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
2022-02-12 07:58:43 +01:00
|
|
|
* Only the 'Type~1' font format supports this feature. For other font
|
|
|
|
* formats this function returns the `FT_Err_Invalid_Argument` error
|
|
|
|
* code.
|
|
|
|
*
|
|
|
|
* @example:
|
|
|
|
* ```
|
|
|
|
* PS_PrivateRec font_private;
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* error = FT_Get_PS_Font_Private( face, &font_private );
|
|
|
|
* ...
|
|
|
|
* ```
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
|
|
|
*/
|
2004-11-12 08:02:45 +01:00
|
|
|
FT_EXPORT( FT_Error )
|
2008-05-28 23:51:57 +02:00
|
|
|
FT_Get_PS_Font_Private( FT_Face face,
|
|
|
|
PS_Private afont_private );
|
2002-05-29 00:07:49 +02:00
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @enum:
|
2018-06-03 22:00:42 +02:00
|
|
|
* T1_EncodingType
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-24 18:52:30 +02:00
|
|
|
* An enumeration describing the 'Encoding' entry in a Type 1 dictionary.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @values:
|
2018-06-03 22:00:42 +02:00
|
|
|
* T1_ENCODING_TYPE_NONE ::
|
|
|
|
* T1_ENCODING_TYPE_ARRAY ::
|
|
|
|
* T1_ENCODING_TYPE_STANDARD ::
|
|
|
|
* T1_ENCODING_TYPE_ISOLATIN1 ::
|
|
|
|
* T1_ENCODING_TYPE_EXPERT ::
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @since:
|
2018-06-03 22:00:42 +02:00
|
|
|
* 2.4.8
|
|
|
|
*/
|
2011-11-13 16:30:59 +01:00
|
|
|
typedef enum T1_EncodingType_
|
|
|
|
{
|
|
|
|
T1_ENCODING_TYPE_NONE = 0,
|
|
|
|
T1_ENCODING_TYPE_ARRAY,
|
|
|
|
T1_ENCODING_TYPE_STANDARD,
|
|
|
|
T1_ENCODING_TYPE_ISOLATIN1,
|
|
|
|
T1_ENCODING_TYPE_EXPERT
|
|
|
|
|
|
|
|
} T1_EncodingType;
|
|
|
|
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @enum:
|
2018-06-03 22:00:42 +02:00
|
|
|
* PS_Dict_Keys
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-24 18:52:30 +02:00
|
|
|
* An enumeration used in calls to @FT_Get_PS_Font_Value to identify the
|
|
|
|
* Type~1 dictionary entry to retrieve.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @values:
|
2018-06-03 22:00:42 +02:00
|
|
|
* PS_DICT_FONT_TYPE ::
|
|
|
|
* PS_DICT_FONT_MATRIX ::
|
|
|
|
* PS_DICT_FONT_BBOX ::
|
|
|
|
* PS_DICT_PAINT_TYPE ::
|
|
|
|
* PS_DICT_FONT_NAME ::
|
|
|
|
* PS_DICT_UNIQUE_ID ::
|
|
|
|
* PS_DICT_NUM_CHAR_STRINGS ::
|
|
|
|
* PS_DICT_CHAR_STRING_KEY ::
|
|
|
|
* PS_DICT_CHAR_STRING ::
|
|
|
|
* PS_DICT_ENCODING_TYPE ::
|
|
|
|
* PS_DICT_ENCODING_ENTRY ::
|
|
|
|
* PS_DICT_NUM_SUBRS ::
|
|
|
|
* PS_DICT_SUBR ::
|
|
|
|
* PS_DICT_STD_HW ::
|
|
|
|
* PS_DICT_STD_VW ::
|
|
|
|
* PS_DICT_NUM_BLUE_VALUES ::
|
|
|
|
* PS_DICT_BLUE_VALUE ::
|
|
|
|
* PS_DICT_BLUE_FUZZ ::
|
|
|
|
* PS_DICT_NUM_OTHER_BLUES ::
|
|
|
|
* PS_DICT_OTHER_BLUE ::
|
|
|
|
* PS_DICT_NUM_FAMILY_BLUES ::
|
|
|
|
* PS_DICT_FAMILY_BLUE ::
|
|
|
|
* PS_DICT_NUM_FAMILY_OTHER_BLUES ::
|
|
|
|
* PS_DICT_FAMILY_OTHER_BLUE ::
|
|
|
|
* PS_DICT_BLUE_SCALE ::
|
|
|
|
* PS_DICT_BLUE_SHIFT ::
|
|
|
|
* PS_DICT_NUM_STEM_SNAP_H ::
|
|
|
|
* PS_DICT_STEM_SNAP_H ::
|
|
|
|
* PS_DICT_NUM_STEM_SNAP_V ::
|
|
|
|
* PS_DICT_STEM_SNAP_V ::
|
|
|
|
* PS_DICT_FORCE_BOLD ::
|
|
|
|
* PS_DICT_RND_STEM_UP ::
|
|
|
|
* PS_DICT_MIN_FEATURE ::
|
|
|
|
* PS_DICT_LEN_IV ::
|
|
|
|
* PS_DICT_PASSWORD ::
|
|
|
|
* PS_DICT_LANGUAGE_GROUP ::
|
|
|
|
* PS_DICT_VERSION ::
|
|
|
|
* PS_DICT_NOTICE ::
|
|
|
|
* PS_DICT_FULL_NAME ::
|
|
|
|
* PS_DICT_FAMILY_NAME ::
|
|
|
|
* PS_DICT_WEIGHT ::
|
|
|
|
* PS_DICT_IS_FIXED_PITCH ::
|
|
|
|
* PS_DICT_UNDERLINE_POSITION ::
|
|
|
|
* PS_DICT_UNDERLINE_THICKNESS ::
|
|
|
|
* PS_DICT_FS_TYPE ::
|
|
|
|
* PS_DICT_ITALIC_ANGLE ::
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @since:
|
2018-06-03 22:00:42 +02:00
|
|
|
* 2.4.8
|
|
|
|
*/
|
2011-11-13 16:30:59 +01:00
|
|
|
typedef enum PS_Dict_Keys_
|
|
|
|
{
|
|
|
|
/* conventionally in the font dictionary */
|
|
|
|
PS_DICT_FONT_TYPE, /* FT_Byte */
|
|
|
|
PS_DICT_FONT_MATRIX, /* FT_Fixed */
|
|
|
|
PS_DICT_FONT_BBOX, /* FT_Fixed */
|
|
|
|
PS_DICT_PAINT_TYPE, /* FT_Byte */
|
|
|
|
PS_DICT_FONT_NAME, /* FT_String* */
|
|
|
|
PS_DICT_UNIQUE_ID, /* FT_Int */
|
|
|
|
PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */
|
|
|
|
PS_DICT_CHAR_STRING_KEY, /* FT_String* */
|
|
|
|
PS_DICT_CHAR_STRING, /* FT_String* */
|
|
|
|
PS_DICT_ENCODING_TYPE, /* T1_EncodingType */
|
|
|
|
PS_DICT_ENCODING_ENTRY, /* FT_String* */
|
|
|
|
|
|
|
|
/* conventionally in the font Private dictionary */
|
|
|
|
PS_DICT_NUM_SUBRS, /* FT_Int */
|
|
|
|
PS_DICT_SUBR, /* FT_String* */
|
|
|
|
PS_DICT_STD_HW, /* FT_UShort */
|
|
|
|
PS_DICT_STD_VW, /* FT_UShort */
|
|
|
|
PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */
|
|
|
|
PS_DICT_BLUE_VALUE, /* FT_Short */
|
|
|
|
PS_DICT_BLUE_FUZZ, /* FT_Int */
|
|
|
|
PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */
|
|
|
|
PS_DICT_OTHER_BLUE, /* FT_Short */
|
|
|
|
PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */
|
|
|
|
PS_DICT_FAMILY_BLUE, /* FT_Short */
|
|
|
|
PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */
|
|
|
|
PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */
|
|
|
|
PS_DICT_BLUE_SCALE, /* FT_Fixed */
|
|
|
|
PS_DICT_BLUE_SHIFT, /* FT_Int */
|
|
|
|
PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */
|
|
|
|
PS_DICT_STEM_SNAP_H, /* FT_Short */
|
|
|
|
PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */
|
|
|
|
PS_DICT_STEM_SNAP_V, /* FT_Short */
|
|
|
|
PS_DICT_FORCE_BOLD, /* FT_Bool */
|
|
|
|
PS_DICT_RND_STEM_UP, /* FT_Bool */
|
|
|
|
PS_DICT_MIN_FEATURE, /* FT_Short */
|
|
|
|
PS_DICT_LEN_IV, /* FT_Int */
|
|
|
|
PS_DICT_PASSWORD, /* FT_Long */
|
|
|
|
PS_DICT_LANGUAGE_GROUP, /* FT_Long */
|
|
|
|
|
|
|
|
/* conventionally in the font FontInfo dictionary */
|
|
|
|
PS_DICT_VERSION, /* FT_String* */
|
|
|
|
PS_DICT_NOTICE, /* FT_String* */
|
|
|
|
PS_DICT_FULL_NAME, /* FT_String* */
|
|
|
|
PS_DICT_FAMILY_NAME, /* FT_String* */
|
2011-11-15 08:17:59 +01:00
|
|
|
PS_DICT_WEIGHT, /* FT_String* */
|
2011-11-13 16:30:59 +01:00
|
|
|
PS_DICT_IS_FIXED_PITCH, /* FT_Bool */
|
|
|
|
PS_DICT_UNDERLINE_POSITION, /* FT_Short */
|
|
|
|
PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */
|
|
|
|
PS_DICT_FS_TYPE, /* FT_UShort */
|
|
|
|
PS_DICT_ITALIC_ANGLE, /* FT_Long */
|
|
|
|
|
|
|
|
PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
|
|
|
|
|
|
|
|
} PS_Dict_Keys;
|
|
|
|
|
|
|
|
|
2018-09-04 08:00:58 +02:00
|
|
|
/**************************************************************************
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
|
|
|
* @function:
|
2022-02-12 07:52:57 +01:00
|
|
|
* FT_Get_PS_Font_Value
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
|
|
|
* @description:
|
2022-02-12 07:52:57 +01:00
|
|
|
* Retrieve the value for the supplied key from a PostScript font.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
|
|
|
* @input:
|
2022-02-12 07:52:57 +01:00
|
|
|
* face ::
|
|
|
|
* PostScript face handle.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* key ::
|
|
|
|
* An enumeration value representing the dictionary key to retrieve.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* idx ::
|
|
|
|
* For array values, this specifies the index to be returned.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* value ::
|
|
|
|
* A pointer to memory into which to write the value.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* valen_len ::
|
|
|
|
* The size, in bytes, of the memory supplied for the value.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
|
|
|
* @output:
|
2022-02-12 07:52:57 +01:00
|
|
|
* value ::
|
|
|
|
* The value matching the above key, if it exists.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
|
|
|
* @return:
|
2022-02-12 07:52:57 +01:00
|
|
|
* The amount of memory (in bytes) required to hold the requested value
|
|
|
|
* (if it exists, -1 otherwise).
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
|
|
|
* @note:
|
2022-02-12 07:52:57 +01:00
|
|
|
* The values returned are not pointers into the internal structures of
|
|
|
|
* the face, but are 'fresh' copies, so that the memory containing them
|
|
|
|
* belongs to the calling application. This also enforces the
|
|
|
|
* 'read-only' nature of these values, i.e., this function cannot be
|
|
|
|
* used to manipulate the face.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* `value` is a void pointer because the values returned can be of
|
|
|
|
* various types.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* If either `value` is `NULL` or `value_len` is too small, just the
|
|
|
|
* required memory size for the requested entry is returned.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* The `idx` parameter is used, not only to retrieve elements of, for
|
|
|
|
* example, the FontMatrix or FontBBox, but also to retrieve name keys
|
|
|
|
* from the CharStrings dictionary, and the charstrings themselves. It
|
|
|
|
* is ignored for atomic values.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* `PS_DICT_BLUE_SCALE` returns a value that is scaled up by 1000. To
|
|
|
|
* get the value as in the font stream, you need to divide by 65536000.0
|
|
|
|
* (to remove the FT_Fixed scale, and the x1000 scale).
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* IMPORTANT: Only key/value pairs read by the FreeType interpreter can
|
|
|
|
* be retrieved. So, for example, PostScript procedures such as NP, ND,
|
|
|
|
* and RD are not available. Arbitrary keys are, obviously, not be
|
|
|
|
* available either.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2022-02-12 07:52:57 +01:00
|
|
|
* If the font's format is not PostScript-based, this function returns
|
|
|
|
* the `FT_Err_Invalid_Argument` error code.
|
2011-11-13 16:30:59 +01:00
|
|
|
*
|
2017-09-21 14:56:58 +02:00
|
|
|
* @since:
|
2022-02-12 07:52:57 +01:00
|
|
|
* 2.4.8
|
2017-09-21 14:56:58 +02:00
|
|
|
*
|
2011-11-13 16:30:59 +01:00
|
|
|
*/
|
|
|
|
FT_EXPORT( FT_Long )
|
|
|
|
FT_Get_PS_Font_Value( FT_Face face,
|
|
|
|
PS_Dict_Keys key,
|
|
|
|
FT_UInt idx,
|
|
|
|
void *value,
|
|
|
|
FT_Long value_len );
|
|
|
|
|
|
|
|
/* */
|
2002-05-29 00:07:49 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_END_HEADER
|
2000-08-01 15:17:04 +02:00
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#endif /* T1TABLES_H_ */
|
2000-07-11 08:12:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|