tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

t42parse.h (2029B)


      1 /****************************************************************************
      2 *
      3 * t42parse.h
      4 *
      5 *   Type 42 font parser (specification).
      6 *
      7 * Copyright (C) 2002-2025 by
      8 * Roberto Alameda.
      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 T42PARSE_H_
     20 #define T42PARSE_H_
     21 
     22 
     23 #include "t42objs.h"
     24 #include <freetype/internal/psaux.h>
     25 
     26 
     27 FT_BEGIN_HEADER
     28 
     29  typedef struct  T42_ParserRec_
     30  {
     31    PS_ParserRec  root;
     32    FT_Stream     stream;
     33 
     34    FT_Byte*      base_dict;
     35    FT_Long       base_len;
     36 
     37    FT_Bool       in_memory;
     38 
     39  } T42_ParserRec, *T42_Parser;
     40 
     41 
     42  typedef struct  T42_Loader_
     43  {
     44    T42_ParserRec  parser;          /* parser used to read the stream */
     45 
     46    FT_Int         num_chars;       /* number of characters in encoding */
     47    PS_TableRec    encoding_table;  /* PS_Table used to store the       */
     48                                    /* encoding character names         */
     49 
     50    FT_Int         num_glyphs;
     51    PS_TableRec    glyph_names;
     52    PS_TableRec    charstrings;
     53    PS_TableRec    swap_table;      /* For moving .notdef glyph to index 0. */
     54 
     55  } T42_LoaderRec, *T42_Loader;
     56 
     57 
     58  FT_LOCAL( FT_Error )
     59  t42_parser_init( T42_Parser     parser,
     60                   FT_Stream      stream,
     61                   FT_Memory      memory,
     62                   PSAux_Service  psaux );
     63 
     64  FT_LOCAL( void )
     65  t42_parser_done( T42_Parser  parser );
     66 
     67 
     68  FT_LOCAL( FT_Error )
     69  t42_parse_dict( T42_Face    face,
     70                  T42_Loader  loader,
     71                  FT_Byte*    base,
     72                  FT_Long     size );
     73 
     74 
     75  FT_LOCAL( void )
     76  t42_loader_init( T42_Loader  loader,
     77                   T42_Face    face );
     78 
     79  FT_LOCAL( void )
     80  t42_loader_done( T42_Loader  loader );
     81 
     82 
     83 /* */
     84 
     85 FT_END_HEADER
     86 
     87 
     88 #endif /* T42PARSE_H_ */
     89 
     90 
     91 /* END */