shithub: freetype+ttf2subf

ref: 9f95babf3e1be13c2f7ecda60938698b7e2da7f6
dir: /src/type42/t42objs.h/

View raw version
#ifndef __TYPE42_OBJS_H__
#define __TYPE42_OBJS_H__

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TYPE1_TABLES_H
#include FT_INTERNAL_TYPE1_TYPES_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DRIVER_H
#include FT_INTERNAL_POSTSCRIPT_NAMES_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H

FT_BEGIN_HEADER

 /* Type42 face */
  typedef struct  T42_FaceRec_
  {
    FT_FaceRec     root;
    T1_FontRec     type1;
    const void*    psnames;
    const void*    psaux;
    const void*    afm_data;

    FT_CharMapRec  charmaprecs[2];
    FT_CharMap     charmaps[2];
    PS_Unicodes    unicode_map;

    FT_Byte*       ttf_data;
    FT_ULong       ttf_size;
    FT_Face        ttf_face;

  } T42_FaceRec, *T42_Face;



 /* Type42 size */
  typedef struct  T42_SizeRec_
  {
    FT_SizeRec  root;
    FT_Size     ttsize;

  } T42_SizeRec, *T42_Size;


 /* Type42 slot */
  typedef struct  T42_GlyphSlotRec_
  {
    FT_GlyphSlotRec  root;
    FT_GlyphSlot     ttslot;

  } T42_GlyphSlotRec, *T42_GlyphSlot;


 /* Type 42 driver */
  typedef struct  T42_DriverRec_
  {
    FT_DriverRec     root;
    FT_Driver_Class  ttclazz;
    void*            extension_component;

  } T42_DriverRec, *T42_Driver;

 /* */

  FT_LOCAL( FT_Error )
  T42_Face_Init( FT_Stream      stream,
                 T42_Face       face,
                 FT_Int         face_index,
                 FT_Int         num_params,
                 FT_Parameter*  params );


  FT_LOCAL( void )
  T42_Face_Done( T42_Face  face );


  FT_LOCAL( FT_Error )
  T42_Size_Init( T42_Size  size );


  FT_LOCAL( FT_Error )
  T42_Size_SetChars( T42_Size    size,
                     FT_F26Dot6  char_width,
                     FT_F26Dot6  char_height,
                     FT_UInt     horz_resolution,
                     FT_UInt     vert_resolution );

  FT_LOCAL( FT_Error )
  T42_Size_SetPixels( T42_Size  size,
                      FT_UInt   pixel_width,
                      FT_UInt   pixel_height );

  FT_LOCAL( void )
  T42_Size_Done( T42_Size  size );


  FT_LOCAL( FT_Error )
  T42_GlyphSlot_Init( T42_GlyphSlot  slot );


  FT_LOCAL( FT_Error )
  T42_GlyphSlot_Load( FT_GlyphSlot  glyph,
                      FT_Size       size,
                      FT_Int        glyph_index,
                      FT_Int        load_flags );

  FT_LOCAL( void )
  T42_GlyphSlot_Done( T42_GlyphSlot slot );


  FT_LOCAL( FT_UInt )
  T42_CMap_CharIndex( FT_CharMap  charmap,
                      FT_Long     charcode );

  FT_LOCAL( FT_Long )
  T42_CMap_CharNext( FT_CharMap  charmap,
                     FT_Long     charcode );


  FT_LOCAL( FT_Error )
  T42_Driver_Init( T42_Driver  driver );

  FT_LOCAL( void )
  T42_Driver_Done( T42_Driver  driver );

 /* */

FT_END_HEADER

#endif /* __TYPE42_OBJS_H__ */