winfnt.h

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  winfnt.h                                                               */
00004 /*                                                                         */
00005 /*    FreeType font driver for Windows FNT/FON files                       */
00006 /*                                                                         */
00007 /*  Copyright 1996-2001, 2002, 2003, 2004, 2007 by                         */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*  Copyright 2007 Dmitry Timoshkov for Codeweavers                        */
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 __WINFNT_H__
00021 #define __WINFNT_H__
00022 
00023 
00024 #include <ft2build.h>
00025 #include FT_WINFONTS_H
00026 #include FT_INTERNAL_DRIVER_H
00027 
00028 
00029 FT_BEGIN_HEADER
00030 
00031 #ifdef FT_CONFIG_OPTION_PIC
00032 #error "this module does not support PIC yet"
00033 #endif 
00034 
00035   typedef struct  WinMZ_HeaderRec_
00036   {
00037     FT_UShort  magic;
00038     /* skipped content */
00039     FT_UShort  lfanew;
00040 
00041   } WinMZ_HeaderRec;
00042 
00043 
00044   typedef struct  WinNE_HeaderRec_
00045   {
00046     FT_UShort  magic;
00047     /* skipped content */
00048     FT_UShort  resource_tab_offset;
00049     FT_UShort  rname_tab_offset;
00050 
00051   } WinNE_HeaderRec;
00052 
00053 
00054   typedef struct  WinPE32_HeaderRec_
00055   {
00056     FT_ULong   magic;
00057     FT_UShort  machine;
00058     FT_UShort  number_of_sections;
00059     /* skipped content */
00060     FT_UShort  size_of_optional_header;
00061     /* skipped content */
00062     FT_UShort  magic32;
00063     /* skipped content */
00064     FT_ULong   rsrc_virtual_address;
00065     FT_ULong   rsrc_size;
00066     /* skipped content */
00067 
00068   } WinPE32_HeaderRec;
00069 
00070 
00071   typedef struct  WinPE32_SectionRec_
00072   {
00073     FT_Byte   name[8];
00074     /* skipped content */
00075     FT_ULong  virtual_address;
00076     FT_ULong  size_of_raw_data;
00077     FT_ULong  pointer_to_raw_data;
00078     /* skipped content */
00079 
00080   } WinPE32_SectionRec;
00081 
00082 
00083   typedef struct  WinPE_RsrcDirRec_
00084   {
00085     FT_ULong   characteristics;
00086     FT_ULong   time_date_stamp;
00087     FT_UShort  major_version;
00088     FT_UShort  minor_version;
00089     FT_UShort  number_of_named_entries;
00090     FT_UShort  number_of_id_entries;
00091 
00092   } WinPE_RsrcDirRec;
00093 
00094 
00095   typedef struct  WinPE_RsrcDirEntryRec_
00096   {
00097     FT_ULong  name;
00098     FT_ULong  offset;
00099 
00100   } WinPE_RsrcDirEntryRec;
00101 
00102 
00103   typedef struct  WinPE_RsrcDataEntryRec_
00104   {
00105     FT_ULong  offset_to_data;
00106     FT_ULong  size;
00107     FT_ULong  code_page;
00108     FT_ULong  reserved;
00109 
00110   } WinPE_RsrcDataEntryRec;
00111 
00112 
00113   typedef struct  WinNameInfoRec_
00114   {
00115     FT_UShort  offset;
00116     FT_UShort  length;
00117     FT_UShort  flags;
00118     FT_UShort  id;
00119     FT_UShort  handle;
00120     FT_UShort  usage;
00121 
00122   } WinNameInfoRec;
00123 
00124 
00125   typedef struct  WinResourceInfoRec_
00126   {
00127     FT_UShort  type_id;
00128     FT_UShort  count;
00129 
00130   } WinResourceInfoRec;
00131 
00132 
00133 #define WINFNT_MZ_MAGIC  0x5A4D
00134 #define WINFNT_NE_MAGIC  0x454E
00135 #define WINFNT_PE_MAGIC  0x4550
00136 
00137 
00138   typedef struct  FNT_FontRec_
00139   {
00140     FT_ULong             offset;
00141 
00142     FT_WinFNT_HeaderRec  header;
00143 
00144     FT_Byte*             fnt_frame;
00145     FT_ULong             fnt_size;
00146     FT_String*           family_name;
00147 
00148   } FNT_FontRec, *FNT_Font;
00149 
00150 
00151   typedef struct  FNT_FaceRec_
00152   {
00153     FT_FaceRec     root;
00154     FNT_Font       font;
00155 
00156     FT_CharMap     charmap_handle;
00157     FT_CharMapRec  charmap;  /* a single charmap per face */
00158 
00159   } FNT_FaceRec, *FNT_Face;
00160 
00161 
00162   FT_EXPORT_VAR( const FT_Driver_ClassRec )  winfnt_driver_class;
00163 
00164 
00165 FT_END_HEADER
00166 
00167 
00168 #endif /* __WINFNT_H__ */
00169 
00170 
00171 /* END */

Generated on Tue Jul 5 14:13:55 2011 for ROOT_528-00b_version by  doxygen 1.5.1