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

/****************************************************************************
 *
 * cffparse.h
 *
 *   CFF token stream parser (specification)
 *
 * 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.
 *
 */


#ifndef CFFPARSE_H_
#define CFFPARSE_H_


#include <freetype/internal/cfftypes.h>
#include <freetype/internal/ftobjs.h>


FT_BEGIN_HEADER


  /* CFF uses constant parser stack size; */
  /* CFF2 can increase from default 193   */
#define CFF_MAX_STACK_DEPTH

  /*
   * There are plans to remove the `maxstack' operator in a forthcoming
   * revision of the CFF2 specification, increasing the (then static) stack
   * size to 513.  By making the default stack size equal to the maximum
   * stack size, the operator is essentially disabled, which has the
   * desired effect in FreeType.
   */
#define CFF2_MAX_STACK
#define CFF2_DEFAULT_STACK

#define CFF_CODE_TOPDICT
#define CFF_CODE_PRIVATE
#define CFF2_CODE_TOPDICT
#define CFF2_CODE_FONTDICT
#define CFF2_CODE_PRIVATE


  CFF_Parser;


  FT_LOCAL( FT_Long )
  cff_parse_num( CFF_Parser  parser,
                 FT_Byte**   d );

  FT_LOCAL( FT_Fixed )
  cff_parse_fixed( CFF_Parser  parser,
                   FT_Byte**   d );

  FT_LOCAL( 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( void )
  cff_parser_done( CFF_Parser  parser );

  FT_LOCAL( FT_Error )
  cff_parser_run( CFF_Parser  parser,
                  FT_Byte*    start,
                  FT_Byte*    limit );


  enum
  {};


  /* now generate handlers for the most simple fields */
  CFF_Field_Reader;

  CFF_Field_Handler;


FT_END_HEADER


#endif /* CFFPARSE_H_ */


/* END */