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

cfftypes.h
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  cfftypes.h                                                             */
00004 /*                                                                         */
00005 /*    Basic OpenType/CFF type definitions and interface (specification     */
00006 /*    only).                                                               */
00007 /*                                                                         */
00008 /*  Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2010 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 __CFFTYPES_H__
00021 #define __CFFTYPES_H__
00022 
00023 
00024 #include <ft2build.h>
00025 #include FT_FREETYPE_H
00026 #include FT_TYPE1_TABLES_H
00027 #include FT_INTERNAL_SERVICE_H
00028 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
00029 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
00030 
00031 
00032 FT_BEGIN_HEADER
00033 
00034 
00035   /*************************************************************************/
00036   /*                                                                       */
00037   /* <Struct>                                                              */
00038   /*    CFF_IndexRec                                                       */
00039   /*                                                                       */
00040   /* <Description>                                                         */
00041   /*    A structure used to model a CFF Index table.                       */
00042   /*                                                                       */
00043   /* <Fields>                                                              */
00044   /*    stream      :: The source input stream.                            */
00045   /*                                                                       */
00046   /*    start       :: The position of the first index byte in the         */
00047   /*                   input stream.                                       */
00048   /*                                                                       */
00049   /*    count       :: The number of elements in the index.                */
00050   /*                                                                       */
00051   /*    off_size    :: The size in bytes of object offsets in index.       */
00052   /*                                                                       */
00053   /*    data_offset :: The position of first data byte in the index's      */
00054   /*                   bytes.                                              */
00055   /*                                                                       */
00056   /*    data_size   :: The size of the data table in this index.           */
00057   /*                                                                       */
00058   /*    offsets     :: A table of element offsets in the index.  Must be   */
00059   /*                   loaded explicitly.                                  */
00060   /*                                                                       */
00061   /*    bytes       :: If the index is loaded in memory, its bytes.        */
00062   /*                                                                       */
00063   typedef struct  CFF_IndexRec_
00064   {
00065     FT_Stream  stream;
00066     FT_ULong   start;
00067     FT_UInt    count;
00068     FT_Byte    off_size;
00069     FT_ULong   data_offset;
00070     FT_ULong   data_size;
00071 
00072     FT_ULong*  offsets;
00073     FT_Byte*   bytes;
00074 
00075   } CFF_IndexRec, *CFF_Index;
00076 
00077 
00078   typedef struct  CFF_EncodingRec_
00079   {
00080     FT_UInt     format;
00081     FT_ULong    offset;
00082 
00083     FT_UInt     count;
00084     FT_UShort   sids [256];  /* avoid dynamic allocations */
00085     FT_UShort   codes[256];
00086 
00087   } CFF_EncodingRec, *CFF_Encoding;
00088 
00089 
00090   typedef struct  CFF_CharsetRec_
00091   {
00092 
00093     FT_UInt     format;
00094     FT_ULong    offset;
00095 
00096     FT_UShort*  sids;
00097     FT_UShort*  cids;       /* the inverse mapping of `sids'; only needed */
00098                             /* for CID-keyed fonts                        */
00099     FT_UInt     max_cid;
00100     FT_UInt     num_glyphs;
00101 
00102   } CFF_CharsetRec, *CFF_Charset;
00103 
00104 
00105   typedef struct  CFF_FontRecDictRec_
00106   {
00107     FT_UInt    version;
00108     FT_UInt    notice;
00109     FT_UInt    copyright;
00110     FT_UInt    full_name;
00111     FT_UInt    family_name;
00112     FT_UInt    weight;
00113     FT_Bool    is_fixed_pitch;
00114     FT_Fixed   italic_angle;
00115     FT_Fixed   underline_position;
00116     FT_Fixed   underline_thickness;
00117     FT_Int     paint_type;
00118     FT_Int     charstring_type;
00119     FT_Matrix  font_matrix;
00120     FT_ULong   units_per_em;  /* temporarily used as scaling value also */
00121     FT_Vector  font_offset;
00122     FT_ULong   unique_id;
00123     FT_BBox    font_bbox;
00124     FT_Pos     stroke_width;
00125     FT_ULong   charset_offset;
00126     FT_ULong   encoding_offset;
00127     FT_ULong   charstrings_offset;
00128     FT_ULong   private_offset;
00129     FT_ULong   private_size;
00130     FT_Long    synthetic_base;
00131     FT_UInt    embedded_postscript;
00132 
00133     /* these should only be used for the top-level font dictionary */
00134     FT_UInt    cid_registry;
00135     FT_UInt    cid_ordering;
00136     FT_Long    cid_supplement;
00137 
00138     FT_Long    cid_font_version;
00139     FT_Long    cid_font_revision;
00140     FT_Long    cid_font_type;
00141     FT_ULong   cid_count;
00142     FT_ULong   cid_uid_base;
00143     FT_ULong   cid_fd_array_offset;
00144     FT_ULong   cid_fd_select_offset;
00145     FT_UInt    cid_font_name;
00146 
00147   } CFF_FontRecDictRec, *CFF_FontRecDict;
00148 
00149 
00150   typedef struct  CFF_PrivateRec_
00151   {
00152     FT_Byte   num_blue_values;
00153     FT_Byte   num_other_blues;
00154     FT_Byte   num_family_blues;
00155     FT_Byte   num_family_other_blues;
00156 
00157     FT_Pos    blue_values[14];
00158     FT_Pos    other_blues[10];
00159     FT_Pos    family_blues[14];
00160     FT_Pos    family_other_blues[10];
00161 
00162     FT_Fixed  blue_scale;
00163     FT_Pos    blue_shift;
00164     FT_Pos    blue_fuzz;
00165     FT_Pos    standard_width;
00166     FT_Pos    standard_height;
00167 
00168     FT_Byte   num_snap_widths;
00169     FT_Byte   num_snap_heights;
00170     FT_Pos    snap_widths[13];
00171     FT_Pos    snap_heights[13];
00172     FT_Bool   force_bold;
00173     FT_Fixed  force_bold_threshold;
00174     FT_Int    lenIV;
00175     FT_Int    language_group;
00176     FT_Fixed  expansion_factor;
00177     FT_Long   initial_random_seed;
00178     FT_ULong  local_subrs_offset;
00179     FT_Pos    default_width;
00180     FT_Pos    nominal_width;
00181 
00182   } CFF_PrivateRec, *CFF_Private;
00183 
00184 
00185   typedef struct  CFF_FDSelectRec_
00186   {
00187     FT_Byte   format;
00188     FT_UInt   range_count;
00189 
00190     /* that's the table, taken from the file `as is' */
00191     FT_Byte*  data;
00192     FT_UInt   data_size;
00193 
00194     /* small cache for format 3 only */
00195     FT_UInt   cache_first;
00196     FT_UInt   cache_count;
00197     FT_Byte   cache_fd;
00198 
00199   } CFF_FDSelectRec, *CFF_FDSelect;
00200 
00201 
00202   /* A SubFont packs a font dict and a private dict together.  They are */
00203   /* needed to support CID-keyed CFF fonts.                             */
00204   typedef struct  CFF_SubFontRec_
00205   {
00206     CFF_FontRecDictRec  font_dict;
00207     CFF_PrivateRec      private_dict;
00208 
00209     CFF_IndexRec        local_subrs_index;
00210     FT_Byte**           local_subrs; /* array of pointers into Local Subrs INDEX data */
00211 
00212   } CFF_SubFontRec, *CFF_SubFont;
00213 
00214 
00215   /* maximum number of sub-fonts in a CID-keyed file */
00216 #define CFF_MAX_CID_FONTS  32
00217 
00218 
00219   typedef struct  CFF_FontRec_
00220   {
00221     FT_Stream        stream;
00222     FT_Memory        memory;
00223     FT_UInt          num_faces;
00224     FT_UInt          num_glyphs;
00225 
00226     FT_Byte          version_major;
00227     FT_Byte          version_minor;
00228     FT_Byte          header_size;
00229     FT_Byte          absolute_offsize;
00230 
00231 
00232     CFF_IndexRec     name_index;
00233     CFF_IndexRec     top_dict_index;
00234     CFF_IndexRec     global_subrs_index;
00235 
00236     CFF_EncodingRec  encoding;
00237     CFF_CharsetRec   charset;
00238 
00239     CFF_IndexRec     charstrings_index;
00240     CFF_IndexRec     font_dict_index;
00241     CFF_IndexRec     private_index;
00242     CFF_IndexRec     local_subrs_index;
00243 
00244     FT_String*       font_name;
00245 
00246     /* array of pointers into Global Subrs INDEX data */
00247     FT_Byte**        global_subrs;
00248 
00249     /* array of pointers into String INDEX data stored at string_pool */
00250     FT_UInt          num_strings;
00251     FT_Byte**        strings;
00252     FT_Byte*         string_pool;
00253 
00254     CFF_SubFontRec   top_font;
00255     FT_UInt          num_subfonts;
00256     CFF_SubFont      subfonts[CFF_MAX_CID_FONTS];
00257 
00258     CFF_FDSelectRec  fd_select;
00259 
00260     /* interface to PostScript hinter */
00261     PSHinter_Service  pshinter;
00262 
00263     /* interface to Postscript Names service */
00264     FT_Service_PsCMaps  psnames;
00265 
00266     /* since version 2.3.0 */
00267     PS_FontInfoRec*  font_info;   /* font info dictionary */
00268 
00269     /* since version 2.3.6 */
00270     FT_String*       registry;
00271     FT_String*       ordering;
00272       
00273   } CFF_FontRec, *CFF_Font;
00274 
00275 
00276 FT_END_HEADER
00277 
00278 #endif /* __CFFTYPES_H__ */
00279 
00280 
00281 /* END */

Generated on Sun May 27 2012 04:33:50 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.