00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef __T1TABLES_H__
00021 #define __T1TABLES_H__
00022 
00023 
00024 #include <ft2build.h>
00025 #include FT_FREETYPE_H
00026 
00027 #ifdef FREETYPE_H
00028 #error "freetype.h of FreeType 1 has been loaded!"
00029 #error "Please fix the directory search order for header files"
00030 #error "so that freetype.h of FreeType 2 is found first."
00031 #endif
00032 
00033 
00034 FT_BEGIN_HEADER
00035 
00036 
00037   
00038   
00039   
00040   
00041   
00042   
00043   
00044   
00045   
00046   
00047   
00048   
00049   
00050   
00051   
00052   
00053 
00054 
00055   
00056   
00057 
00058 
00059   
00060   
00061   
00062   
00063   
00064   
00065   
00066   
00067   
00068   
00069   typedef struct  PS_FontInfoRec_
00070   {
00071     FT_String*  version;
00072     FT_String*  notice;
00073     FT_String*  full_name;
00074     FT_String*  family_name;
00075     FT_String*  weight;
00076     FT_Long     italic_angle;
00077     FT_Bool     is_fixed_pitch;
00078     FT_Short    underline_position;
00079     FT_UShort   underline_thickness;
00080 
00081   } PS_FontInfoRec;
00082 
00083 
00084   
00085   
00086   
00087   
00088   
00089   
00090   
00091   
00092   typedef struct PS_FontInfoRec_*  PS_FontInfo;
00093 
00094 
00095   
00096   
00097   
00098   
00099   
00100   
00101   
00102   
00103   
00104   
00105   typedef PS_FontInfoRec  T1_FontInfo;
00106 
00107 
00108   
00109   
00110   
00111   
00112   
00113   
00114   
00115   
00116   
00117   
00118   typedef struct  PS_PrivateRec_
00119   {
00120     FT_Int     unique_id;
00121     FT_Int     lenIV;
00122 
00123     FT_Byte    num_blue_values;
00124     FT_Byte    num_other_blues;
00125     FT_Byte    num_family_blues;
00126     FT_Byte    num_family_other_blues;
00127 
00128     FT_Short   blue_values[14];
00129     FT_Short   other_blues[10];
00130 
00131     FT_Short   family_blues      [14];
00132     FT_Short   family_other_blues[10];
00133 
00134     FT_Fixed   blue_scale;
00135     FT_Int     blue_shift;
00136     FT_Int     blue_fuzz;
00137 
00138     FT_UShort  standard_width[1];
00139     FT_UShort  standard_height[1];
00140 
00141     FT_Byte    num_snap_widths;
00142     FT_Byte    num_snap_heights;
00143     FT_Bool    force_bold;
00144     FT_Bool    round_stem_up;
00145 
00146     FT_Short   snap_widths [13];  
00147     FT_Short   snap_heights[13];  
00148 
00149     FT_Fixed   expansion_factor;
00150 
00151     FT_Long    language_group;
00152     FT_Long    password;
00153 
00154     FT_Short   min_feature[2];
00155 
00156   } PS_PrivateRec;
00157 
00158 
00159   
00160   
00161   
00162   
00163   
00164   
00165   
00166   
00167   typedef struct PS_PrivateRec_*  PS_Private;
00168 
00169 
00170   
00171   
00172   
00173   
00174   
00175   
00176   
00177   
00178   
00179   
00180   typedef PS_PrivateRec  T1_Private;
00181 
00182 
00183   
00184   
00185   
00186   
00187   
00188   
00189   
00190   
00191   
00192   
00193   typedef enum  T1_Blend_Flags_
00194   {
00195     
00196     T1_BLEND_UNDERLINE_POSITION = 0,
00197     T1_BLEND_UNDERLINE_THICKNESS,
00198     T1_BLEND_ITALIC_ANGLE,
00199 
00200     
00201     T1_BLEND_BLUE_VALUES,
00202     T1_BLEND_OTHER_BLUES,
00203     T1_BLEND_STANDARD_WIDTH,
00204     T1_BLEND_STANDARD_HEIGHT,
00205     T1_BLEND_STEM_SNAP_WIDTHS,
00206     T1_BLEND_STEM_SNAP_HEIGHTS,
00207     T1_BLEND_BLUE_SCALE,
00208     T1_BLEND_BLUE_SHIFT,
00209     T1_BLEND_FAMILY_BLUES,
00210     T1_BLEND_FAMILY_OTHER_BLUES,
00211     T1_BLEND_FORCE_BOLD,
00212 
00213     
00214     T1_BLEND_MAX
00215 
00216   } T1_Blend_Flags;
00217 
00218   
00219 
00220 
00221   
00222 #define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION
00223 #define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS
00224 #define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE
00225 #define t1_blend_blue_values          T1_BLEND_BLUE_VALUES
00226 #define t1_blend_other_blues          T1_BLEND_OTHER_BLUES
00227 #define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH
00228 #define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT
00229 #define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS
00230 #define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS
00231 #define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE
00232 #define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT
00233 #define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES
00234 #define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES
00235 #define t1_blend_force_bold           T1_BLEND_FORCE_BOLD
00236 #define t1_blend_max                  T1_BLEND_MAX
00237 
00238 
00239   
00240 #define T1_MAX_MM_DESIGNS     16
00241 
00242   
00243 #define T1_MAX_MM_AXIS        4
00244 
00245   
00246 #define T1_MAX_MM_MAP_POINTS  20
00247 
00248 
00249   
00250   typedef struct  PS_DesignMap_
00251   {
00252     FT_Byte    num_points;
00253     FT_Long*   design_points;
00254     FT_Fixed*  blend_points;
00255 
00256   } PS_DesignMapRec, *PS_DesignMap;
00257 
00258   
00259   typedef PS_DesignMapRec  T1_DesignMap;
00260 
00261 
00262   typedef struct  PS_BlendRec_
00263   {
00264     FT_UInt          num_designs;
00265     FT_UInt          num_axis;
00266 
00267     FT_String*       axis_names[T1_MAX_MM_AXIS];
00268     FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
00269     PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];
00270 
00271     FT_Fixed*        weight_vector;
00272     FT_Fixed*        default_weight_vector;
00273 
00274     PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
00275     PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];
00276 
00277     FT_ULong         blend_bitflags;
00278 
00279     FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];
00280 
00281     
00282 
00283     
00284     
00285     
00286     
00287     FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];
00288     FT_UInt          num_default_design_vector;
00289 
00290   } PS_BlendRec, *PS_Blend;
00291 
00292 
00293   
00294   typedef PS_BlendRec  T1_Blend;
00295 
00296 
00297   
00298   
00299   
00300   
00301   
00302   
00303   
00304   
00305   typedef struct  CID_FaceDictRec_
00306   {
00307     PS_PrivateRec  private_dict;
00308 
00309     FT_UInt        len_buildchar;
00310     FT_Fixed       forcebold_threshold;
00311     FT_Pos         stroke_width;
00312     FT_Fixed       expansion_factor;
00313 
00314     FT_Byte        paint_type;
00315     FT_Byte        font_type;
00316     FT_Matrix      font_matrix;
00317     FT_Vector      font_offset;
00318 
00319     FT_UInt        num_subrs;
00320     FT_ULong       subrmap_offset;
00321     FT_Int         sd_bytes;
00322 
00323   } CID_FaceDictRec;
00324 
00325 
00326   
00327   
00328   
00329   
00330   
00331   
00332   
00333   
00334   typedef struct CID_FaceDictRec_*  CID_FaceDict;
00335 
00336   
00337 
00338 
00339   
00340   typedef CID_FaceDictRec  CID_FontDict;
00341 
00342 
00343   
00344   
00345   
00346   
00347   
00348   
00349   
00350   
00351   typedef struct  CID_FaceInfoRec_
00352   {
00353     FT_String*      cid_font_name;
00354     FT_Fixed        cid_version;
00355     FT_Int          cid_font_type;
00356 
00357     FT_String*      registry;
00358     FT_String*      ordering;
00359     FT_Int          supplement;
00360 
00361     PS_FontInfoRec  font_info;
00362     FT_BBox         font_bbox;
00363     FT_ULong        uid_base;
00364 
00365     FT_Int          num_xuid;
00366     FT_ULong        xuid[16];
00367 
00368     FT_ULong        cidmap_offset;
00369     FT_Int          fd_bytes;
00370     FT_Int          gd_bytes;
00371     FT_ULong        cid_count;
00372 
00373     FT_Int          num_dicts;
00374     CID_FaceDict    font_dicts;
00375 
00376     FT_ULong        data_offset;
00377 
00378   } CID_FaceInfoRec;
00379 
00380 
00381   
00382   
00383   
00384   
00385   
00386   
00387   
00388   
00389   typedef struct CID_FaceInfoRec_*  CID_FaceInfo;
00390 
00391 
00392   
00393   
00394   
00395   
00396   
00397   
00398   
00399   
00400   
00401   
00402   typedef CID_FaceInfoRec  CID_Info;
00403 
00404 
00405   
00406 
00407 
00408 
00409 
00410 
00411 
00412 
00413 
00414 
00415 
00416 
00417 
00418 
00419 
00420 
00421 
00422 
00423 
00424 
00425 
00426 
00427   FT_EXPORT( FT_Int )
00428   FT_Has_PS_Glyph_Names( FT_Face  face );
00429 
00430 
00431   
00432 
00433 
00434 
00435 
00436 
00437 
00438 
00439 
00440 
00441 
00442 
00443 
00444 
00445 
00446 
00447 
00448 
00449 
00450 
00451 
00452 
00453 
00454 
00455 
00456 
00457 
00458 
00459   FT_EXPORT( FT_Error )
00460   FT_Get_PS_Font_Info( FT_Face      face,
00461                        PS_FontInfo  afont_info );
00462 
00463 
00464   
00465 
00466 
00467 
00468 
00469 
00470 
00471 
00472 
00473 
00474 
00475 
00476 
00477 
00478 
00479 
00480 
00481 
00482 
00483 
00484 
00485 
00486 
00487 
00488 
00489 
00490 
00491 
00492   FT_EXPORT( FT_Error )
00493   FT_Get_PS_Font_Private( FT_Face     face,
00494                           PS_Private  afont_private );
00495 
00496   
00497 
00498 
00499 FT_END_HEADER
00500 
00501 #endif 
00502 
00503 
00504