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

tttables.h
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  tttables.h                                                             */
00004 /*                                                                         */
00005 /*    Basic SFNT/TrueType tables definitions and interface                 */
00006 /*    (specification only).                                                */
00007 /*                                                                         */
00008 /*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009, 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 __TTTABLES_H__
00021 #define __TTTABLES_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   /* <Section>                                                             */
00039   /*    truetype_tables                                                    */
00040   /*                                                                       */
00041   /* <Title>                                                               */
00042   /*    TrueType Tables                                                    */
00043   /*                                                                       */
00044   /* <Abstract>                                                            */
00045   /*    TrueType specific table types and functions.                       */
00046   /*                                                                       */
00047   /* <Description>                                                         */
00048   /*    This section contains the definition of TrueType-specific tables   */
00049   /*    as well as some routines used to access and process them.          */
00050   /*                                                                       */
00051   /*************************************************************************/
00052 
00053 
00054   /*************************************************************************/
00055   /*                                                                       */
00056   /* <Struct>                                                              */
00057   /*    TT_Header                                                          */
00058   /*                                                                       */
00059   /* <Description>                                                         */
00060   /*    A structure used to model a TrueType font header table.  All       */
00061   /*    fields follow the TrueType specification.                          */
00062   /*                                                                       */
00063   typedef struct  TT_Header_
00064   {
00065     FT_Fixed   Table_Version;
00066     FT_Fixed   Font_Revision;
00067 
00068     FT_Long    CheckSum_Adjust;
00069     FT_Long    Magic_Number;
00070 
00071     FT_UShort  Flags;
00072     FT_UShort  Units_Per_EM;
00073 
00074     FT_Long    Created [2];
00075     FT_Long    Modified[2];
00076 
00077     FT_Short   xMin;
00078     FT_Short   yMin;
00079     FT_Short   xMax;
00080     FT_Short   yMax;
00081 
00082     FT_UShort  Mac_Style;
00083     FT_UShort  Lowest_Rec_PPEM;
00084 
00085     FT_Short   Font_Direction;
00086     FT_Short   Index_To_Loc_Format;
00087     FT_Short   Glyph_Data_Format;
00088 
00089   } TT_Header;
00090 
00091 
00092   /*************************************************************************/
00093   /*                                                                       */
00094   /* <Struct>                                                              */
00095   /*    TT_HoriHeader                                                      */
00096   /*                                                                       */
00097   /* <Description>                                                         */
00098   /*    A structure used to model a TrueType horizontal header, the `hhea' */
00099   /*    table, as well as the corresponding horizontal metrics table,      */
00100   /*    i.e., the `hmtx' table.                                            */
00101   /*                                                                       */
00102   /* <Fields>                                                              */
00103   /*    Version                :: The table version.                       */
00104   /*                                                                       */
00105   /*    Ascender               :: The font's ascender, i.e., the distance  */
00106   /*                              from the baseline to the top-most of all */
00107   /*                              glyph points found in the font.          */
00108   /*                                                                       */
00109   /*                              This value is invalid in many fonts, as  */
00110   /*                              it is usually set by the font designer,  */
00111   /*                              and often reflects only a portion of the */
00112   /*                              glyphs found in the font (maybe ASCII).  */
00113   /*                                                                       */
00114   /*                              You should use the `sTypoAscender' field */
00115   /*                              of the OS/2 table instead if you want    */
00116   /*                              the correct one.                         */
00117   /*                                                                       */
00118   /*    Descender              :: The font's descender, i.e., the distance */
00119   /*                              from the baseline to the bottom-most of  */
00120   /*                              all glyph points found in the font.  It  */
00121   /*                              is negative.                             */
00122   /*                                                                       */
00123   /*                              This value is invalid in many fonts, as  */
00124   /*                              it is usually set by the font designer,  */
00125   /*                              and often reflects only a portion of the */
00126   /*                              glyphs found in the font (maybe ASCII).  */
00127   /*                                                                       */
00128   /*                              You should use the `sTypoDescender'      */
00129   /*                              field of the OS/2 table instead if you   */
00130   /*                              want the correct one.                    */
00131   /*                                                                       */
00132   /*    Line_Gap               :: The font's line gap, i.e., the distance  */
00133   /*                              to add to the ascender and descender to  */
00134   /*                              get the BTB, i.e., the                   */
00135   /*                              baseline-to-baseline distance for the    */
00136   /*                              font.                                    */
00137   /*                                                                       */
00138   /*    advance_Width_Max      :: This field is the maximum of all advance */
00139   /*                              widths found in the font.  It can be     */
00140   /*                              used to compute the maximum width of an  */
00141   /*                              arbitrary string of text.                */
00142   /*                                                                       */
00143   /*    min_Left_Side_Bearing  :: The minimum left side bearing of all     */
00144   /*                              glyphs within the font.                  */
00145   /*                                                                       */
00146   /*    min_Right_Side_Bearing :: The minimum right side bearing of all    */
00147   /*                              glyphs within the font.                  */
00148   /*                                                                       */
00149   /*    xMax_Extent            :: The maximum horizontal extent (i.e., the */
00150   /*                              `width' of a glyph's bounding box) for   */
00151   /*                              all glyphs in the font.                  */
00152   /*                                                                       */
00153   /*    caret_Slope_Rise       :: The rise coefficient of the cursor's     */
00154   /*                              slope of the cursor (slope=rise/run).    */
00155   /*                                                                       */
00156   /*    caret_Slope_Run        :: The run coefficient of the cursor's      */
00157   /*                              slope.                                   */
00158   /*                                                                       */
00159   /*    Reserved               :: 8~reserved bytes.                        */
00160   /*                                                                       */
00161   /*    metric_Data_Format     :: Always~0.                                */
00162   /*                                                                       */
00163   /*    number_Of_HMetrics     :: Number of HMetrics entries in the `hmtx' */
00164   /*                              table -- this value can be smaller than  */
00165   /*                              the total number of glyphs in the font.  */
00166   /*                                                                       */
00167   /*    long_metrics           :: A pointer into the `hmtx' table.         */
00168   /*                                                                       */
00169   /*    short_metrics          :: A pointer into the `hmtx' table.         */
00170   /*                                                                       */
00171   /* <Note>                                                                */
00172   /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
00173   /*               be identical except for the names of their fields which */
00174   /*               are different.                                          */
00175   /*                                                                       */
00176   /*               This ensures that a single function in the `ttload'     */
00177   /*               module is able to read both the horizontal and vertical */
00178   /*               headers.                                                */
00179   /*                                                                       */
00180   typedef struct  TT_HoriHeader_
00181   {
00182     FT_Fixed   Version;
00183     FT_Short   Ascender;
00184     FT_Short   Descender;
00185     FT_Short   Line_Gap;
00186 
00187     FT_UShort  advance_Width_Max;      /* advance width maximum */
00188 
00189     FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */
00190     FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */
00191     FT_Short   xMax_Extent;            /* xmax extents          */
00192     FT_Short   caret_Slope_Rise;
00193     FT_Short   caret_Slope_Run;
00194     FT_Short   caret_Offset;
00195 
00196     FT_Short   Reserved[4];
00197 
00198     FT_Short   metric_Data_Format;
00199     FT_UShort  number_Of_HMetrics;
00200 
00201     /* The following fields are not defined by the TrueType specification */
00202     /* but they are used to connect the metrics header to the relevant    */
00203     /* `HMTX' table.                                                      */
00204 
00205     void*      long_metrics;
00206     void*      short_metrics;
00207 
00208   } TT_HoriHeader;
00209 
00210 
00211   /*************************************************************************/
00212   /*                                                                       */
00213   /* <Struct>                                                              */
00214   /*    TT_VertHeader                                                      */
00215   /*                                                                       */
00216   /* <Description>                                                         */
00217   /*    A structure used to model a TrueType vertical header, the `vhea'   */
00218   /*    table, as well as the corresponding vertical metrics table, i.e.,  */
00219   /*    the `vmtx' table.                                                  */
00220   /*                                                                       */
00221   /* <Fields>                                                              */
00222   /*    Version                 :: The table version.                      */
00223   /*                                                                       */
00224   /*    Ascender                :: The font's ascender, i.e., the distance */
00225   /*                               from the baseline to the top-most of    */
00226   /*                               all glyph points found in the font.     */
00227   /*                                                                       */
00228   /*                               This value is invalid in many fonts, as */
00229   /*                               it is usually set by the font designer, */
00230   /*                               and often reflects only a portion of    */
00231   /*                               the glyphs found in the font (maybe     */
00232   /*                               ASCII).                                 */
00233   /*                                                                       */
00234   /*                               You should use the `sTypoAscender'      */
00235   /*                               field of the OS/2 table instead if you  */
00236   /*                               want the correct one.                   */
00237   /*                                                                       */
00238   /*    Descender               :: The font's descender, i.e., the         */
00239   /*                               distance from the baseline to the       */
00240   /*                               bottom-most of all glyph points found   */
00241   /*                               in the font.  It is negative.           */
00242   /*                                                                       */
00243   /*                               This value is invalid in many fonts, as */
00244   /*                               it is usually set by the font designer, */
00245   /*                               and often reflects only a portion of    */
00246   /*                               the glyphs found in the font (maybe     */
00247   /*                               ASCII).                                 */
00248   /*                                                                       */
00249   /*                               You should use the `sTypoDescender'     */
00250   /*                               field of the OS/2 table instead if you  */
00251   /*                               want the correct one.                   */
00252   /*                                                                       */
00253   /*    Line_Gap                :: The font's line gap, i.e., the distance */
00254   /*                               to add to the ascender and descender to */
00255   /*                               get the BTB, i.e., the                  */
00256   /*                               baseline-to-baseline distance for the   */
00257   /*                               font.                                   */
00258   /*                                                                       */
00259   /*    advance_Height_Max      :: This field is the maximum of all        */
00260   /*                               advance heights found in the font.  It  */
00261   /*                               can be used to compute the maximum      */
00262   /*                               height of an arbitrary string of text.  */
00263   /*                                                                       */
00264   /*    min_Top_Side_Bearing    :: The minimum top side bearing of all     */
00265   /*                               glyphs within the font.                 */
00266   /*                                                                       */
00267   /*    min_Bottom_Side_Bearing :: The minimum bottom side bearing of all  */
00268   /*                               glyphs within the font.                 */
00269   /*                                                                       */
00270   /*    yMax_Extent             :: The maximum vertical extent (i.e., the  */
00271   /*                               `height' of a glyph's bounding box) for */
00272   /*                               all glyphs in the font.                 */
00273   /*                                                                       */
00274   /*    caret_Slope_Rise        :: The rise coefficient of the cursor's    */
00275   /*                               slope of the cursor (slope=rise/run).   */
00276   /*                                                                       */
00277   /*    caret_Slope_Run         :: The run coefficient of the cursor's     */
00278   /*                               slope.                                  */
00279   /*                                                                       */
00280   /*    caret_Offset            :: The cursor's offset for slanted fonts.  */
00281   /*                               This value is `reserved' in vmtx        */
00282   /*                               version 1.0.                            */
00283   /*                                                                       */
00284   /*    Reserved                :: 8~reserved bytes.                       */
00285   /*                                                                       */
00286   /*    metric_Data_Format      :: Always~0.                               */
00287   /*                                                                       */
00288   /*    number_Of_HMetrics      :: Number of VMetrics entries in the       */
00289   /*                               `vmtx' table -- this value can be       */
00290   /*                               smaller than the total number of glyphs */
00291   /*                               in the font.                            */
00292   /*                                                                       */
00293   /*    long_metrics           :: A pointer into the `vmtx' table.         */
00294   /*                                                                       */
00295   /*    short_metrics          :: A pointer into the `vmtx' table.         */
00296   /*                                                                       */
00297   /* <Note>                                                                */
00298   /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
00299   /*               be identical except for the names of their fields which */
00300   /*               are different.                                          */
00301   /*                                                                       */
00302   /*               This ensures that a single function in the `ttload'     */
00303   /*               module is able to read both the horizontal and vertical */
00304   /*               headers.                                                */
00305   /*                                                                       */
00306   typedef struct  TT_VertHeader_
00307   {
00308     FT_Fixed   Version;
00309     FT_Short   Ascender;
00310     FT_Short   Descender;
00311     FT_Short   Line_Gap;
00312 
00313     FT_UShort  advance_Height_Max;      /* advance height maximum */
00314 
00315     FT_Short   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */
00316     FT_Short   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */
00317     FT_Short   yMax_Extent;             /* xmax or ymax extents            */
00318     FT_Short   caret_Slope_Rise;
00319     FT_Short   caret_Slope_Run;
00320     FT_Short   caret_Offset;
00321 
00322     FT_Short   Reserved[4];
00323 
00324     FT_Short   metric_Data_Format;
00325     FT_UShort  number_Of_VMetrics;
00326 
00327     /* The following fields are not defined by the TrueType specification */
00328     /* but they're used to connect the metrics header to the relevant     */
00329     /* `HMTX' or `VMTX' table.                                            */
00330 
00331     void*      long_metrics;
00332     void*      short_metrics;
00333 
00334   } TT_VertHeader;
00335 
00336 
00337   /*************************************************************************/
00338   /*                                                                       */
00339   /* <Struct>                                                              */
00340   /*    TT_OS2                                                             */
00341   /*                                                                       */
00342   /* <Description>                                                         */
00343   /*    A structure used to model a TrueType OS/2 table. This is the long  */
00344   /*    table version.  All fields comply to the TrueType specification.   */
00345   /*                                                                       */
00346   /*    Note that we now support old Mac fonts which do not include an     */
00347   /*    OS/2 table.  In this case, the `version' field is always set to    */
00348   /*    0xFFFF.                                                            */
00349   /*                                                                       */
00350   typedef struct  TT_OS2_
00351   {
00352     FT_UShort  version;                /* 0x0001 - more or 0xFFFF */
00353     FT_Short   xAvgCharWidth;
00354     FT_UShort  usWeightClass;
00355     FT_UShort  usWidthClass;
00356     FT_Short   fsType;
00357     FT_Short   ySubscriptXSize;
00358     FT_Short   ySubscriptYSize;
00359     FT_Short   ySubscriptXOffset;
00360     FT_Short   ySubscriptYOffset;
00361     FT_Short   ySuperscriptXSize;
00362     FT_Short   ySuperscriptYSize;
00363     FT_Short   ySuperscriptXOffset;
00364     FT_Short   ySuperscriptYOffset;
00365     FT_Short   yStrikeoutSize;
00366     FT_Short   yStrikeoutPosition;
00367     FT_Short   sFamilyClass;
00368 
00369     FT_Byte    panose[10];
00370 
00371     FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */
00372     FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */
00373     FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */
00374     FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */
00375 
00376     FT_Char    achVendID[4];
00377 
00378     FT_UShort  fsSelection;
00379     FT_UShort  usFirstCharIndex;
00380     FT_UShort  usLastCharIndex;
00381     FT_Short   sTypoAscender;
00382     FT_Short   sTypoDescender;
00383     FT_Short   sTypoLineGap;
00384     FT_UShort  usWinAscent;
00385     FT_UShort  usWinDescent;
00386 
00387     /* only version 1 tables: */
00388 
00389     FT_ULong   ulCodePageRange1;       /* Bits 0-31   */
00390     FT_ULong   ulCodePageRange2;       /* Bits 32-63  */
00391 
00392     /* only version 2 tables: */
00393 
00394     FT_Short   sxHeight;
00395     FT_Short   sCapHeight;
00396     FT_UShort  usDefaultChar;
00397     FT_UShort  usBreakChar;
00398     FT_UShort  usMaxContext;
00399 
00400   } TT_OS2;
00401 
00402 
00403   /*************************************************************************/
00404   /*                                                                       */
00405   /* <Struct>                                                              */
00406   /*    TT_Postscript                                                      */
00407   /*                                                                       */
00408   /* <Description>                                                         */
00409   /*    A structure used to model a TrueType PostScript table.  All fields */
00410   /*    comply to the TrueType specification.  This structure does not     */
00411   /*    reference the PostScript glyph names, which can be nevertheless    */
00412   /*    accessed with the `ttpost' module.                                 */
00413   /*                                                                       */
00414   typedef struct  TT_Postscript_
00415   {
00416     FT_Fixed  FormatType;
00417     FT_Fixed  italicAngle;
00418     FT_Short  underlinePosition;
00419     FT_Short  underlineThickness;
00420     FT_ULong  isFixedPitch;
00421     FT_ULong  minMemType42;
00422     FT_ULong  maxMemType42;
00423     FT_ULong  minMemType1;
00424     FT_ULong  maxMemType1;
00425 
00426     /* Glyph names follow in the file, but we don't   */
00427     /* load them by default.  See the ttpost.c file.  */
00428 
00429   } TT_Postscript;
00430 
00431 
00432   /*************************************************************************/
00433   /*                                                                       */
00434   /* <Struct>                                                              */
00435   /*    TT_PCLT                                                            */
00436   /*                                                                       */
00437   /* <Description>                                                         */
00438   /*    A structure used to model a TrueType PCLT table.  All fields       */
00439   /*    comply to the TrueType specification.                              */
00440   /*                                                                       */
00441   typedef struct  TT_PCLT_
00442   {
00443     FT_Fixed   Version;
00444     FT_ULong   FontNumber;
00445     FT_UShort  Pitch;
00446     FT_UShort  xHeight;
00447     FT_UShort  Style;
00448     FT_UShort  TypeFamily;
00449     FT_UShort  CapHeight;
00450     FT_UShort  SymbolSet;
00451     FT_Char    TypeFace[16];
00452     FT_Char    CharacterComplement[8];
00453     FT_Char    FileName[6];
00454     FT_Char    StrokeWeight;
00455     FT_Char    WidthType;
00456     FT_Byte    SerifStyle;
00457     FT_Byte    Reserved;
00458 
00459   } TT_PCLT;
00460 
00461 
00462   /*************************************************************************/
00463   /*                                                                       */
00464   /* <Struct>                                                              */
00465   /*    TT_MaxProfile                                                      */
00466   /*                                                                       */
00467   /* <Description>                                                         */
00468   /*    The maximum profile is a table containing many max values which    */
00469   /*    can be used to pre-allocate arrays.  This ensures that no memory   */
00470   /*    allocation occurs during a glyph load.                             */
00471   /*                                                                       */
00472   /* <Fields>                                                              */
00473   /*    version               :: The version number.                       */
00474   /*                                                                       */
00475   /*    numGlyphs             :: The number of glyphs in this TrueType     */
00476   /*                             font.                                     */
00477   /*                                                                       */
00478   /*    maxPoints             :: The maximum number of points in a         */
00479   /*                             non-composite TrueType glyph.  See also   */
00480   /*                             the structure element                     */
00481   /*                             `maxCompositePoints'.                     */
00482   /*                                                                       */
00483   /*    maxContours           :: The maximum number of contours in a       */
00484   /*                             non-composite TrueType glyph.  See also   */
00485   /*                             the structure element                     */
00486   /*                             `maxCompositeContours'.                   */
00487   /*                                                                       */
00488   /*    maxCompositePoints    :: The maximum number of points in a         */
00489   /*                             composite TrueType glyph.  See also the   */
00490   /*                             structure element `maxPoints'.            */
00491   /*                                                                       */
00492   /*    maxCompositeContours  :: The maximum number of contours in a       */
00493   /*                             composite TrueType glyph.  See also the   */
00494   /*                             structure element `maxContours'.          */
00495   /*                                                                       */
00496   /*    maxZones              :: The maximum number of zones used for      */
00497   /*                             glyph hinting.                            */
00498   /*                                                                       */
00499   /*    maxTwilightPoints     :: The maximum number of points in the       */
00500   /*                             twilight zone used for glyph hinting.     */
00501   /*                                                                       */
00502   /*    maxStorage            :: The maximum number of elements in the     */
00503   /*                             storage area used for glyph hinting.      */
00504   /*                                                                       */
00505   /*    maxFunctionDefs       :: The maximum number of function            */
00506   /*                             definitions in the TrueType bytecode for  */
00507   /*                             this font.                                */
00508   /*                                                                       */
00509   /*    maxInstructionDefs    :: The maximum number of instruction         */
00510   /*                             definitions in the TrueType bytecode for  */
00511   /*                             this font.                                */
00512   /*                                                                       */
00513   /*    maxStackElements      :: The maximum number of stack elements used */
00514   /*                             during bytecode interpretation.           */
00515   /*                                                                       */
00516   /*    maxSizeOfInstructions :: The maximum number of TrueType opcodes    */
00517   /*                             used for glyph hinting.                   */
00518   /*                                                                       */
00519   /*    maxComponentElements  :: The maximum number of simple (i.e., non-  */
00520   /*                             composite) glyphs in a composite glyph.   */
00521   /*                                                                       */
00522   /*    maxComponentDepth     :: The maximum nesting depth of composite    */
00523   /*                             glyphs.                                   */
00524   /*                                                                       */
00525   /* <Note>                                                                */
00526   /*    This structure is only used during font loading.                   */
00527   /*                                                                       */
00528   typedef struct  TT_MaxProfile_
00529   {
00530     FT_Fixed   version;
00531     FT_UShort  numGlyphs;
00532     FT_UShort  maxPoints;
00533     FT_UShort  maxContours;
00534     FT_UShort  maxCompositePoints;
00535     FT_UShort  maxCompositeContours;
00536     FT_UShort  maxZones;
00537     FT_UShort  maxTwilightPoints;
00538     FT_UShort  maxStorage;
00539     FT_UShort  maxFunctionDefs;
00540     FT_UShort  maxInstructionDefs;
00541     FT_UShort  maxStackElements;
00542     FT_UShort  maxSizeOfInstructions;
00543     FT_UShort  maxComponentElements;
00544     FT_UShort  maxComponentDepth;
00545 
00546   } TT_MaxProfile;
00547 
00548 
00549   /*************************************************************************/
00550   /*                                                                       */
00551   /* <Enum>                                                                */
00552   /*    FT_Sfnt_Tag                                                        */
00553   /*                                                                       */
00554   /* <Description>                                                         */
00555   /*    An enumeration used to specify the index of an SFNT table.         */
00556   /*    Used in the @FT_Get_Sfnt_Table API function.                       */
00557   /*                                                                       */
00558   typedef enum  FT_Sfnt_Tag_
00559   {
00560     ft_sfnt_head = 0,    /* TT_Header     */
00561     ft_sfnt_maxp = 1,    /* TT_MaxProfile */
00562     ft_sfnt_os2  = 2,    /* TT_OS2        */
00563     ft_sfnt_hhea = 3,    /* TT_HoriHeader */
00564     ft_sfnt_vhea = 4,    /* TT_VertHeader */
00565     ft_sfnt_post = 5,    /* TT_Postscript */
00566     ft_sfnt_pclt = 6,    /* TT_PCLT       */
00567 
00568     sfnt_max   /* internal end mark */
00569 
00570   } FT_Sfnt_Tag;
00571 
00572   /* */
00573 
00574 
00575   /*************************************************************************/
00576   /*                                                                       */
00577   /* <Function>                                                            */
00578   /*    FT_Get_Sfnt_Table                                                  */
00579   /*                                                                       */
00580   /* <Description>                                                         */
00581   /*    Return a pointer to a given SFNT table within a face.              */
00582   /*                                                                       */
00583   /* <Input>                                                               */
00584   /*    face :: A handle to the source.                                    */
00585   /*                                                                       */
00586   /*    tag  :: The index of the SFNT table.                               */
00587   /*                                                                       */
00588   /* <Return>                                                              */
00589   /*    A type-less pointer to the table.  This will be~0 in case of       */
00590   /*    error, or if the corresponding table was not found *OR* loaded     */
00591   /*    from the file.                                                     */
00592   /*                                                                       */
00593   /*    Use a typecast according to `tag' to access the structure          */
00594   /*    elements.                                                          */
00595   /*                                                                       */
00596   /* <Note>                                                                */
00597   /*    The table is owned by the face object and disappears with it.      */
00598   /*                                                                       */
00599   /*    This function is only useful to access SFNT tables that are loaded */
00600   /*    by the sfnt, truetype, and opentype drivers.  See @FT_Sfnt_Tag for */
00601   /*    a list.                                                            */
00602   /*                                                                       */
00603   FT_EXPORT( void* )
00604   FT_Get_Sfnt_Table( FT_Face      face,
00605                      FT_Sfnt_Tag  tag );
00606 
00607 
00608  /**************************************************************************
00609   *
00610   * @function:
00611   *   FT_Load_Sfnt_Table
00612   *
00613   * @description:
00614   *   Load any font table into client memory.
00615   *
00616   * @input:
00617   *   face ::
00618   *     A handle to the source face.
00619   *
00620   *   tag ::
00621   *     The four-byte tag of the table to load.  Use the value~0 if you want
00622   *     to access the whole font file.  Otherwise, you can use one of the
00623   *     definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
00624   *     one with @FT_MAKE_TAG.
00625   *
00626   *   offset ::
00627   *     The starting offset in the table (or file if tag == 0).
00628   *
00629   * @output:
00630   *   buffer ::
00631   *     The target buffer address.  The client must ensure that the memory
00632   *     array is big enough to hold the data.
00633   *
00634   * @inout:
00635   *   length ::
00636   *     If the `length' parameter is NULL, then try to load the whole table.
00637   *     Return an error code if it fails.
00638   *
00639   *     Else, if `*length' is~0, exit immediately while returning the
00640   *     table's (or file) full size in it.
00641   *
00642   *     Else the number of bytes to read from the table or file, from the
00643   *     starting offset.
00644   *
00645   * @return:
00646   *   FreeType error code.  0~means success.
00647   *
00648   * @note:
00649   *   If you need to determine the table's length you should first call this
00650   *   function with `*length' set to~0, as in the following example:
00651   *
00652   *     {
00653   *       FT_ULong  length = 0;
00654   *
00655   *
00656   *       error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
00657   *       if ( error ) { ... table does not exist ... }
00658   *
00659   *       buffer = malloc( length );
00660   *       if ( buffer == NULL ) { ... not enough memory ... }
00661   *
00662   *       error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
00663   *       if ( error ) { ... could not load table ... }
00664   *     }
00665   */
00666   FT_EXPORT( FT_Error )
00667   FT_Load_Sfnt_Table( FT_Face    face,
00668                       FT_ULong   tag,
00669                       FT_Long    offset,
00670                       FT_Byte*   buffer,
00671                       FT_ULong*  length );
00672 
00673 
00674  /**************************************************************************
00675   *
00676   * @function:
00677   *   FT_Sfnt_Table_Info
00678   *
00679   * @description:
00680   *   Return information on an SFNT table.
00681   *
00682   * @input:
00683   *   face ::
00684   *     A handle to the source face.
00685   *
00686   *   table_index ::
00687   *     The index of an SFNT table.  The function returns
00688   *     FT_Err_Table_Missing for an invalid value.
00689   *
00690   * @output:
00691   *   tag ::
00692   *     The name tag of the SFNT table.
00693   *
00694   *   length ::
00695   *     The length of the SFNT table.
00696   *
00697   * @return:
00698   *   FreeType error code.  0~means success.
00699   *
00700   * @note:
00701   *   SFNT tables with length zero are treated as missing.
00702   *
00703   */
00704   FT_EXPORT( FT_Error )
00705   FT_Sfnt_Table_Info( FT_Face    face,
00706                       FT_UInt    table_index,
00707                       FT_ULong  *tag,
00708                       FT_ULong  *length );
00709 
00710 
00711   /*************************************************************************/
00712   /*                                                                       */
00713   /* <Function>                                                            */
00714   /*    FT_Get_CMap_Language_ID                                            */
00715   /*                                                                       */
00716   /* <Description>                                                         */
00717   /*    Return TrueType/sfnt specific cmap language ID.  Definitions of    */
00718   /*    language ID values are in `freetype/ttnameid.h'.                   */
00719   /*                                                                       */
00720   /* <Input>                                                               */
00721   /*    charmap ::                                                         */
00722   /*      The target charmap.                                              */
00723   /*                                                                       */
00724   /* <Return>                                                              */
00725   /*    The language ID of `charmap'.  If `charmap' doesn't belong to a    */
00726   /*    TrueType/sfnt face, just return~0 as the default value.            */
00727   /*                                                                       */
00728   FT_EXPORT( FT_ULong )
00729   FT_Get_CMap_Language_ID( FT_CharMap  charmap );
00730 
00731 
00732   /*************************************************************************/
00733   /*                                                                       */
00734   /* <Function>                                                            */
00735   /*    FT_Get_CMap_Format                                                 */
00736   /*                                                                       */
00737   /* <Description>                                                         */
00738   /*    Return TrueType/sfnt specific cmap format.                         */
00739   /*                                                                       */
00740   /* <Input>                                                               */
00741   /*    charmap ::                                                         */
00742   /*      The target charmap.                                              */
00743   /*                                                                       */
00744   /* <Return>                                                              */
00745   /*    The format of `charmap'.  If `charmap' doesn't belong to a         */
00746   /*    TrueType/sfnt face, return -1.                                     */
00747   /*                                                                       */
00748   FT_EXPORT( FT_Long )
00749   FT_Get_CMap_Format( FT_CharMap  charmap );
00750 
00751   /* */
00752 
00753 
00754 FT_END_HEADER
00755 
00756 #endif /* __TTTABLES_H__ */
00757 
00758 
00759 /* END */

Generated on Sat May 26 2012 04:32:28 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.