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

📄 pshints.h

📁 附上freetype2.1.10的源代码,这个和上面传的是一起的
💻 H
📖 第 1 页 / 共 3 页
字号:
/***************************************************************************//*                                                                         *//*  pshints.h                                                              *//*                                                                         *//*    Interface to Postscript-specific (Type 1 and Type 2) hints           *//*    recorders (specification only).  These are used to support native    *//*    T1/T2 hints in the "type1", "cid" and "cff" font drivers.            *//*                                                                         *//*  Copyright 2001, 2002, 2003 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.                                        *//*                                                                         *//***************************************************************************/#ifndef __PSHINTS_H__#define __PSHINTS_H__#include <ft2build.h>#include FT_FREETYPE_H#include FT_TYPE1_TABLES_HFT_BEGIN_HEADER  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****               INTERNAL REPRESENTATION OF GLOBALS              *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/  typedef struct PSH_GlobalsRec_*  PSH_Globals;  typedef FT_Error  (*PSH_Globals_NewFunc)( FT_Memory     memory,                          T1_Private*   private_dict,                          PSH_Globals*  aglobals );  typedef FT_Error  (*PSH_Globals_SetScaleFunc)( PSH_Globals  globals,                               FT_Fixed     x_scale,                               FT_Fixed     y_scale,                               FT_Fixed     x_delta,                               FT_Fixed     y_delta );  typedef void  (*PSH_Globals_DestroyFunc)( PSH_Globals  globals );  typedef struct  PSH_Globals_FuncsRec_  {    PSH_Globals_NewFunc       create;    PSH_Globals_SetScaleFunc  set_scale;    PSH_Globals_DestroyFunc   destroy;  } PSH_Globals_FuncsRec, *PSH_Globals_Funcs;  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****                  PUBLIC TYPE 1 HINTS RECORDER                 *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/  /*************************************************************************/  /*                                                                       */  /* @type:                                                                */  /*    T1_Hints                                                           */  /*                                                                       */  /* @description:                                                         */  /*    This is a handle to an opaque structure used to record glyph hints */  /*    from a Type 1 character glyph character string.                    */  /*                                                                       */  /*    The methods used to operate on this object are defined by the      */  /*    @T1_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 ("stem", "stem3", or "reset").  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 T1_HintsRec_*  T1_Hints;  /*************************************************************************/  /*                                                                       */  /* @type:                                                                */  /*    T1_Hints_Funcs                                                     */  /*                                                                       */  /* @description:                                                         */  /*    A pointer to the @T1_Hints_FuncsRec structure that defines the     */  /*    API of a given @T1_Hints object.                                   */  /*                                                                       */  typedef const struct T1_Hints_FuncsRec_*  T1_Hints_Funcs;  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */  /*    T1_Hints_OpenFunc                                                  */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T1_Hints class used to prepare it for a new       */  /*    Type 1 hints recording session.                                    */  /*                                                                       */  /* @input:                                                               */  /*    hints :: A handle to the Type 1 hints recorder.                    */  /*                                                                       */  /* @note:                                                                */  /*    You should always call the @T1_Hints_CloseFunc method in order to  */  /*    close an opened recording session.                                 */  /*                                                                       */  typedef void  (*T1_Hints_OpenFunc)( T1_Hints  hints );  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */  /*    T1_Hints_SetStemFunc                                               */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T1_Hints class used to record a new horizontal or */  /*    vertical stem.  This corresponds to the Type 1 "hstem" and "vstem" */  /*    operators.                                                         */  /*                                                                       */  /* @input:                                                               */  /*    hints     :: A handle to the Type 1 hints recorder.                */  /*                                                                       */  /*    dimension :: 0 for horizontal stems (hstem), 1 for vertical ones   */  /*                 (vstem).                                              */  /*                                                                       */  /*    coords    :: Array of 2 integers, used as (position,length) stem   */  /*                 descriptor.                                           */  /*                                                                       */  /* @note:                                                                */  /*    Use vertical coordinates (y) for horizontal stems (dim=0).  Use    */  /*    horizontal coordinates (x) for vertical stems (dim=1).             */  /*                                                                       */  /*    "coords[0]" is the absolute stem position (lowest coordinate);     */  /*    "coords[1]" is the length.                                         */  /*                                                                       */  /*    The length can be negative, in which case it must be either -20 or */  /*    -21.  It will be interpreted as a "ghost" stem, according to       */  /*    Type 1 specification.                                              */  /*                                                                       */  /*    If the length is -21 (corresponding to a bottom ghost stem), then  */  /*    the real stem position is "coords[0]+coords[1]".                   */  /*                                                                       */  typedef void  (*T1_Hints_SetStemFunc)( T1_Hints  hints,                           FT_UInt   dimension,                           FT_Long*  coords );  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */  /*    T1_Hints_SetStem3Func                                              */  /*                                                                       */  /* @description:                                                         */  /*    A method of the @T1_Hints class used to record three               */  /*    counter-controlled horizontal or vertical stems at once.           */  /*                                                                       */  /* @input:                                                               */  /*    hints     :: A handle to the Type 1 hints recorder.                */  /*                                                                       */  /*    dimension :: 0 for horizontal stems, 1 for vertical ones.          */  /*                                                                       */  /*    coords    :: An array of 6 integers, holding 3 (position,length)   */  /*                 pairs for the counter-controlled stems.               */  /*                                                                       */  /* @note:                                                                */  /*    Use vertical coordinates (y) for horizontal stems (dim=0).  Use    */  /*    horizontal coordinates (x) for vertical stems (dim=1).             */  /*                                                                       */  /*    The lengths cannot be negative (ghost stems are never              */  /*    counter-controlled).                                               */  /*                                                                       */  typedef void  (*T1_Hints_SetStem3Func)( T1_Hints  hints,                            FT_UInt   dimension,                            FT_Long*  coords );  /*************************************************************************/  /*                                                                       */  /* @functype:                                                            */

⌨️ 快捷键说明

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