Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenpfrtypes.h
Go to the documentation of this file.
00001 /***************************************************************************/ 00002 /* */ 00003 /* pfrtypes.h */ 00004 /* */ 00005 /* FreeType PFR data structures (specification only). */ 00006 /* */ 00007 /* Copyright 2002, 2003, 2005, 2007 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 __PFRTYPES_H__ 00020 #define __PFRTYPES_H__ 00021 00022 #include <ft2build.h> 00023 #include FT_INTERNAL_OBJECTS_H 00024 00025 FT_BEGIN_HEADER 00026 00027 /************************************************************************/ 00028 00029 /* the PFR Header structure */ 00030 typedef struct PFR_HeaderRec_ 00031 { 00032 FT_UInt32 signature; 00033 FT_UInt version; 00034 FT_UInt signature2; 00035 FT_UInt header_size; 00036 00037 FT_UInt log_dir_size; 00038 FT_UInt log_dir_offset; 00039 00040 FT_UInt log_font_max_size; 00041 FT_UInt32 log_font_section_size; 00042 FT_UInt32 log_font_section_offset; 00043 00044 FT_UInt32 phy_font_max_size; 00045 FT_UInt32 phy_font_section_size; 00046 FT_UInt32 phy_font_section_offset; 00047 00048 FT_UInt gps_max_size; 00049 FT_UInt32 gps_section_size; 00050 FT_UInt32 gps_section_offset; 00051 00052 FT_UInt max_blue_values; 00053 FT_UInt max_x_orus; 00054 FT_UInt max_y_orus; 00055 00056 FT_UInt phy_font_max_size_high; 00057 FT_UInt color_flags; 00058 00059 FT_UInt32 bct_max_size; 00060 FT_UInt32 bct_set_max_size; 00061 FT_UInt32 phy_bct_set_max_size; 00062 00063 FT_UInt num_phy_fonts; 00064 FT_UInt max_vert_stem_snap; 00065 FT_UInt max_horz_stem_snap; 00066 FT_UInt max_chars; 00067 00068 } PFR_HeaderRec, *PFR_Header; 00069 00070 00071 /* used in `color_flags' field of the PFR_Header */ 00072 typedef enum PFR_HeaderFlags_ 00073 { 00074 PFR_FLAG_BLACK_PIXEL = 1, 00075 PFR_FLAG_INVERT_BITMAP = 2 00076 00077 } PFR_HeaderFlags; 00078 00079 00080 /************************************************************************/ 00081 00082 typedef struct PFR_LogFontRec_ 00083 { 00084 FT_UInt32 size; 00085 FT_UInt32 offset; 00086 00087 FT_Int32 matrix[4]; 00088 FT_UInt stroke_flags; 00089 FT_Int stroke_thickness; 00090 FT_Int bold_thickness; 00091 FT_Int32 miter_limit; 00092 00093 FT_UInt32 phys_size; 00094 FT_UInt32 phys_offset; 00095 00096 } PFR_LogFontRec, *PFR_LogFont; 00097 00098 00099 typedef enum PFR_LogFlags_ 00100 { 00101 PFR_LOG_EXTRA_ITEMS = 0x40, 00102 PFR_LOG_2BYTE_BOLD = 0x20, 00103 PFR_LOG_BOLD = 0x10, 00104 PFR_LOG_2BYTE_STROKE = 8, 00105 PFR_LOG_STROKE = 4, 00106 PFR_LINE_JOIN_MASK = 3 00107 00108 } PFR_LogFlags; 00109 00110 00111 typedef enum PFR_LineJoinFlags_ 00112 { 00113 PFR_LINE_JOIN_MITER = 0, 00114 PFR_LINE_JOIN_ROUND = 1, 00115 PFR_LINE_JOIN_BEVEL = 2 00116 00117 } PFR_LineJoinFlags; 00118 00119 00120 /************************************************************************/ 00121 00122 typedef enum PFR_BitmapFlags_ 00123 { 00124 PFR_BITMAP_3BYTE_OFFSET = 4, 00125 PFR_BITMAP_2BYTE_SIZE = 2, 00126 PFR_BITMAP_2BYTE_CHARCODE = 1 00127 00128 } PFR_BitmapFlags; 00129 00130 00131 typedef struct PFR_BitmapCharRec_ 00132 { 00133 FT_UInt char_code; 00134 FT_UInt gps_size; 00135 FT_UInt32 gps_offset; 00136 00137 } PFR_BitmapCharRec, *PFR_BitmapChar; 00138 00139 00140 typedef enum PFR_StrikeFlags_ 00141 { 00142 PFR_STRIKE_2BYTE_COUNT = 0x10, 00143 PFR_STRIKE_3BYTE_OFFSET = 0x08, 00144 PFR_STRIKE_3BYTE_SIZE = 0x04, 00145 PFR_STRIKE_2BYTE_YPPM = 0x02, 00146 PFR_STRIKE_2BYTE_XPPM = 0x01 00147 00148 } PFR_StrikeFlags; 00149 00150 00151 typedef struct PFR_StrikeRec_ 00152 { 00153 FT_UInt x_ppm; 00154 FT_UInt y_ppm; 00155 FT_UInt flags; 00156 00157 FT_UInt32 gps_size; 00158 FT_UInt32 gps_offset; 00159 00160 FT_UInt32 bct_size; 00161 FT_UInt32 bct_offset; 00162 00163 /* optional */ 00164 FT_UInt num_bitmaps; 00165 PFR_BitmapChar bitmaps; 00166 00167 } PFR_StrikeRec, *PFR_Strike; 00168 00169 00170 /************************************************************************/ 00171 00172 typedef struct PFR_CharRec_ 00173 { 00174 FT_UInt char_code; 00175 FT_Int advance; 00176 FT_UInt gps_size; 00177 FT_UInt32 gps_offset; 00178 00179 } PFR_CharRec, *PFR_Char; 00180 00181 00182 /************************************************************************/ 00183 00184 typedef struct PFR_DimensionRec_ 00185 { 00186 FT_UInt standard; 00187 FT_UInt num_stem_snaps; 00188 FT_Int* stem_snaps; 00189 00190 } PFR_DimensionRec, *PFR_Dimension; 00191 00192 /************************************************************************/ 00193 00194 typedef struct PFR_KernItemRec_* PFR_KernItem; 00195 00196 typedef struct PFR_KernItemRec_ 00197 { 00198 PFR_KernItem next; 00199 FT_Byte pair_count; 00200 FT_Byte flags; 00201 FT_Short base_adj; 00202 FT_UInt pair_size; 00203 FT_Offset offset; 00204 FT_UInt32 pair1; 00205 FT_UInt32 pair2; 00206 00207 } PFR_KernItemRec; 00208 00209 00210 #define PFR_KERN_INDEX( g1, g2 ) \ 00211 ( ( (FT_UInt32)(g1) << 16 ) | (FT_UInt16)(g2) ) 00212 00213 #define PFR_KERN_PAIR_INDEX( pair ) \ 00214 PFR_KERN_INDEX( (pair)->glyph1, (pair)->glyph2 ) 00215 00216 #define PFR_NEXT_KPAIR( p ) ( p += 2, \ 00217 ( (FT_UInt32)p[-2] << 16 ) | p[-1] ) 00218 00219 00220 /************************************************************************/ 00221 00222 typedef struct PFR_PhyFontRec_ 00223 { 00224 FT_Memory memory; 00225 FT_UInt32 offset; 00226 00227 FT_UInt font_ref_number; 00228 FT_UInt outline_resolution; 00229 FT_UInt metrics_resolution; 00230 FT_BBox bbox; 00231 FT_UInt flags; 00232 FT_UInt standard_advance; 00233 00234 FT_Int ascent; /* optional, bbox.yMax if not present */ 00235 FT_Int descent; /* optional, bbox.yMin if not present */ 00236 FT_Int leading; /* optional, 0 if not present */ 00237 00238 PFR_DimensionRec horizontal; 00239 PFR_DimensionRec vertical; 00240 00241 FT_String* font_id; 00242 FT_String* family_name; 00243 FT_String* style_name; 00244 00245 FT_UInt num_strikes; 00246 FT_UInt max_strikes; 00247 PFR_StrikeRec* strikes; 00248 00249 FT_UInt num_blue_values; 00250 FT_Int *blue_values; 00251 FT_UInt blue_fuzz; 00252 FT_UInt blue_scale; 00253 00254 FT_UInt num_chars; 00255 FT_Offset chars_offset; 00256 PFR_Char chars; 00257 00258 FT_UInt num_kern_pairs; 00259 PFR_KernItem kern_items; 00260 PFR_KernItem* kern_items_tail; 00261 00262 /* not part of the spec, but used during load */ 00263 FT_Long bct_offset; 00264 FT_Byte* cursor; 00265 00266 } PFR_PhyFontRec, *PFR_PhyFont; 00267 00268 00269 typedef enum PFR_PhyFlags_ 00270 { 00271 PFR_PHY_EXTRA_ITEMS = 0x80, 00272 PFR_PHY_3BYTE_GPS_OFFSET = 0x20, 00273 PFR_PHY_2BYTE_GPS_SIZE = 0x10, 00274 PFR_PHY_ASCII_CODE = 0x08, 00275 PFR_PHY_PROPORTIONAL = 0x04, 00276 PFR_PHY_2BYTE_CHARCODE = 0x02, 00277 PFR_PHY_VERTICAL = 0x01 00278 00279 } PFR_PhyFlags; 00280 00281 00282 typedef enum PFR_KernFlags_ 00283 { 00284 PFR_KERN_2BYTE_CHAR = 0x01, 00285 PFR_KERN_2BYTE_ADJ = 0x02 00286 00287 } PFR_KernFlags; 00288 00289 00290 /************************************************************************/ 00291 00292 typedef enum PFR_GlyphFlags_ 00293 { 00294 PFR_GLYPH_IS_COMPOUND = 0x80, 00295 PFR_GLYPH_EXTRA_ITEMS = 0x08, 00296 PFR_GLYPH_1BYTE_XYCOUNT = 0x04, 00297 PFR_GLYPH_XCOUNT = 0x02, 00298 PFR_GLYPH_YCOUNT = 0x01 00299 00300 } PFR_GlyphFlags; 00301 00302 00303 /* controlled coordinate */ 00304 typedef struct PFR_CoordRec_ 00305 { 00306 FT_UInt org; 00307 FT_UInt cur; 00308 00309 } PFR_CoordRec, *PFR_Coord; 00310 00311 00312 typedef struct PFR_SubGlyphRec_ 00313 { 00314 FT_Fixed x_scale; 00315 FT_Fixed y_scale; 00316 FT_Int x_delta; 00317 FT_Int y_delta; 00318 FT_UInt32 gps_offset; 00319 FT_UInt gps_size; 00320 00321 } PFR_SubGlyphRec, *PFR_SubGlyph; 00322 00323 00324 typedef enum PFR_SubgGlyphFlags_ 00325 { 00326 PFR_SUBGLYPH_3BYTE_OFFSET = 0x80, 00327 PFR_SUBGLYPH_2BYTE_SIZE = 0x40, 00328 PFR_SUBGLYPH_YSCALE = 0x20, 00329 PFR_SUBGLYPH_XSCALE = 0x10 00330 00331 } PFR_SubGlyphFlags; 00332 00333 00334 typedef struct PFR_GlyphRec_ 00335 { 00336 FT_Byte format; 00337 00338 #if 0 00339 FT_UInt num_x_control; 00340 FT_UInt num_y_control; 00341 #endif 00342 FT_UInt max_xy_control; 00343 FT_Pos* x_control; 00344 FT_Pos* y_control; 00345 00346 00347 FT_UInt num_subs; 00348 FT_UInt max_subs; 00349 PFR_SubGlyphRec* subs; 00350 00351 FT_GlyphLoader loader; 00352 FT_Bool path_begun; 00353 00354 } PFR_GlyphRec, *PFR_Glyph; 00355 00356 00357 FT_END_HEADER 00358 00359 #endif /* __PFRTYPES_H__ */ 00360 00361 00362 /* END */ Generated on Mon May 28 2012 04:33:45 for ReactOS by
1.7.6.1
|