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

📄 ttobjs.h

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 H
📖 第 1 页 / 共 2 页
字号:
  } TT_SubGlyphRec, *TT_SubGlyph_Stack;  /*************************************************************************/  /*                                                                       */  /* A note regarding non-squared pixels:                                  */  /*                                                                       */  /* (This text will probably go into some docs at some time, for now, it  */  /*  is kept here to explain some definitions in the TIns_Metrics         */  /*  record).                                                             */  /*                                                                       */  /* The CVT is a one-dimensional array containing values that control     */  /* certain important characteristics in a font, like the height of all   */  /* capitals, all lowercase letter, default spacing or stem width/height. */  /*                                                                       */  /* These values are found in FUnits in the font file, and must be scaled */  /* to pixel coordinates before being used by the CVT and glyph programs. */  /* Unfortunately, when using distinct x and y resolutions (or distinct x */  /* and y pointsizes), there are two possible scalings.                   */  /*                                                                       */  /* A first try was to implement a `lazy' scheme where all values were    */  /* scaled when first used.  However, while some values are always used   */  /* in the same direction, some others are used under many different      */  /* circumstances and orientations.                                       */  /*                                                                       */  /* I have found a simpler way to do the same, and it even seems to work  */  /* in most of the cases:                                                 */  /*                                                                       */  /* - All CVT values are scaled to the maximum ppem size.                 */  /*                                                                       */  /* - When performing a read or write in the CVT, a ratio factor is used  */  /*   to perform adequate scaling.  Example:                              */  /*                                                                       */  /*     x_ppem = 14                                                       */  /*     y_ppem = 10                                                       */  /*                                                                       */  /*   We choose ppem = x_ppem = 14 as the CVT scaling size.  All cvt      */  /*   entries are scaled to it.                                           */  /*                                                                       */  /*     x_ratio = 1.0                                                     */  /*     y_ratio = y_ppem/ppem (< 1.0)                                     */  /*                                                                       */  /*   We compute the current ratio like:                                  */  /*                                                                       */  /*   - If projVector is horizontal,                                      */  /*       ratio = x_ratio = 1.0                                           */  /*                                                                       */  /*   - if projVector is vertical,                                        */  /*       ratio = y_ratio                                                 */  /*                                                                       */  /*   - else,                                                             */  /*       ratio = sqrt( (proj.x * x_ratio) ^ 2 + (proj.y * y_ratio) ^ 2 ) */  /*                                                                       */  /*   Reading a cvt value returns                                         */  /*     ratio * cvt[index]                                                */  /*                                                                       */  /*   Writing a cvt value in pixels:                                      */  /*     cvt[index] / ratio                                                */  /*                                                                       */  /*   The current ppem is simply                                          */  /*     ratio * ppem                                                      */  /*                                                                       */  /*************************************************************************/  /*************************************************************************/  /*                                                                       */  /* Metrics used by the TrueType size and context objects.                */  /*                                                                       */  typedef struct  TT_Size_Metrics_  {    /* for non-square pixels */    TT_Long     x_ratio;    TT_Long     y_ratio;    TT_UShort   ppem;               /* maximum ppem size              */    TT_Long     ratio;              /* current ratio                  */    TT_Fixed    scale;    TT_F26Dot6  compensations[4];   /* device-specific compensations  */    TT_Bool     valid;    TT_Bool     rotated;            /* `is the glyph rotated?'-flag   */    TT_Bool     stretched;          /* `is the glyph stretched?'-flag */  } TT_Size_Metrics;  /*************************************************************************/  /*                                                                       */  /* FreeType execution context type.                                      */  /*                                                                       */  /* This is a forward declaration; the full specification is in the file  */  /* `ttinterp.h'.                                                         */  /*                                                                       */  typedef struct TT_ExecContextRec_*  TT_ExecContext;  /***********************************************************************/  /*                                                                     */  /* TrueType size class.                                                */  /*                                                                     */  typedef struct  TT_SizeRec_  {    FT_SizeRec         root;    TT_Size_Metrics    ttmetrics;#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER    TT_UInt            num_function_defs; /* number of function definitions */    TT_UInt            max_function_defs;    TT_DefArray        function_defs;     /* table of function definitions  */    TT_UInt            num_instruction_defs;  /* number of ins. definitions */    TT_UInt            max_instruction_defs;    TT_DefArray        instruction_defs;      /* table of ins. definitions  */    TT_UInt            max_func;    TT_UInt            max_ins;    TT_CodeRangeTable  codeRangeTable;    TT_GraphicsState   GS;    TT_ULong           cvt_size;      /* the scaled control value table */    TT_Long*           cvt;    TT_UShort          storage_size; /* The storage area is now part of */    TT_Long*           storage;      /* the instance                    */    FT_GlyphZone       twilight;     /* The instance's twilight zone    */    /* debugging variables */    /* When using the debugger, we must keep the */    /* execution context tied to the instance    */    /* object rather than asking it on demand.   */    TT_Bool            debug;    TT_ExecContext     context;#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */  } TT_SizeRec;  /***********************************************************************/  /*                                                                     */  /* TrueType driver class.                                              */  /*                                                                     */  typedef struct  TT_DriverRec_  {    FT_DriverRec    root;    TT_ExecContext  context;  /* execution context        */    FT_GlyphZone    zone;     /* glyph loader points zone */    void*           extension_component;  } TT_DriverRec; /*************************************************************************/ /*  Face Funcs                                                           */   LOCAL_DEF TT_Error  TT_Init_Face( FT_Stream  stream,                                    TT_Long    face_index,                                    TT_Face    face );  LOCAL_DEF void      TT_Done_Face( TT_Face  face ); /*************************************************************************/ /*  Size funcs                                                           */   LOCAL_DEF TT_Error  TT_Init_Size ( TT_Size  size );  LOCAL_DEF void      TT_Done_Size ( TT_Size  size );  LOCAL_DEF TT_Error  TT_Reset_Size( TT_Size  size ); /*************************************************************************/ /*  GlyphSlot funcs                                                      */   LOCAL_DEF TT_Error  TT_Init_GlyphSlot( TT_GlyphSlot  slot );  LOCAL_DEF void      TT_Done_GlyphSlot( TT_GlyphSlot  slot ); /*************************************************************************/ /*  Driver funcs                                                         */   LOCAL_DEF  TT_Error  TT_Init_Driver( TT_Driver  driver );  LOCAL_DEF  void      TT_Done_Driver( TT_Driver  driver );#ifdef __cplusplus  }#endif#endif /* TTOBJS_H *//* END */

⌨️ 快捷键说明

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