⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 truetype.h

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 H
📖 第 1 页 / 共 5 页
字号:
  /* coordinate axis.                                            */  /* For example, if the first bytes of the bitmap pertain to    */  /* its top-most line, then the flow is 'down'.  If these bytes */  /* pertain to its lowest line, the the flow is 'up'.           */#define TT_Flow_Down  -1  /* bitmap is oriented from top to bottom */#define TT_Flow_Up     1  /* bitmap is oriented from bottom to top */#define TT_Flow_Error  0  /* an error occurred during rendering    */  /* A structure used to describe the target bitmap or pixmap to the   */  /* renderer.  Note that there is nothing in this structure that      */  /* gives the nature of the buffer.                                   */  /* IMPORTANT NOTE:                                                   */  /*                                                                   */  /*   In the case of a pixmap, the 'width' and 'cols' fields must     */  /*   have the _same_ values, and _must_ be padded to 32-bits, i.e.,  */  /*   be a multiple of 4.  Clipping problems will arise otherwise,    */  /*   if not even page faults!                                        */  /*                                                                   */  /*   The typical settings are:                                       */  /*                                                                   */  /*   - for an WxH bitmap:                                            */  /*                                                                   */  /*       rows  = H                                                   */  /*       cols  = (W+7)/8                                             */  /*       width = W                                                   */  /*       flow  = your_choice                                         */  /*                                                                   */  /*   - for an WxH pixmap:                                            */  /*                                                                   */  /*       rows  = H                                                   */  /*       cols  = (W+3) & ~3                                          */  /*       width = cols                                                */  /*       flow  = your_choice                                         */  struct  TT_Raster_Map_  {    int    rows;    /* number of rows                    */    int    cols;    /* number of columns (bytes) per row */    int    width;   /* number of pixels per line         */    int    flow;    /* bitmap orientation                */    void*  bitmap;  /* bit/pixmap buffer                 */    long   size;    /* bit/pixmap size in bytes          */  };  typedef struct TT_Raster_Map_  TT_Raster_Map;/* The following tables are also defined in "drivers/ttlib/ttobjs.h" *//* We use the _TRUETYPE_ macro to prevent their redefinition when    *//* _compiling_ the backwards-compatible layer called "oldapi.c"      *//*                                                                   */#ifndef _TRUETYPE_  /* ------- The font header TrueType table structure ----- */  struct  TT_Header_  {    TT_Fixed   Table_Version;    TT_Fixed   Font_Revision;    TT_Long    CheckSum_Adjust;    TT_Long    Magic_Number;    TT_UShort  Flags;    TT_UShort  Units_Per_EM;    TT_Long    Created [2];    TT_Long    Modified[2];    TT_FWord   xMin;    TT_FWord   yMin;    TT_FWord   xMax;    TT_FWord   yMax;    TT_UShort  Mac_Style;    TT_UShort  Lowest_Rec_PPEM;    TT_Short   Font_Direction;    TT_Short   Index_To_Loc_Format;    TT_Short   Glyph_Data_Format;  };  typedef struct TT_Header_  TT_Header;  /* ------- The horizontal header TrueType table structure ----- */  /*******************************************************/  /*  This structure is the one defined by the TrueType  */  /*  specification, plus two fields used to link the    */  /*  font-units metrics to the header.                  */  struct  TT_Horizontal_Header_  {    TT_Fixed   Version;    TT_FWord   Ascender;    TT_FWord   Descender;    TT_FWord   Line_Gap;    TT_UFWord  advance_Width_Max;      /* advance width maximum */    TT_FWord   min_Left_Side_Bearing;  /* minimum left-sb       */    TT_FWord   min_Right_Side_Bearing; /* minimum right-sb      */    TT_FWord   xMax_Extent;            /* xmax extents          */    TT_FWord   caret_Slope_Rise;    TT_FWord   caret_Slope_Run;    TT_Short   caret_Offset;           /* only used in vertical header */    TT_Short   Reserved[4];    TT_Short   metric_Data_Format;    TT_UShort  number_Of_HMetrics;        /* The following fields are not defined by the TrueType specification */    /* but they're used to connect the metrics header to the relevant     */    /* "HMTX" or "VMTX" table.                                            */    void*      long_metrics;    void*      short_metrics;  };  /*******************************************************/  /*  This structure is the one defined by the TrueType  */  /*  specification.  Note that it has exactly the same  */  /*  layout as the horizontal header (both are loaded   */  /*  by the same function).                             */  struct  TT_Vertical_Header_  {    TT_Fixed   Version;    TT_FWord   Ascender;    TT_FWord   Descender;    TT_FWord   Line_Gap;    TT_UFWord  advance_Height_Max;      /* advance height maximum */    TT_FWord   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */    TT_FWord   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */    TT_FWord   yMax_Extent;             /* xmax or ymax extents            */    TT_FWord   caret_Slope_Rise;    TT_FWord   caret_Slope_Run;    TT_FWord   caret_Offset;    TT_Short   Reserved[4];    TT_Short   metric_Data_Format;    TT_UShort  number_Of_VMetrics;        /* The following fields are not defined by the TrueType specification */    /* but they're used to connect the metrics header to the relevant     */    /* "HMTX" or "VMTX" table.                                            */    void*      long_metrics;    void*      short_metrics;  };  typedef struct TT_Horizontal_Header_  TT_Horizontal_Header;  typedef struct TT_Vertical_Header_    TT_Vertical_Header;  /* ----------- OS/2 Table ----------------------------- */  struct  TT_OS2_  {    TT_UShort  version;                /* 0x0001 */    TT_FWord   xAvgCharWidth;    TT_UShort  usWeightClass;    TT_UShort  usWidthClass;    TT_Short   fsType;    TT_FWord   ySubscriptXSize;    TT_FWord   ySubscriptYSize;    TT_FWord   ySubscriptXOffset;    TT_FWord   ySubscriptYOffset;    TT_FWord   ySuperscriptXSize;    TT_FWord   ySuperscriptYSize;    TT_FWord   ySuperscriptXOffset;    TT_FWord   ySuperscriptYOffset;    TT_FWord   yStrikeoutSize;    TT_FWord   yStrikeoutPosition;    TT_Short   sFamilyClass;    TT_Byte    panose[10];    TT_ULong   ulUnicodeRange1;        /* Bits 0-31   */    TT_ULong   ulUnicodeRange2;        /* Bits 32-63  */    TT_ULong   ulUnicodeRange3;        /* Bits 64-95  */    TT_ULong   ulUnicodeRange4;        /* Bits 96-127 */    TT_Char    achVendID[4];    TT_UShort  fsSelection;    TT_UShort  usFirstCharIndex;    TT_UShort  usLastCharIndex;    TT_Short   sTypoAscender;    TT_Short   sTypoDescender;    TT_Short   sTypoLineGap;    TT_UShort  usWinAscent;    TT_UShort  usWinDescent;    /* only version 1 tables: */    TT_ULong   ulCodePageRange1;       /* Bits 0-31   */    TT_ULong   ulCodePageRange2;       /* Bits 32-63  */  };  typedef struct TT_OS2_  TT_OS2;  /* ----------- Postscript table ------------------------ */  struct  TT_Postscript_  {    TT_Fixed  FormatType;    TT_Fixed  italicAngle;    TT_FWord  underlinePosition;    TT_FWord  underlineThickness;    TT_ULong  isFixedPitch;    TT_ULong  minMemType42;    TT_ULong  maxMemType42;    TT_ULong  minMemType1;    TT_ULong  maxMemType1;    /* Glyph names follow in the file, but we don't         */    /* load them by default.  See the ftxpost.c extension.  */  };  typedef struct TT_Postscript_  TT_Postscript;  /* ------------ horizontal device metrics "hdmx" ---------- */  struct  TT_Hdmx_Record_  {    TT_Byte   ppem;    TT_Byte   max_width;    TT_Byte*  widths;  };  typedef struct TT_Hdmx_Record_  TT_Hdmx_Record;  struct  TT_Hdmx_  {    TT_UShort        version;    TT_Short         num_records;    TT_Hdmx_Record*  records;  };  typedef struct TT_Hdmx_  TT_Hdmx;#else  typedef  TT_HoriHeader   TT_Horizontal_Header;  typedef  TT_VertHeader   TT_Vertical_Header;#endif /* _TRUETYPE_ */  /* A structure used to describe face properties.                        */  /* be aware that this is not the same structure as the one define       */  /* in "freetype/ttlib/ttdriver.h". A suitable conversion is performed   */  /* in "oldapi/ttapi.c" to build a binary driver that is backwards       */  /* compatible with FreeType 1.1, in the function TT_Get_Face_Properties */  struct  TT_Face_Properties_  {    TT_UShort  num_Glyphs;      /* number of glyphs in face              */    TT_UShort  max_Points;      /* maximum number of points in a glyph   */    TT_UShort  max_Contours;    /* maximum number of contours in a glyph */    TT_UShort  num_CharMaps;    /* number of charmaps in the face     */    TT_UShort  num_Names;       /* number of name records in the face */    TT_ULong   num_Faces;  /* 1 for normal TrueType files, and the  */                           /* number of embedded faces for TrueType */                           /* collections                           */    TT_Header*             header;        /* TrueType header table          */    TT_Horizontal_Header*  horizontal;    /* TrueType horizontal header     */    TT_OS2*                os2;           /* TrueType OS/2 table            */    TT_Postscript*         postscript;    /* TrueType Postscript table      */    TT_Hdmx*               hdmx;    TT_Vertical_Header*    vertical;      /* TT Vertical header, if present */  };  typedef struct TT_Face_Properties_  TT_Face_Properties;  /***********************************************************************/  /*                                                                     */  /* <Type> TT_Engine                                                    */  /*                                                                     */  /* <Description>                                                       */  /*    A handle to a TrueType driver/engine instance. Engine objects    */  /*    can be created with the TT_New_Engine and TT_Build_Engine APIs   */  /*                                                                     */  /*    TT_Done_Engine will destroy an engine, as well as all the        */  /*    objects that were created within it.                             */  /*                                                                     */  typedef struct TT_EngineRec_   *TT_Engine;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -