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

📄 ftxsbit.h

📁 神龙卡开发原代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************* * *  ftxsbit.h * *    embedded bitmap support API extension * *  Copyright 1996-1999 by *  David Turner, Robert Wilhelm, and Werner Lemberg. * *  This file is part of the FreeType project, and may only be used *  modified and distributed under the terms of the FreeType project *  license, LICENSE.TXT.  By continuing to use, modify, or distribute *  this file you indicate that you have read the license and *  understand and accept it fully. * * *  This extension is used to load the embedded bitmaps present    *  in certain TrueType files.                                     * ******************************************************************/#ifndef FTXSBIT_H#define FTXSBIT_H#include "freetype.h"#ifdef __cplusplusextern "C" {#endif  /*************************************************************/  /*                                                           */  /* <Struct> TT_SBit_Metrics                                  */  /*                                                           */  /* <Description>                                             */  /*    A structure used to hold the big metrics of a given    */  /*    glyph bitmap in a TrueType or OpenType font.  These    */  /*    are usually found in the `EBDT' table.                 */  /*                                                           */  /* <Fields>                                                  */  /*    height       :: glyph height in pixels                 */  /*    width        :: glyph width in pixels                  */  /*                                                           */  /*    horiBearingX :: horizontal left bearing                */  /*    horiBearingY :: horizontal top bearing                 */  /*    horiAdvance  :: horizontal advance                     */  /*                                                           */  /*    vertBearingX :: vertical left bearing                  */  /*    vertBearingY :: vertical top bearing                   */  /*    vertAdvance  :: vertical advance                       */  /*                                                           */  typedef struct  TT_SBit_Metrics_  {    TT_Byte  height;    TT_Byte  width;    TT_Char  horiBearingX;    TT_Char  horiBearingY;    TT_Byte  horiAdvance;    TT_Char  vertBearingX;    TT_Char  vertBearingY;    TT_Byte  vertAdvance;  } TT_SBit_Metrics;  /*************************************************************/  /*                                                           */  /* <Struct> TT_SBit_Small_Metrics                            */  /*                                                           */  /* <Description>                                             */  /*    A structure used to hold the small metrics of a given  */  /*    glyph bitmap in a TrueType or OpenType font.  These    */  /*    are usually found in the `EBDT' table.                 */  /*                                                           */  /* <Fields>                                                  */  /*    height    :: glyph height in pixels                    */  /*    width     :: glyph width in pixels                     */  /*                                                           */  /*    bearingX  :: left-side bearing                         */  /*    bearingY  :: top-side bearing                          */  /*    advance   :: advance width or height                   */  /*                                                           */  typedef struct  TT_SBit_Small_Metrics_  {    TT_Byte  height;    TT_Byte  width;    TT_Char  bearingX;    TT_Char  bearingY;    TT_Byte  advance;  } TT_SBit_Small_Metrics;  /*************************************************************/  /*                                                           */  /* <Struct> TT_SBit_Line_Metrics                             */  /*                                                           */  /* <Description>                                             */  /*    A structure used to describe the text line metrics of  */  /*    a given bitmap strike, for either horizontal or        */  /*    vertical layout.                                       */  /*                                                           */  /* <Fields>                                                  */  /*    ascender  :: ascender in pixels                        */  /*    descender :: descender in pixels                       */  /*    max_width :: maximum glyph width in pixels             */  /*                                                           */  /*    caret_slope_enumerator  :: Rise of the caret slope,    */  /*                 typically set to 1 for non-italic fonts.  */  /*    caret_slope_denominator :: Rise of the caret slope,    */  /*                 typically set to 0 for non-italic fonts.  */  /*    caret_offset            :: Offset in pixels            */  /*            to move the caret for proper positioning.      */  /*                                                           */  /*    min_origin_SB  :: Minimum of horiBearingX              */  /*                      (resp. vertBearingY)                 */  /*    min_advance_SB :: Minimum of                           */  /*               (hori. advance - ( horiBearingX + width ))  */  /*         (resp. vert. advance - ( vertBearingY + height )) */  /*    max_before_BL  :: Maximum of horiBearingY              */  /*                      (resp. Maximum of vertBearingY)      */  /*    min_after_BL   :: Minimum of ( horiBearingY - height ) */  /*                      (resp. vertBearingX - width )        */  /*                                                           */  typedef struct  TT_SBit_Line_Metrics_  {    TT_Char  ascender;    TT_Char  descender;    TT_Byte  max_width;    TT_Char  caret_slope_numerator;    TT_Char  caret_slope_denominator;    TT_Char  caret_offset;    TT_Char  min_origin_SB;    TT_Char  min_advance_SB;    TT_Char  max_before_BL;    TT_Char  min_after_BL;    TT_Char  pads[2];  } TT_SBit_Line_Metrics;  /*************************************************************/  /*                                                           */  /* <Struct> TT_SBit_Range                                    */  /*                                                           */  /* <Description>                                             */  /*    A TrueType/OpenType subIndexTable as defined in the    */  /*    `EBLC' or `bloc' tables.                               */  /*                                                           */  /* <Fields>                                                  */  /*                                                           */  /*    first_glyph  :: first glyph index in range             */  /*    last_glyph   :: last glyph index in range              */  /*                                                           */  /*    index_format :: format of index table. valid           */  /*                    values are 1 to 5.                     */  /*                                                           */  /*    image_format :: format of `EBDT' image data            */  /*    image_offset :: offset to image data in `EBDT'         */  /*                                                           */  /*    image_size   :: for index formats 2 and 5.  This is    */  /*                    the size in bytes of each glyph bitmap */  /*                    glyph bitmap                           */  /*                                                           */  /*    big_metrics  :: for index formats 2 and 5.  This is    */  /*                    the big metrics for each glyph bitmap  */  /*                                                           */  /*    num_glyphs   :: for index formats 4 and 5.  This is    */  /*                    the number of glyphs in the code       */  /*                    array.                                 */  /*                                                           */  /*    glyph_offsets :: for index formats 1 and 3.            */  /*    glyph_codes   :: for index formats 4 and 5.            */  /*                                                           */  /*    table_offset  :: offset of index table in `EBLC' table */  /*                     -- only used during strike loading.   */  /*                                                           */  typedef struct  TT_SBit_Range  {    TT_UShort        first_glyph;    TT_UShort        last_glyph;    TT_UShort        index_format;    TT_UShort        image_format;    TT_ULong         image_offset;    TT_ULong         image_size;    TT_SBit_Metrics  metrics;    TT_ULong         num_glyphs;    TT_ULong*        glyph_offsets;    TT_UShort*       glyph_codes;    TT_ULong         table_offset;  } TT_SBit_Range;  /*************************************************************/  /*                                                           */  /* <Struct> TT_SBit_Strike                                   */  /*                                                           */  /* <Description>                                             */  /*    A structure used describe a given bitmap strike in the */  /*    `EBLC' or `bloc' tables.                               */  /*                                                           */  /* <Fields>                                                  */  /*                                                           */  /*   num_index_ranges :: number of index ranges              */  /*   index_ranges     :: array of glyph index ranges         */  /*                                                           */  /*   color_ref   :: unused. color reference?                 */  /*   hori        :: line metrics for horizontal layouts.     */  /*   vert        :: line metrics for vertical layouts.       */  /*                                                           */  /*   start_glyph :: lowest glyph index for this strike.      */  /*   end_glyph   :: higher glyph index for this strike.      */  /*                                                           */  /*   x_ppem      :: horizontal pixels per EM                 */  /*   y_ppem      :: vertical pixels per EM                   */  /*   bit_depth   :: bit depth. valid values are 1, 2, 4 & 8  */  /*   flags       :: vertical or horizontal?                  */  /*                                                           */  typedef struct  TT_SBit_Strike_  {    TT_Int                num_ranges;    TT_SBit_Range*        sbit_ranges;    TT_ULong              ranges_offset;    TT_ULong              color_ref;    TT_SBit_Line_Metrics  hori;    TT_SBit_Line_Metrics  vert;    TT_UShort             start_glyph;    TT_UShort             end_glyph;    TT_Byte               x_ppem;    TT_Byte               y_ppem;    TT_Byte               bit_depth;    TT_Char               flags;  } TT_SBit_Strike;

⌨️ 快捷键说明

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