00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #define PS_GLOBALS_MAX_BLUE_ZONES 16
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 #define PS_GLOBALS_MAX_STD_WIDTHS 16
00061
00062
00063
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
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
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
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
00133
00134
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
00164
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
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
00194
00195
00196