ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

pshglob.h
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  pshglob.h                                                              */
00004 /*                                                                         */
00005 /*    PostScript hinter global hinting management.                         */
00006 /*                                                                         */
00007 /*  Copyright 2001, 2002, 2003 by                                          */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #ifndef __PSHGLOB_H__
00020 #define __PSHGLOB_H__
00021 
00022 
00023 #include FT_FREETYPE_H
00024 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
00025 
00026 
00027 FT_BEGIN_HEADER
00028 
00029 
00030   /*************************************************************************/
00031   /*************************************************************************/
00032   /*****                                                               *****/
00033   /*****                    GLOBAL HINTS INTERNALS                     *****/
00034   /*****                                                               *****/
00035   /*************************************************************************/
00036   /*************************************************************************/
00037 
00038 
00039   /*************************************************************************/
00040   /*                                                                       */
00041   /* @constant:                                                            */
00042   /*    PS_GLOBALS_MAX_BLUE_ZONES                                          */
00043   /*                                                                       */
00044   /* @description:                                                         */
00045   /*    The maximum number of blue zones in a font global hints structure. */
00046   /*    See @PS_Globals_BluesRec.                                          */
00047   /*                                                                       */
00048 #define PS_GLOBALS_MAX_BLUE_ZONES  16
00049 
00050 
00051   /*************************************************************************/
00052   /*                                                                       */
00053   /* @constant:                                                            */
00054   /*    PS_GLOBALS_MAX_STD_WIDTHS                                          */
00055   /*                                                                       */
00056   /* @description:                                                         */
00057   /*    The maximum number of standard and snap widths in either the       */
00058   /*    horizontal or vertical direction.  See @PS_Globals_WidthsRec.      */
00059   /*                                                                       */
00060 #define PS_GLOBALS_MAX_STD_WIDTHS  16
00061 
00062 
00063   /* standard and snap width */
00064   typedef struct  PSH_WidthRec_
00065   {
00066     FT_Int  org;
00067     FT_Pos  cur;
00068     FT_Pos  fit;
00069 
00070   } PSH_WidthRec, *PSH_Width;
00071 
00072 
00073   /* standard and snap widths table */
00074   typedef struct  PSH_WidthsRec_
00075   {
00076     FT_UInt       count;
00077     PSH_WidthRec  widths[PS_GLOBALS_MAX_STD_WIDTHS];
00078 
00079   } PSH_WidthsRec, *PSH_Widths;
00080 
00081 
00082   typedef struct  PSH_DimensionRec_
00083   {
00084     PSH_WidthsRec  stdw;
00085     FT_Fixed       scale_mult;
00086     FT_Fixed       scale_delta;
00087 
00088   } PSH_DimensionRec, *PSH_Dimension;
00089 
00090 
00091   /* blue zone descriptor */
00092   typedef struct  PSH_Blue_ZoneRec_
00093   {
00094     FT_Int  org_ref;
00095     FT_Int  org_delta;
00096     FT_Int  org_top;
00097     FT_Int  org_bottom;
00098 
00099     FT_Pos  cur_ref;
00100     FT_Pos  cur_delta;
00101     FT_Pos  cur_bottom;
00102     FT_Pos  cur_top;
00103 
00104   } PSH_Blue_ZoneRec, *PSH_Blue_Zone;
00105 
00106 
00107   typedef struct  PSH_Blue_TableRec_
00108   {
00109     FT_UInt           count;
00110     PSH_Blue_ZoneRec  zones[PS_GLOBALS_MAX_BLUE_ZONES];
00111 
00112   } PSH_Blue_TableRec, *PSH_Blue_Table;
00113 
00114 
00115   /* blue zones table */
00116   typedef struct  PSH_BluesRec_
00117   {
00118     PSH_Blue_TableRec  normal_top;
00119     PSH_Blue_TableRec  normal_bottom;
00120     PSH_Blue_TableRec  family_top;
00121     PSH_Blue_TableRec  family_bottom;
00122 
00123     FT_Fixed           blue_scale;
00124     FT_Int             blue_shift;
00125     FT_Int             blue_threshold;
00126     FT_Int             blue_fuzz;
00127     FT_Bool            no_overshoots;
00128 
00129   } PSH_BluesRec, *PSH_Blues;
00130 
00131 
00132   /* font globals.                                         */
00133   /* dimension 0 => X coordinates + vertical hints/stems   */
00134   /* dimension 1 => Y coordinates + horizontal hints/stems */
00135   typedef struct  PSH_GlobalsRec_
00136   {
00137     FT_Memory         memory;
00138     PSH_DimensionRec  dimension[2];
00139     PSH_BluesRec      blues;
00140 
00141   } PSH_GlobalsRec;
00142 
00143 
00144 #define PSH_BLUE_ALIGN_NONE  0
00145 #define PSH_BLUE_ALIGN_TOP   1
00146 #define PSH_BLUE_ALIGN_BOT   2
00147 
00148 
00149   typedef struct  PSH_AlignmentRec_
00150   {
00151     int     align;
00152     FT_Pos  align_top;
00153     FT_Pos  align_bot;
00154 
00155   } PSH_AlignmentRec, *PSH_Alignment;
00156 
00157 
00158   FT_LOCAL( void )
00159   psh_globals_funcs_init( PSH_Globals_FuncsRec*  funcs );
00160 
00161 
00162 #if 0
00163   /* snap a stem width to fitter coordinates.  `org_width' is in font */
00164   /* units.  The result is in device pixels (26.6 format).            */
00165   FT_LOCAL( FT_Pos )
00166   psh_dimension_snap_width( PSH_Dimension  dimension,
00167                             FT_Int         org_width );
00168 #endif
00169 
00170   FT_LOCAL( FT_Error )
00171   psh_globals_set_scale( PSH_Globals  globals,
00172                          FT_Fixed     x_scale,
00173                          FT_Fixed     y_scale,
00174                          FT_Fixed     x_delta,
00175                          FT_Fixed     y_delta );
00176 
00177   /* snap a stem to one or two blue zones */
00178   FT_LOCAL( void )
00179   psh_blues_snap_stem( PSH_Blues      blues,
00180                        FT_Int         stem_top,
00181                        FT_Int         stem_bot,
00182                        PSH_Alignment  alignment );
00183   /* */
00184 
00185 #ifdef DEBUG_HINTER
00186   extern PSH_Globals  ps_debug_globals;
00187 #endif
00188 
00189 
00190 FT_END_HEADER
00191 
00192 
00193 #endif /* __PSHGLOB_H__ */
00194 
00195 
00196 /* END */

Generated on Sun May 27 2012 04:34:00 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.