godot/thirdparty/freetype/src/type1/t1driver.c

/****************************************************************************
 *
 * t1driver.c
 *
 *   Type 1 driver interface (body).
 *
 * Copyright (C) 1996-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 "t1driver.h"
#include "t1gload.h"
#include "t1load.h"

#include "t1errors.h"

#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.h"
#endif

#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftstream.h>
#include <freetype/internal/fthash.h>
#include <freetype/internal/ftpsprop.h>
#include <freetype/ftdriver.h>

#include <freetype/internal/services/svmm.h>
#include <freetype/internal/services/svgldict.h>
#include <freetype/internal/services/svfntfmt.h>
#include <freetype/internal/services/svpostnm.h>
#include <freetype/internal/services/svpscmap.h>
#include <freetype/internal/services/svpsinfo.h>
#include <freetype/internal/services/svprop.h>
#include <freetype/internal/services/svkern.h>


  /**************************************************************************
   *
   * The macro FT_COMPONENT is used in trace mode.  It is an implicit
   * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
   * messages during execution.
   */
#undef  FT_COMPONENT
#define FT_COMPONENT

  /*
   * GLYPH DICT SERVICE
   *
   */

  FT_CALLBACK_DEF( FT_Error )
  t1_get_glyph_name( FT_Face     face,        /* T1_Face */
                     FT_UInt     glyph_index,
                     FT_Pointer  buffer,
                     FT_UInt     buffer_max )
  {}


  FT_CALLBACK_DEF( FT_UInt )
  t1_get_name_index( FT_Face           face,        /* T1_Face */
                     const FT_String*  glyph_name )
  {}


  static const FT_Service_GlyphDictRec  t1_service_glyph_dict =;


  /*
   * POSTSCRIPT NAME SERVICE
   *
   */

  static const char*
  t1_get_ps_name( FT_Face  face )    /* T1_Face */
  {}


  static const FT_Service_PsFontNameRec  t1_service_ps_name =;


  /*
   * MULTIPLE MASTERS SERVICE
   *
   */

#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
  static const FT_Service_MultiMastersRec  t1_service_multi_masters =;
#endif


  /*
   * POSTSCRIPT INFO SERVICE
   *
   */

  static FT_Error
  t1_ps_get_font_info( FT_Face          face,
                       PS_FontInfoRec*  afont_info )
  {}


  static FT_Error
  t1_ps_get_font_extra( FT_Face           face,
                        PS_FontExtraRec*  afont_extra )
  {}


  static FT_Int
  t1_ps_has_glyph_names( FT_Face  face )
  {}


  static FT_Error
  t1_ps_get_font_private( FT_Face         face,
                          PS_PrivateRec*  afont_private )
  {}


  static FT_Long
  t1_ps_get_font_value( FT_Face       face,
                        PS_Dict_Keys  key,
                        FT_UInt       idx,
                        void         *value,
                        FT_Long       value_len_ )
  {}


  static const FT_Service_PsInfoRec  t1_service_ps_info =;


#ifndef T1_CONFIG_OPTION_NO_AFM
  static const FT_Service_KerningRec  t1_service_kerning =;
#endif


  /*
   * PROPERTY SERVICE
   *
   */

  FT_DEFINE_SERVICE_PROPERTIESREC(
    t1_service_properties,

    ps_property_set,  /* FT_Properties_SetFunc set_property */
    ps_property_get   /* FT_Properties_GetFunc get_property */
  )

  /*
   * SERVICE LIST
   *
   */

  static const FT_ServiceDescRec  t1_services[] =;


  FT_CALLBACK_DEF( FT_Module_Interface )
  Get_Interface( FT_Module         module,
                 const FT_String*  t1_interface )
  {}


#ifndef T1_CONFIG_OPTION_NO_AFM

  /**************************************************************************
   *
   * @Function:
   *   Get_Kerning
   *
   * @Description:
   *   A driver method used to return the kerning vector between two
   *   glyphs of the same face.
   *
   * @Input:
   *   face ::
   *     A handle to the source face object.
   *
   *   left_glyph ::
   *     The index of the left glyph in the kern pair.
   *
   *   right_glyph ::
   *     The index of the right glyph in the kern pair.
   *
   * @Output:
   *   kerning ::
   *     The kerning vector.  This is in font units for
   *     scalable formats, and in pixels for fixed-sizes
   *     formats.
   *
   * @Return:
   *   FreeType error code.  0 means success.
   *
   * @Note:
   *   Only horizontal layouts (left-to-right & right-to-left) are
   *   supported by this function.  Other layouts, or more sophisticated
   *   kernings are out of scope of this method (the basic driver
   *   interface is meant to be simple).
   *
   *   They can be implemented by format-specific interfaces.
   */
  static FT_Error
  Get_Kerning( FT_Face     t1face,        /* T1_Face */
               FT_UInt     left_glyph,
               FT_UInt     right_glyph,
               FT_Vector*  kerning )
  {}


#endif /* T1_CONFIG_OPTION_NO_AFM */


  FT_CALLBACK_TABLE_DEF
  const FT_Driver_ClassRec  t1_driver_class =;


/* END */