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

/****************************************************************************
 *
 * cffparse.c
 *
 *   CFF token stream parser (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 "cffparse.h"
#include <freetype/internal/ftstream.h>
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftcalc.h>
#include <freetype/internal/psaux.h>
#include <freetype/ftlist.h>

#include "cfferrs.h"
#include "cffload.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


  FT_LOCAL_DEF( FT_Error )
  cff_parser_init( CFF_Parser  parser,
                   FT_UInt     code,
                   void*       object,
                   FT_Library  library,
                   FT_UInt     stackSize,
                   FT_UShort   num_designs,
                   FT_UShort   num_axes )
  {}


  FT_LOCAL_DEF( void )
  cff_parser_done( CFF_Parser  parser )
  {}


  /* The parser limit checks in the next two functions are supposed */
  /* to detect the immediate crossing of the stream boundary.  They */
  /* shall not be triggered from the distant t2_strings buffers.    */

  /* read an integer */
  static FT_Long
  cff_parse_integer( FT_Byte*  start,
                     FT_Byte*  limit )
  {}


  static const FT_Long power_tens[] =;

  /* maximum values allowed for multiplying      */
  /* with the corresponding `power_tens' element */
  static const FT_Long power_ten_limits[] =;


  /* read a real */
  static FT_Fixed
  cff_parse_real( FT_Byte*  start,
                  FT_Byte*  limit,
                  FT_Long   power_ten,
                  FT_Long*  scaling )
  {}


  /* read a number, either integer or real */
  FT_LOCAL_DEF( FT_Long )
  cff_parse_num( CFF_Parser  parser,
                 FT_Byte**   d )
  {}


  /* read a floating point number, either integer or real */
  static FT_Fixed
  do_fixed( CFF_Parser  parser,
            FT_Byte**   d,
            FT_Long     scaling )
  {}


  /* read a floating point number, either integer or real */
  FT_LOCAL_DEF( FT_Fixed )
  cff_parse_fixed( CFF_Parser  parser,
                   FT_Byte**   d )
  {}


  /* read a floating point number, either integer or real, */
  /* but return `10^scaling' times the number read in      */
  static FT_Fixed
  cff_parse_fixed_scaled( CFF_Parser  parser,
                          FT_Byte**   d,
                          FT_Long     scaling )
  {}


  /* read a floating point number, either integer or real,     */
  /* and return it as precise as possible -- `scaling' returns */
  /* the scaling factor (as a power of 10)                     */
  static FT_Fixed
  cff_parse_fixed_dynamic( CFF_Parser  parser,
                           FT_Byte**   d,
                           FT_Long*    scaling )
  {}


  static FT_Error
  cff_parse_font_matrix( CFF_Parser  parser )
  {}


  static FT_Error
  cff_parse_font_bbox( CFF_Parser  parser )
  {}


  static FT_Error
  cff_parse_private_dict( CFF_Parser  parser )
  {}


  /* The `MultipleMaster' operator comes before any  */
  /* top DICT operators that contain T2 charstrings. */

  static FT_Error
  cff_parse_multiple_master( CFF_Parser  parser )
  {}


  static FT_Error
  cff_parse_cid_ros( CFF_Parser  parser )
  {}


  static FT_Error
  cff_parse_vsindex( CFF_Parser  parser )
  {}


  static FT_Error
  cff_parse_blend( CFF_Parser  parser )
  {}


  /* maxstack operator increases parser and operand stacks for CFF2 */
  static FT_Error
  cff_parse_maxstack( CFF_Parser  parser )
  {}


#define CFF_FIELD_NUM( code, name, id )
#define CFF_FIELD_FIXED( code, name, id )
#define CFF_FIELD_FIXED_1000( code, name, id )
#define CFF_FIELD_STRING( code, name, id )
#define CFF_FIELD_BOOL( code, name, id )


#undef  CFF_FIELD
#undef  CFF_FIELD_DELTA


#ifndef FT_DEBUG_LEVEL_TRACE


#define CFF_FIELD_CALLBACK( code, name, id )

#define CFF_FIELD_BLEND( code, id )

#define CFF_FIELD( code, name, id, kind )

#define CFF_FIELD_DELTA( code, name, max, id )

  static const CFF_Field_Handler  cff_field_handlers[] =;


#else /* FT_DEBUG_LEVEL_TRACE */



#define CFF_FIELD_CALLBACK

#define CFF_FIELD_BLEND

#define CFF_FIELD

#define CFF_FIELD_DELTA

  static const CFF_Field_Handler  cff_field_handlers[] =
  {

#include "cfftoken.h"

    { 0, 0, 0, 0, 0, 0, 0, 0 }
  };


#endif /* FT_DEBUG_LEVEL_TRACE */


  FT_LOCAL_DEF( FT_Error )
  cff_parser_run( CFF_Parser  parser,
                  FT_Byte*    start,
                  FT_Byte*    limit )
  {}


/* END */