godot/thirdparty/freetype/src/cff/cffcmap.c

/****************************************************************************
 *
 * cffcmap.c
 *
 *   CFF character mapping table (cmap) support (body).
 *
 * Copyright (C) 2002-2023 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.
 *
 */


#include <freetype/internal/ftdebug.h>
#include "cffcmap.h"
#include "cffload.h"

#include "cfferrs.h"


  /*************************************************************************/
  /*************************************************************************/
  /*****                                                               *****/
  /*****           CFF STANDARD (AND EXPERT) ENCODING CMAPS            *****/
  /*****                                                               *****/
  /*************************************************************************/
  /*************************************************************************/

  FT_CALLBACK_DEF( FT_Error )
  cff_cmap_encoding_init( FT_CMap     cmap,
                          FT_Pointer  pointer )
  {}


  FT_CALLBACK_DEF( void )
  cff_cmap_encoding_done( FT_CMap  cmap )
  {}


  FT_CALLBACK_DEF( FT_UInt )
  cff_cmap_encoding_char_index( FT_CMap    cmap,
                                FT_UInt32  char_code )
  {}


  FT_CALLBACK_DEF( FT_UInt )
  cff_cmap_encoding_char_next( FT_CMap     cmap,
                               FT_UInt32  *pchar_code )
  {}


  FT_DEFINE_CMAP_CLASS(
    cff_cmap_encoding_class_rec,

    sizeof ( CFF_CMapStdRec ),

    (FT_CMap_InitFunc)     cff_cmap_encoding_init,        /* init       */
    (FT_CMap_DoneFunc)     cff_cmap_encoding_done,        /* done       */
    (FT_CMap_CharIndexFunc)cff_cmap_encoding_char_index,  /* char_index */
    (FT_CMap_CharNextFunc) cff_cmap_encoding_char_next,   /* char_next  */

    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
  )


  /*************************************************************************/
  /*************************************************************************/
  /*****                                                               *****/
  /*****              CFF SYNTHETIC UNICODE ENCODING CMAP              *****/
  /*****                                                               *****/
  /*************************************************************************/
  /*************************************************************************/

  FT_CALLBACK_DEF( const char* )
  cff_sid_to_glyph_name( void*    face_,  /* TT_Face */
                         FT_UInt  idx )
  {}


  FT_CALLBACK_DEF( FT_Error )
  cff_cmap_unicode_init( FT_CMap      cmap,     /* PS_Unicodes */
                         FT_Pointer   pointer )
  {}


  FT_CALLBACK_DEF( void )
  cff_cmap_unicode_done( FT_CMap  cmap )    /* PS_Unicodes */
  {}


  FT_CALLBACK_DEF( FT_UInt )
  cff_cmap_unicode_char_index( FT_CMap    cmap,       /* PS_Unicodes */
                               FT_UInt32  char_code )
  {}


  FT_CALLBACK_DEF( FT_UInt )
  cff_cmap_unicode_char_next( FT_CMap     cmap,        /* PS_Unicodes */
                              FT_UInt32  *pchar_code )
  {}


  FT_DEFINE_CMAP_CLASS(
    cff_cmap_unicode_class_rec,

    sizeof ( PS_UnicodesRec ),

    (FT_CMap_InitFunc)     cff_cmap_unicode_init,        /* init       */
    (FT_CMap_DoneFunc)     cff_cmap_unicode_done,        /* done       */
    (FT_CMap_CharIndexFunc)cff_cmap_unicode_char_index,  /* char_index */
    (FT_CMap_CharNextFunc) cff_cmap_unicode_char_next,   /* char_next  */

    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
  )


/* END */