freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] [type1/MM] Tighten headers.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [type1/MM] Tighten headers.
Date: Sun, 12 May 2024 02:22:02 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • 4a85db7e
    by Alexei Podtelezhnikov (Алексей Подтележников) at 2024-05-11T22:19:25-04:00
    [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.
    

3 changed files:

Changes:

  • include/freetype/ftmm.h
    ... ... @@ -20,9 +20,6 @@
    20 20
     #define FTMM_H_
    
    21 21
     
    
    22 22
     
    
    23
    -#include <freetype/t1tables.h>
    
    24
    -
    
    25
    -
    
    26 23
     FT_BEGIN_HEADER
    
    27 24
     
    
    28 25
     
    
    ... ... @@ -53,6 +50,30 @@ FT_BEGIN_HEADER
    53 50
        */
    
    54 51
     
    
    55 52
     
    
    53
    +  /**************************************************************************
    
    54
    +   *
    
    55
    +   * @enum:
    
    56
    +   *   T1_MAX_MM_XXX
    
    57
    +   *
    
    58
    +   * @description:
    
    59
    +   *   Multiple Masters limits as defined in their specifications.
    
    60
    +   *
    
    61
    +   * @values:
    
    62
    +   *   T1_MAX_MM_AXIS ::
    
    63
    +   *     The maximum number of Multiple Masters axes.
    
    64
    +   *
    
    65
    +   *   T1_MAX_MM_DESIGNS ::
    
    66
    +   *     The maximum number of Multiple Masters designs.
    
    67
    +   *
    
    68
    +   *   T1_MAX_MM_MAP_POINTS ::
    
    69
    +   *     The maximum number of elements in a design map.
    
    70
    +   *
    
    71
    +   */
    
    72
    +#define T1_MAX_MM_AXIS         4
    
    73
    +#define T1_MAX_MM_DESIGNS     16
    
    74
    +#define T1_MAX_MM_MAP_POINTS  20
    
    75
    +
    
    76
    +
    
    56 77
       /**************************************************************************
    
    57 78
        *
    
    58 79
        * @struct:
    

  • include/freetype/internal/t1types.h
    ... ... @@ -21,7 +21,7 @@
    21 21
     #define T1TYPES_H_
    
    22 22
     
    
    23 23
     
    
    24
    -#include <freetype/t1tables.h>
    
    24
    +#include <freetype/ftmm.h>
    
    25 25
     #include <freetype/internal/pshints.h>
    
    26 26
     #include <freetype/internal/ftserv.h>
    
    27 27
     #include <freetype/internal/fthash.h>
    
    ... ... @@ -137,6 +137,54 @@ FT_BEGIN_HEADER
    137 137
       } CID_SubrsRec, *CID_Subrs;
    
    138 138
     
    
    139 139
     
    
    140
    +  /* this structure is used to store the BlendDesignMap entry for an axis */
    
    141
    +  typedef struct  PS_DesignMap_
    
    142
    +  {
    
    143
    +    FT_Byte    num_points;
    
    144
    +    FT_Long*   design_points;
    
    145
    +    FT_Fixed*  blend_points;
    
    146
    +
    
    147
    +  } PS_DesignMapRec, *PS_DesignMap;
    
    148
    +
    
    149
    +  /* backward compatible definition */
    
    150
    +  typedef PS_DesignMapRec  T1_DesignMap;
    
    151
    +
    
    152
    +
    
    153
    +  typedef struct  PS_BlendRec_
    
    154
    +  {
    
    155
    +    FT_UInt          num_designs;
    
    156
    +    FT_UInt          num_axis;
    
    157
    +
    
    158
    +    FT_String*       axis_names[T1_MAX_MM_AXIS];
    
    159
    +    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
    
    160
    +    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];
    
    161
    +
    
    162
    +    FT_Fixed*        weight_vector;
    
    163
    +    FT_Fixed*        default_weight_vector;
    
    164
    +
    
    165
    +    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
    
    166
    +    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];
    
    167
    +
    
    168
    +    FT_ULong         blend_bitflags;
    
    169
    +
    
    170
    +    FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];
    
    171
    +
    
    172
    +    /* since 2.3.0 */
    
    173
    +
    
    174
    +    /* undocumented, optional: the default design instance;   */
    
    175
    +    /* corresponds to default_weight_vector --                */
    
    176
    +    /* num_default_design_vector == 0 means it is not present */
    
    177
    +    /* in the font and associated metrics files               */
    
    178
    +    FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];
    
    179
    +    FT_UInt          num_default_design_vector;
    
    180
    +
    
    181
    +  } PS_BlendRec, *PS_Blend;
    
    182
    +
    
    183
    +
    
    184
    +  /* backward compatible definition */
    
    185
    +  typedef PS_BlendRec  T1_Blend;
    
    186
    +
    
    187
    +
    
    140 188
       /*************************************************************************/
    
    141 189
       /*************************************************************************/
    
    142 190
       /*************************************************************************/
    

  • include/freetype/t1tables.h
    ... ... @@ -269,64 +269,6 @@ FT_BEGIN_HEADER
    269 269
       /* */
    
    270 270
     
    
    271 271
     
    
    272
    -  /* maximum number of Multiple Masters designs, as defined in the spec */
    
    273
    -#define T1_MAX_MM_DESIGNS     16
    
    274
    -
    
    275
    -  /* maximum number of Multiple Masters axes, as defined in the spec */
    
    276
    -#define T1_MAX_MM_AXIS        4
    
    277
    -
    
    278
    -  /* maximum number of elements in a design map */
    
    279
    -#define T1_MAX_MM_MAP_POINTS  20
    
    280
    -
    
    281
    -
    
    282
    -  /* this structure is used to store the BlendDesignMap entry for an axis */
    
    283
    -  typedef struct  PS_DesignMap_
    
    284
    -  {
    
    285
    -    FT_Byte    num_points;
    
    286
    -    FT_Long*   design_points;
    
    287
    -    FT_Fixed*  blend_points;
    
    288
    -
    
    289
    -  } PS_DesignMapRec, *PS_DesignMap;
    
    290
    -
    
    291
    -  /* backward compatible definition */
    
    292
    -  typedef PS_DesignMapRec  T1_DesignMap;
    
    293
    -
    
    294
    -
    
    295
    -  typedef struct  PS_BlendRec_
    
    296
    -  {
    
    297
    -    FT_UInt          num_designs;
    
    298
    -    FT_UInt          num_axis;
    
    299
    -
    
    300
    -    FT_String*       axis_names[T1_MAX_MM_AXIS];
    
    301
    -    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
    
    302
    -    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];
    
    303
    -
    
    304
    -    FT_Fixed*        weight_vector;
    
    305
    -    FT_Fixed*        default_weight_vector;
    
    306
    -
    
    307
    -    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
    
    308
    -    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];
    
    309
    -
    
    310
    -    FT_ULong         blend_bitflags;
    
    311
    -
    
    312
    -    FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];
    
    313
    -
    
    314
    -    /* since 2.3.0 */
    
    315
    -
    
    316
    -    /* undocumented, optional: the default design instance;   */
    
    317
    -    /* corresponds to default_weight_vector --                */
    
    318
    -    /* num_default_design_vector == 0 means it is not present */
    
    319
    -    /* in the font and associated metrics files               */
    
    320
    -    FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];
    
    321
    -    FT_UInt          num_default_design_vector;
    
    322
    -
    
    323
    -  } PS_BlendRec, *PS_Blend;
    
    324
    -
    
    325
    -
    
    326
    -  /* backward compatible definition */
    
    327
    -  typedef PS_BlendRec  T1_Blend;
    
    328
    -
    
    329
    -
    
    330 272
       /**************************************************************************
    
    331 273
        *
    
    332 274
        * @struct:
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]