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

📄 pshints.h

📁 附上freetype2.1.10的源代码,这个和上面传的是一起的
💻 H
📖 第 1 页 / 共 3 页
字号:
  /*    T1_Hints_ResetFunc                                                 */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T1_Hints class used to reset the stems hints in a */  /*    recording session.                                                 */  /*                                                                       */  /* @input:                                                               */  /*    hints     :: A handle to the Type 1 hints recorder.                */  /*                                                                       */  /*    end_point :: The index of the last point in the input glyph in     */  /*                 which the previously defined hints apply.             */  /*                                                                       */  typedef void  (*T1_Hints_ResetFunc)( T1_Hints  hints,                         FT_UInt   end_point );  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */  /*    T1_Hints_CloseFunc                                                 */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T1_Hints class used to close a hint recording     */  /*    session.                                                           */  /*                                                                       */  /* @input:                                                               */  /*    hints     :: A handle to the Type 1 hints recorder.                */  /*                                                                       */  /*    end_point :: The index of the last point in the input glyph.       */  /*                                                                       */  /* @return:                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  /* @note:                                                                */  /*    The error code will be set to indicate that an error occured       */  /*    during the recording session.                                      */  /*                                                                       */  typedef FT_Error  (*T1_Hints_CloseFunc)( T1_Hints  hints,                         FT_UInt   end_point );  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */  /*    T1_Hints_ApplyFunc                                                 */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T1_Hints class used to apply hints to the         */  /*    corresponding glyph outline.  Must be called once all hints have   */  /*    been recorded.                                                     */  /*                                                                       */  /* @input:                                                               */  /*   hints     :: A handle to the Type 1 hints recorder.                 */  /*                                                                       */  /*   outline   :: A pointer to the target outline descriptor.            */  /*                                                                       */  /*   globals   :: The hinter globals for this font.                      */  /*                                                                       */  /*   hint_mode :: Hinting information.                                   */  /*                                                                       */  /* @return:                                                              */  /*   FreeType error code.  0 means success.                              */  /*                                                                       */  /* @note:                                                                */  /*    On input, all points within the outline are in font coordinates.   */  /*    On output, they are in 1/64th of pixels.                           */  /*                                                                       */  /*    The scaling transformation is taken from the "globals" object      */  /*    which must correspond to the same font as the glyph.               */  /*                                                                       */  typedef FT_Error  (*T1_Hints_ApplyFunc)( T1_Hints        hints,                         FT_Outline*     outline,                         PSH_Globals     globals,                         FT_Render_Mode  hint_mode );  /*************************************************************************/  /*                                                                       */  /* @struct:                                                              */  /*    T1_Hints_FuncsRec                                                  */  /*                                                                       */  /* @description:                                                         */  /*    The structure used to provide the API to @T1_Hints objects.        */  /*                                                                       */  /* @fields:                                                              */  /*    hints :: A handle to the T1 Hints recorder.                        */  /*                                                                       */  /*    open  :: The function to open a recording session.                 */  /*                                                                       */  /*    close :: The function to close a recording session.                */  /*                                                                       */  /*    stem  :: The function to set a simple stem.                        */  /*                                                                       */  /*    stem3 :: The function to set counter-controlled stems.             */  /*                                                                       */  /*    reset :: The function to reset stem hints.                         */  /*                                                                       */  /*    apply :: The function to apply the hints to the corresponding      */  /*             glyph outline.                                            */  /*                                                                       */  typedef struct  T1_Hints_FuncsRec_  {    T1_Hints               hints;    T1_Hints_OpenFunc      open;    T1_Hints_CloseFunc     close;    T1_Hints_SetStemFunc   stem;    T1_Hints_SetStem3Func  stem3;    T1_Hints_ResetFunc     reset;    T1_Hints_ApplyFunc     apply;  } T1_Hints_FuncsRec;  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****                  PUBLIC TYPE 2 HINTS RECORDER                 *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/  /*************************************************************************/  /*                                                                       */  /* @type:                                                                */  /*    T2_Hints                                                           */  /*                                                                       */  /* @description:                                                         */  /*    This is a handle to an opaque structure used to record glyph hints */  /*    from a Type 2 character glyph character string.                    */  /*                                                                       */  /*    The methods used to operate on this object are defined by the      */  /*    @T2_Hints_FuncsRec structure.  Recording glyph hints is normally   */  /*    achieved through the following scheme:                             */  /*                                                                       */  /*    - Open a new hint recording session by calling the "open" method.  */  /*      This will rewind the recorder and prepare it for new input.      */  /*                                                                       */  /*    - For each hint found in the glyph charstring, call the            */  /*      corresponding method ("stems", "hintmask", "counters").  Note    */  /*      that these functions do not return an error code.                */  /*                                                                       */  /*    - Close the recording session by calling the "close" method.  It   */  /*      will return an error code if the hints were invalid or something */  /*      strange happened (e.g. memory shortage).                         */  /*                                                                       */  /*    The hints accumulated in the object can later be used by the       */  /*    Postscript hinter.                                                 */  /*                                                                       */  typedef struct T2_HintsRec_*  T2_Hints;  /*************************************************************************/  /*                                                                       */  /* @type:                                                                */  /*    T2_Hints_Funcs                                                     */  /*                                                                       */  /* @description:                                                         */  /*    A pointer to the @T2_Hints_FuncsRec structure that defines the API */  /*    of a given @T2_Hints object.                                       */  /*                                                                       */  typedef const struct T2_Hints_FuncsRec_*  T2_Hints_Funcs;  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */  /*    T2_Hints_OpenFunc                                                  */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T2_Hints class used to prepare it for a new       */  /*    Type 2 hints recording session.                                    */  /*                                                                       */  /* @input:                                                               */  /*    hints :: A handle to the Type 2 hints recorder.                    */  /*                                                                       */  /* @note:                                                                */  /*    You should always call the @T2_Hints_CloseFunc method in order to  */  /*    close an opened recording session.                                 */  /*                                                                       */  typedef void  (*T2_Hints_OpenFunc)( T2_Hints  hints );  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */  /*    T2_Hints_StemsFunc                                                 */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T2_Hints class used to set the table of stems in  */  /*    either the vertical or horizontal dimension.  Equivalent to the    */  /*    "hstem", "vstem", "hstemhm", and "vstemhm" Type 2 operators.       */  /*                                                                       */  /* @input:                                                               */  /*    hints     :: A handle to the Type 2 hints recorder.                */  /*                                                                       */  /*    dimension :: 0 for horizontal stems (hstem), 1 for vertical ones   */  /*                 (vstem).                                              */  /*                                                                       */  /*    count     :: The number of stems.                                  */  /*                                                                       */  /*    coords    :: An array of "count" (position,length) pairs.          */  /*                                                                       */  /* @note:                                                                */  /*    Use vertical coordinates (y) for horizontal stems (dim=0).  Use    */  /*    horizontal coordinates (x) for vertical stems (dim=1).             */

⌨️ 快捷键说明

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