Hash :
65ba724b
        
        Author :
  
        
        Date :
2003-05-30T09:12:50
        
      
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
/***************************************************************************/
/*                                                                         */
/*  pshglob.h                                                              */
/*                                                                         */
/*    PostScript hinter global hinting management.                         */
/*                                                                         */
/*  Copyright 2001, 2002, 2003 by                                          */
/*  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 __PSHGLOB_H__
#define __PSHGLOB_H__
#include FT_FREETYPE_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
FT_BEGIN_HEADER
  /*************************************************************************/
  /*************************************************************************/
  /*****                                                               *****/
  /*****                    GLOBAL HINTS INTERNALS                     *****/
  /*****                                                               *****/
  /*************************************************************************/
  /*************************************************************************/
  /*************************************************************************/
  /*                                                                       */
  /* @constant:                                                            */
  /*    PS_GLOBALS_MAX_BLUE_ZONES                                          */
  /*                                                                       */
  /* @description:                                                         */
  /*    The maximum number of blue zones in a font global hints structure. */
  /*    See @PS_Globals_BluesRec.                                          */
  /*                                                                       */
#define PS_GLOBALS_MAX_BLUE_ZONES  16
  /*************************************************************************/
  /*                                                                       */
  /* @constant:                                                            */
  /*    PS_GLOBALS_MAX_STD_WIDTHS                                          */
  /*                                                                       */
  /* @description:                                                         */
  /*    The maximum number of standard and snap widths in either the       */
  /*    horizontal or vertical direction.  See @PS_Globals_WidthsRec.      */
  /*                                                                       */
#define PS_GLOBALS_MAX_STD_WIDTHS  16
  /* standard and snap width */
  typedef struct  PSH_WidthRec_
  {
    FT_Int  org;
    FT_Pos  cur;
    FT_Pos  fit;
  } PSH_WidthRec, *PSH_Width;
  /* standard and snap widths table */
  typedef struct  PSH_WidthsRec_
  {
    FT_UInt       count;
    PSH_WidthRec  widths[PS_GLOBALS_MAX_STD_WIDTHS];
  } PSH_WidthsRec, *PSH_Widths;
  typedef struct  PSH_DimensionRec_
  {
    PSH_WidthsRec  stdw;
    FT_Fixed       scale_mult;
    FT_Fixed       scale_delta;
  } PSH_DimensionRec, *PSH_Dimension;
  /* blue zone descriptor */
  typedef struct  PSH_Blue_ZoneRec_
  {
    FT_Int  org_ref;
    FT_Int  org_delta;
    FT_Int  org_top;
    FT_Int  org_bottom;
    FT_Pos  cur_ref;
    FT_Pos  cur_delta;
    FT_Pos  cur_bottom;
    FT_Pos  cur_top;
  } PSH_Blue_ZoneRec, *PSH_Blue_Zone;
  typedef struct  PSH_Blue_TableRec_
  {
    FT_UInt           count;
    PSH_Blue_ZoneRec  zones[PS_GLOBALS_MAX_BLUE_ZONES];
  } PSH_Blue_TableRec, *PSH_Blue_Table;
  /* blue zones table */
  typedef struct  PSH_BluesRec_
  {
    PSH_Blue_TableRec  normal_top;
    PSH_Blue_TableRec  normal_bottom;
    PSH_Blue_TableRec  family_top;
    PSH_Blue_TableRec  family_bottom;
    FT_Fixed           blue_scale;
    FT_Int             blue_shift;
    FT_Int             blue_threshold;
    FT_Int             blue_fuzz;
    FT_Bool            no_overshoots;
  } PSH_BluesRec, *PSH_Blues;
  /* font globals.                                         */
  /* dimension 0 => X coordinates + vertical hints/stems   */
  /* dimension 1 => Y coordinates + horizontal hints/stems */
  typedef struct  PSH_GlobalsRec_
  {
    FT_Memory         memory;
    PSH_DimensionRec  dimension[2];
    PSH_BluesRec      blues;
  } PSH_GlobalsRec;
#define PSH_BLUE_ALIGN_NONE  0
#define PSH_BLUE_ALIGN_TOP   1
#define PSH_BLUE_ALIGN_BOT   2
  typedef struct  PSH_AlignmentRec_
  {
    int     align;
    FT_Pos  align_top;
    FT_Pos  align_bot;
  } PSH_AlignmentRec, *PSH_Alignment;
  FT_LOCAL( void )
  psh_globals_funcs_init( PSH_Globals_FuncsRec*  funcs );
#if 0
  /* snap a stem width to fitter coordinates.  `org_width' is in font */
  /* units.  The result is in device pixels (26.6 format).            */
  FT_LOCAL( FT_Pos )
  psh_dimension_snap_width( PSH_Dimension  dimension,
                            FT_Int         org_width );
#endif
  FT_LOCAL( FT_Error )
  psh_globals_set_scale( PSH_Globals  globals,
                         FT_Fixed     x_scale,
                         FT_Fixed     y_scale,
                         FT_Fixed     x_delta,
                         FT_Fixed     y_delta );
  /* snap a stem to one or two blue zones */
  FT_LOCAL( void )
  psh_blues_snap_stem( PSH_Blues      blues,
                       FT_Int         stem_top,
                       FT_Int         stem_bot,
                       PSH_Alignment  alignment );
  /* */
#ifdef DEBUG_HINTER
  extern PSH_Globals  ps_debug_globals;
#endif
FT_END_HEADER
#endif /* __PSHGLOB_H__ */
/* END */