Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygent1tables.h
Go to the documentation of this file.
00001 /***************************************************************************/ 00002 /* */ 00003 /* t1tables.h */ 00004 /* */ 00005 /* Basic Type 1/Type 2 tables definitions and interface (specification */ 00006 /* only). */ 00007 /* */ 00008 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ 00009 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 00010 /* */ 00011 /* This file is part of the FreeType project, and may only be used, */ 00012 /* modified, and distributed under the terms of the FreeType project */ 00013 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 00014 /* this file you indicate that you have read the license and */ 00015 /* understand and accept it fully. */ 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 /* <Section> */ 00040 /* type1_tables */ 00041 /* */ 00042 /* <Title> */ 00043 /* Type 1 Tables */ 00044 /* */ 00045 /* <Abstract> */ 00046 /* Type~1 (PostScript) specific font tables. */ 00047 /* */ 00048 /* <Description> */ 00049 /* This section contains the definition of Type 1-specific tables, */ 00050 /* including structures related to other PostScript font formats. */ 00051 /* */ 00052 /*************************************************************************/ 00053 00054 00055 /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ 00056 /* structures in order to support Multiple Master fonts. */ 00057 00058 00059 /*************************************************************************/ 00060 /* */ 00061 /* <Struct> */ 00062 /* PS_FontInfoRec */ 00063 /* */ 00064 /* <Description> */ 00065 /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ 00066 /* Note that for Multiple Master fonts, each instance has its own */ 00067 /* FontInfo dictionary. */ 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 /* <Struct> */ 00087 /* PS_FontInfo */ 00088 /* */ 00089 /* <Description> */ 00090 /* A handle to a @PS_FontInfoRec structure. */ 00091 /* */ 00092 typedef struct PS_FontInfoRec_* PS_FontInfo; 00093 00094 00095 /*************************************************************************/ 00096 /* */ 00097 /* <Struct> */ 00098 /* T1_FontInfo */ 00099 /* */ 00100 /* <Description> */ 00101 /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ 00102 /* kept to maintain source compatibility between various versions of */ 00103 /* FreeType. */ 00104 /* */ 00105 typedef PS_FontInfoRec T1_FontInfo; 00106 00107 00108 /*************************************************************************/ 00109 /* */ 00110 /* <Struct> */ 00111 /* PS_PrivateRec */ 00112 /* */ 00113 /* <Description> */ 00114 /* A structure used to model a Type~1 or Type~2 private dictionary. */ 00115 /* Note that for Multiple Master fonts, each instance has its own */ 00116 /* Private dictionary. */ 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]; /* including std width */ 00147 FT_Short snap_heights[13]; /* including std height */ 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 /* <Struct> */ 00162 /* PS_Private */ 00163 /* */ 00164 /* <Description> */ 00165 /* A handle to a @PS_PrivateRec structure. */ 00166 /* */ 00167 typedef struct PS_PrivateRec_* PS_Private; 00168 00169 00170 /*************************************************************************/ 00171 /* */ 00172 /* <Struct> */ 00173 /* T1_Private */ 00174 /* */ 00175 /* <Description> */ 00176 /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ 00177 /* kept to maintain source compatibility between various versions of */ 00178 /* FreeType. */ 00179 /* */ 00180 typedef PS_PrivateRec T1_Private; 00181 00182 00183 /*************************************************************************/ 00184 /* */ 00185 /* <Enum> */ 00186 /* T1_Blend_Flags */ 00187 /* */ 00188 /* <Description> */ 00189 /* A set of flags used to indicate which fields are present in a */ 00190 /* given blend dictionary (font info or private). Used to support */ 00191 /* Multiple Masters fonts. */ 00192 /* */ 00193 typedef enum T1_Blend_Flags_ 00194 { 00195 /*# required fields in a FontInfo blend dictionary */ 00196 T1_BLEND_UNDERLINE_POSITION = 0, 00197 T1_BLEND_UNDERLINE_THICKNESS, 00198 T1_BLEND_ITALIC_ANGLE, 00199 00200 /*# required fields in a Private blend dictionary */ 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 /*# never remove */ 00214 T1_BLEND_MAX 00215 00216 } T1_Blend_Flags; 00217 00218 /* */ 00219 00220 00221 /*# backwards compatible definitions */ 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 /* maximum number of Multiple Masters designs, as defined in the spec */ 00240 #define T1_MAX_MM_DESIGNS 16 00241 00242 /* maximum number of Multiple Masters axes, as defined in the spec */ 00243 #define T1_MAX_MM_AXIS 4 00244 00245 /* maximum number of elements in a design map */ 00246 #define T1_MAX_MM_MAP_POINTS 20 00247 00248 00249 /* this structure is used to store the BlendDesignMap entry for an axis */ 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 /* backwards-compatible definition */ 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 /* since 2.3.0 */ 00282 00283 /* undocumented, optional: the default design instance; */ 00284 /* corresponds to default_weight_vector -- */ 00285 /* num_default_design_vector == 0 means it is not present */ 00286 /* in the font and associated metrics files */ 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 /* backwards-compatible definition */ 00294 typedef PS_BlendRec T1_Blend; 00295 00296 00297 /*************************************************************************/ 00298 /* */ 00299 /* <Struct> */ 00300 /* CID_FaceDictRec */ 00301 /* */ 00302 /* <Description> */ 00303 /* A structure used to represent data in a CID top-level dictionary. */ 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 /* <Struct> */ 00329 /* CID_FaceDict */ 00330 /* */ 00331 /* <Description> */ 00332 /* A handle to a @CID_FaceDictRec structure. */ 00333 /* */ 00334 typedef struct CID_FaceDictRec_* CID_FaceDict; 00335 00336 /* */ 00337 00338 00339 /* backwards-compatible definition */ 00340 typedef CID_FaceDictRec CID_FontDict; 00341 00342 00343 /*************************************************************************/ 00344 /* */ 00345 /* <Struct> */ 00346 /* CID_FaceInfoRec */ 00347 /* */ 00348 /* <Description> */ 00349 /* A structure used to represent CID Face information. */ 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 /* <Struct> */ 00384 /* CID_FaceInfo */ 00385 /* */ 00386 /* <Description> */ 00387 /* A handle to a @CID_FaceInfoRec structure. */ 00388 /* */ 00389 typedef struct CID_FaceInfoRec_* CID_FaceInfo; 00390 00391 00392 /*************************************************************************/ 00393 /* */ 00394 /* <Struct> */ 00395 /* CID_Info */ 00396 /* */ 00397 /* <Description> */ 00398 /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ 00399 /* kept to maintain source compatibility between various versions of */ 00400 /* FreeType. */ 00401 /* */ 00402 typedef CID_FaceInfoRec CID_Info; 00403 00404 00405 /************************************************************************ 00406 * 00407 * @function: 00408 * FT_Has_PS_Glyph_Names 00409 * 00410 * @description: 00411 * Return true if a given face provides reliable PostScript glyph 00412 * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, 00413 * except that certain fonts (mostly TrueType) contain incorrect 00414 * glyph name tables. 00415 * 00416 * When this function returns true, the caller is sure that the glyph 00417 * names returned by @FT_Get_Glyph_Name are reliable. 00418 * 00419 * @input: 00420 * face :: 00421 * face handle 00422 * 00423 * @return: 00424 * Boolean. True if glyph names are reliable. 00425 * 00426 */ 00427 FT_EXPORT( FT_Int ) 00428 FT_Has_PS_Glyph_Names( FT_Face face ); 00429 00430 00431 /************************************************************************ 00432 * 00433 * @function: 00434 * FT_Get_PS_Font_Info 00435 * 00436 * @description: 00437 * Retrieve the @PS_FontInfoRec structure corresponding to a given 00438 * PostScript font. 00439 * 00440 * @input: 00441 * face :: 00442 * PostScript face handle. 00443 * 00444 * @output: 00445 * afont_info :: 00446 * Output font info structure pointer. 00447 * 00448 * @return: 00449 * FreeType error code. 0~means success. 00450 * 00451 * @note: 00452 * The string pointers within the font info structure are owned by 00453 * the face and don't need to be freed by the caller. 00454 * 00455 * If the font's format is not PostScript-based, this function will 00456 * return the `FT_Err_Invalid_Argument' error code. 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 * @function: 00467 * FT_Get_PS_Font_Private 00468 * 00469 * @description: 00470 * Retrieve the @PS_PrivateRec structure corresponding to a given 00471 * PostScript font. 00472 * 00473 * @input: 00474 * face :: 00475 * PostScript face handle. 00476 * 00477 * @output: 00478 * afont_private :: 00479 * Output private dictionary structure pointer. 00480 * 00481 * @return: 00482 * FreeType error code. 0~means success. 00483 * 00484 * @note: 00485 * The string pointers within the @PS_PrivateRec structure are owned by 00486 * the face and don't need to be freed by the caller. 00487 * 00488 * If the font's format is not PostScript-based, this function returns 00489 * the `FT_Err_Invalid_Argument' error code. 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 /* __T1TABLES_H__ */ 00502 00503 00504 /* END */ Generated on Sun May 27 2012 04:33:32 for ReactOS by
1.7.6.1
|