1 /***************************************************************************/
   2 /*                                                                         */
   3 /*  ftcid.h                                                                */
   4 /*                                                                         */
   5 /*    FreeType API for accessing CID font information (specification).     */
   6 /*                                                                         */
   7 /*  Copyright 2007-2018 by                                                 */
   8 /*  Dereg Clegg and Michael Toftdal.                                       */
   9 /*                                                                         */
  10 /*  This file is part of the FreeType project, and may only be used,       */
  11 /*  modified, and distributed under the terms of the FreeType project      */
  12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
  13 /*  this file you indicate that you have read the license and              */
  14 /*  understand and accept it fully.                                        */
  15 /*                                                                         */
  16 /***************************************************************************/
  17 
  18 
  19 #ifndef FTCID_H_
  20 #define FTCID_H_
  21 
  22 #include <ft2build.h>
  23 #include FT_FREETYPE_H
  24 
  25 #ifdef FREETYPE_H
  26 #error "freetype.h of FreeType 1 has been loaded!"
  27 #error "Please fix the directory search order for header files"
  28 #error "so that freetype.h of FreeType 2 is found first."
  29 #endif
  30 
  31 
  32 FT_BEGIN_HEADER
  33 
  34 
  35   /*************************************************************************/
  36   /*                                                                       */
  37   /* <Section>                                                             */
  38   /*    cid_fonts                                                          */
  39   /*                                                                       */
  40   /* <Title>                                                               */
  41   /*    CID Fonts                                                          */
  42   /*                                                                       */
  43   /* <Abstract>                                                            */
  44   /*    CID-keyed font specific API.                                       */
  45   /*                                                                       */
  46   /* <Description>                                                         */
  47   /*    This section contains the declaration of CID-keyed font specific   */
  48   /*    functions.                                                         */
  49   /*                                                                       */
  50   /*************************************************************************/
  51 
  52 
  53   /**********************************************************************
  54    *
  55    * @function:
  56    *    FT_Get_CID_Registry_Ordering_Supplement
  57    *
  58    * @description:
  59    *    Retrieve the Registry/Ordering/Supplement triple (also known as the
  60    *    "R/O/S") from a CID-keyed font.
  61    *
  62    * @input:
  63    *    face ::
  64    *       A handle to the input face.
  65    *
  66    * @output:
  67    *    registry ::
  68    *       The registry, as a C~string, owned by the face.
  69    *
  70    *    ordering ::
  71    *       The ordering, as a C~string, owned by the face.
  72    *
  73    *    supplement ::
  74    *       The supplement.
  75    *
  76    * @return:
  77    *    FreeType error code.  0~means success.
  78    *
  79    * @note:
  80    *    This function only works with CID faces, returning an error
  81    *    otherwise.
  82    *
  83    * @since:
  84    *    2.3.6
  85    */
  86   FT_EXPORT( FT_Error )
  87   FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,
  88                                            const char*  *registry,
  89                                            const char*  *ordering,
  90                                            FT_Int       *supplement );
  91 
  92 
  93   /**********************************************************************
  94    *
  95    * @function:
  96    *    FT_Get_CID_Is_Internally_CID_Keyed
  97    *
  98    * @description:
  99    *    Retrieve the type of the input face, CID keyed or not.  In
 100    *    contrast to the @FT_IS_CID_KEYED macro this function returns
 101    *    successfully also for CID-keyed fonts in an SFNT wrapper.
 102    *
 103    * @input:
 104    *    face ::
 105    *       A handle to the input face.
 106    *
 107    * @output:
 108    *    is_cid ::
 109    *       The type of the face as an @FT_Bool.
 110    *
 111    * @return:
 112    *    FreeType error code.  0~means success.
 113    *
 114    * @note:
 115    *    This function only works with CID faces and OpenType fonts,
 116    *    returning an error otherwise.
 117    *
 118    * @since:
 119    *    2.3.9
 120    */
 121   FT_EXPORT( FT_Error )
 122   FT_Get_CID_Is_Internally_CID_Keyed( FT_Face   face,
 123                                       FT_Bool  *is_cid );
 124 
 125 
 126   /**********************************************************************
 127    *
 128    * @function:
 129    *    FT_Get_CID_From_Glyph_Index
 130    *
 131    * @description:
 132    *    Retrieve the CID of the input glyph index.
 133    *
 134    * @input:
 135    *    face ::
 136    *       A handle to the input face.
 137    *
 138    *    glyph_index ::
 139    *       The input glyph index.
 140    *
 141    * @output:
 142    *    cid ::
 143    *       The CID as an @FT_UInt.
 144    *
 145    * @return:
 146    *    FreeType error code.  0~means success.
 147    *
 148    * @note:
 149    *    This function only works with CID faces and OpenType fonts,
 150    *    returning an error otherwise.
 151    *
 152    * @since:
 153    *    2.3.9
 154    */
 155   FT_EXPORT( FT_Error )
 156   FT_Get_CID_From_Glyph_Index( FT_Face   face,
 157                                FT_UInt   glyph_index,
 158                                FT_UInt  *cid );
 159 
 160   /* */
 161 
 162 
 163 FT_END_HEADER
 164 
 165 #endif /* FTCID_H_ */
 166 
 167 
 168 /* END */