[type1/MM] Tighten headers.

* include/freetype/internal/t1types.h: Host PS_DesignMap and PS_Blend.
* include/freetype/ftmm.h: Host and document TT_MAX_MM_XXX.
* include/freetype/t1tables.h: Remove them from here.
This commit is contained in:
Alexei Podtelezhnikov 2024-05-11 22:19:25 -04:00
parent b875924a6f
commit 4a85db7e31
3 changed files with 73 additions and 62 deletions

View File

@ -20,9 +20,6 @@
#define FTMM_H_
#include <freetype/t1tables.h>
FT_BEGIN_HEADER
@ -53,6 +50,30 @@ FT_BEGIN_HEADER
*/
/**************************************************************************
*
* @enum:
* T1_MAX_MM_XXX
*
* @description:
* Multiple Masters limits as defined in their specifications.
*
* @values:
* T1_MAX_MM_AXIS ::
* The maximum number of Multiple Masters axes.
*
* T1_MAX_MM_DESIGNS ::
* The maximum number of Multiple Masters designs.
*
* T1_MAX_MM_MAP_POINTS ::
* The maximum number of elements in a design map.
*
*/
#define T1_MAX_MM_AXIS 4
#define T1_MAX_MM_DESIGNS 16
#define T1_MAX_MM_MAP_POINTS 20
/**************************************************************************
*
* @struct:

View File

@ -21,7 +21,7 @@
#define T1TYPES_H_
#include <freetype/t1tables.h>
#include <freetype/ftmm.h>
#include <freetype/internal/pshints.h>
#include <freetype/internal/ftserv.h>
#include <freetype/internal/fthash.h>
@ -137,6 +137,54 @@ FT_BEGIN_HEADER
} CID_SubrsRec, *CID_Subrs;
/* this structure is used to store the BlendDesignMap entry for an axis */
typedef struct PS_DesignMap_
{
FT_Byte num_points;
FT_Long* design_points;
FT_Fixed* blend_points;
} PS_DesignMapRec, *PS_DesignMap;
/* backward compatible definition */
typedef PS_DesignMapRec T1_DesignMap;
typedef struct PS_BlendRec_
{
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;
PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1];
PS_Private privates [T1_MAX_MM_DESIGNS + 1];
FT_ULong blend_bitflags;
FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1];
/* since 2.3.0 */
/* 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;
} PS_BlendRec, *PS_Blend;
/* backward compatible definition */
typedef PS_BlendRec T1_Blend;
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/

View File

@ -269,64 +269,6 @@ FT_BEGIN_HEADER
/* */
/* maximum number of Multiple Masters designs, as defined in the spec */
#define T1_MAX_MM_DESIGNS 16
/* maximum number of Multiple Masters axes, as defined in the spec */
#define T1_MAX_MM_AXIS 4
/* maximum number of elements in a design map */
#define T1_MAX_MM_MAP_POINTS 20
/* this structure is used to store the BlendDesignMap entry for an axis */
typedef struct PS_DesignMap_
{
FT_Byte num_points;
FT_Long* design_points;
FT_Fixed* blend_points;
} PS_DesignMapRec, *PS_DesignMap;
/* backward compatible definition */
typedef PS_DesignMapRec T1_DesignMap;
typedef struct PS_BlendRec_
{
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;
PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1];
PS_Private privates [T1_MAX_MM_DESIGNS + 1];
FT_ULong blend_bitflags;
FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1];
/* since 2.3.0 */
/* 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;
} PS_BlendRec, *PS_Blend;
/* backward compatible definition */
typedef PS_BlendRec T1_Blend;
/**************************************************************************
*
* @struct: