/***************************************************************************/
/*                                                                         */
/*  vcobjs.h                                                               */
/*                                                                         */
/*    VCFT objects manager (specification).                                */
/*                                                                         */
/*  Copyright 2002 by                                                      */
/*  Arphic Technology co.,Ltd                                              */
/*  Coding by Koffman Huang 2002.06.10                                     */
/*                                                                         */
/***************************************************************************/

#ifndef __VCOBJS_H__
#define __VCOBJS_H__

/* remark for vcft.c
#include <ft2build.h>
*/
#include FT_INTERNAL_OBJECTS_H
#include FT_CONFIG_CONFIG_H
#include FT_INTERNAL_VCFT_TYPES_H

FT_BEGIN_HEADER

  typedef struct {
    short int   num_bitmap;
    short       width;
    short       height;
    unsigned short  start_code;
    unsigned short  final_code;
    long            offset;
    unsigned short int  fixed;
    unsigned short int  one_two;
    unsigned short int  underline;
    unsigned short int  baseline;
    unsigned short int  bitmap_type;
  }   bitmap_type;

  typedef struct  VCFT_SizeRec_
  {
    FT_SizeRec  root;
    FT_Bool     valid;

  } VCFT_SizeRec;


  typedef struct  VCFT_GlyphSlotRec_
  {
    FT_GlyphSlotRec  root;

    FT_Bool          hint;
    FT_Bool          scaled;

    FT_Fixed         x_scale;
    FT_Fixed         y_scale;

  } VCFT_GlyphSlotRec;

  /*************************************************************************/
  /*                                                                       */
  /* Face functions                                                        */
  /*                                                                       */
  FT_LOCAL( FT_Error )
  VCFT_Face_Init( FT_Stream      stream,
                  VCFT_Face      vcface,
                  FT_Int         face_index,
                  FT_Int         num_params,
                  FT_Parameter*  params );

  FT_LOCAL( void )
  VCFT_Face_Done( FT_Face  face );


  /*************************************************************************/
  /*                                                                       */
  /* Glyph slot function                                                   */
  /*                                                                       */
  FT_LOCAL( void )
  VCFT_GlyphSlot_Done( FT_GlyphSlot  slot );

  FT_LOCAL( FT_Error )
  VCFT_GlyphSlot_Init( FT_GlyphSlot   slot );

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


  /*************************************************************************/
  /*                                                                       */
  /* Size functions                                                        */
  /*                                                                       */
  FT_LOCAL( FT_Error )
  VCFT_Size_Init( FT_Size  size );

  FT_LOCAL( void )
  VCFT_Size_Done( FT_Size  size );

  FT_Error
  VCFT_Set_Char_Sizes( FT_Size size,FT_F26Dot6  char_width,FT_F26Dot6 char_height,FT_UInt horz_resolution,FT_UInt vert_resolution );

  FT_LOCAL( FT_Error )
  VCFT_Size_Reset( FT_Size  size );


/*************************************************************************/
/*                                                                       */
/* Driver functions                                                      */
/*                                                                       */
  FT_LOCAL( FT_Error )
  VCFT_Driver_Init( FT_Driver  driver );

  FT_LOCAL( void )
  VCFT_Driver_Done( FT_Driver  driver );

/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/****                                                                 ****/
/****                                                                 ****/
/****             C H A R A C T E R   M A P P I N G S                 ****/
/****                                                                 ****/
/****                                                                 ****/
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
FT_UInt Get_Char_Index(FT_CMap cmap, FT_UInt32 charcode);

  FT_CALLBACK_DEF( FT_UInt )
  Get_Char_Next( FT_CMap    cmap,
                 FT_UInt32  *acharcode );

  FT_CALLBACK_DEF( void )
  Vcft_Cmap_Done( FT_CMap  cmap );               

FT_END_HEADER

#endif /* __T1OBJS_H__ */


/* END */

