Edit

kc3-lang/freetype/src/cff/cffobjs.h

Branch :

  • Browse

    Commit

  • Author : Wu, Chia-I (吳佳一)
    Date : 2006-02-15 07:44:31
    Hash : 0d565fdc
    Message : * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove unused `max_points' and `max_contours'. * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Update. * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused `max_components'. * src/truetype/ttinterp.h (TT_ExecContextRec): Remove unused `loadSize' and `loadStack'. * src/truetype/ttinterp.c (TT_Done_Context, TT_Load_Context), src/sfnt/ttload.c (tt_face_load_maxp): Update. * src/cff/cffobjs.h (cff_size_select), src/sfnt/sfdriver.c (sfnt_interface), src/truetype/ttdriver.c (tt_size_request): Fix compiler errors/warnings when TT_CONFIG_OPTION_EMBEDDED_BITMAPS is not defined. * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics): Fix possible segment faults for the non-FT_OPTIMIZE_MEMORY'ed versions. (finally!) For most OpenType tables, `tt_face_load_xxxx' simply loads the table and `face->root' is set later in `sfnt_load_face'. Here, we try to make this work for _all_ tables. * src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c, src/sfnt/ttload.c, src/sfnt/ttmtx.c: all `tt_face_load_xxxx' should load the table and then exit. Error handling or setting face->root is done later in `sfnt_load_face'. Pretty trace messages. * src/sfnt/sfobjs.c (sfnt_load_face): Work harder. Mac bitmap-only fonts are not scalable. Check that `face->header.Units_Per_EM' is not zero. (LOAD_, LOADM_): Pretty trace messages. * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Read metrics from `eblc'. * src/sfnt/ttcmap.c (tt_face_build_cmaps), src/sfnt/ttpost.c (load_format_20, load_format_25, tt_face_get_ps_name): Use face->max_profile.numGlyphs, instead of face->root.num_glyphs.

  • src/cff/cffobjs.h
  • /***************************************************************************/
    /*                                                                         */
    /*  cffobjs.h                                                              */
    /*                                                                         */
    /*    OpenType objects manager (specification).                            */
    /*                                                                         */
    /*  Copyright 1996-2001, 2002, 2003, 2004, 2006 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 __CFFOBJS_H__
    #define __CFFOBJS_H__
    
    
    #include <ft2build.h>
    #include FT_INTERNAL_OBJECTS_H
    #include "cfftypes.h"
    #include FT_INTERNAL_TRUETYPE_TYPES_H
    #include FT_SERVICE_POSTSCRIPT_CMAPS_H
    
    
    FT_BEGIN_HEADER
    
    
      /*************************************************************************/
      /*                                                                       */
      /* <Type>                                                                */
      /*    CFF_Driver                                                         */
      /*                                                                       */
      /* <Description>                                                         */
      /*    A handle to an OpenType driver object.                             */
      /*                                                                       */
      typedef struct CFF_DriverRec_*  CFF_Driver;
    
      typedef TT_Face  CFF_Face;
    
    
      /*************************************************************************/
      /*                                                                       */
      /* <Type>                                                                */
      /*    CFF_Size                                                           */
      /*                                                                       */
      /* <Description>                                                         */
      /*    A handle to an OpenType size object.                               */
      /*                                                                       */
      typedef struct  CFF_SizeRec_
      {
        FT_SizeRec       root;
        FT_ULong         strike_index;    /* 0xFFFFFFFF to indicate invalid */
    
      } CFF_SizeRec, *CFF_Size;
    
    
      /*************************************************************************/
      /*                                                                       */
      /* <Type>                                                                */
      /*    CFF_GlyphSlot                                                      */
      /*                                                                       */
      /* <Description>                                                         */
      /*    A handle to an OpenType glyph slot object.                         */
      /*                                                                       */
      typedef struct  CFF_GlyphSlotRec_
      {
        FT_GlyphSlotRec  root;
    
        FT_Bool          hint;
        FT_Bool          scaled;
    
        FT_Fixed         x_scale;
        FT_Fixed         y_scale;
    
      } CFF_GlyphSlotRec, *CFF_GlyphSlot;
    
    
    
      /*************************************************************************/
      /*                                                                       */
      /* Subglyph transformation record.                                       */
      /*                                                                       */
      typedef struct  CFF_Transform_
      {
        FT_Fixed    xx, xy;     /* transformation matrix coefficients */
        FT_Fixed    yx, yy;
        FT_F26Dot6  ox, oy;     /* offsets        */
    
      } CFF_Transform;
    
    
      /***********************************************************************/
      /*                                                                     */
      /* TrueType driver class.                                              */
      /*                                                                     */
      typedef struct  CFF_DriverRec_
      {
        FT_DriverRec  root;
        void*         extension_component;
    
      } CFF_DriverRec;
    
    
      FT_LOCAL( FT_Error )
      cff_size_init( FT_Size  size );           /* CFF_Size */
    
      FT_LOCAL( void )
      cff_size_done( FT_Size  size );           /* CFF_Size */
    
      FT_LOCAL( FT_Error )
      cff_size_request( FT_Size          size,
                        FT_Size_Request  req );
    
    #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
    
      FT_LOCAL( FT_Error )
      cff_size_select( FT_Size   size,
                       FT_ULong  index );
    
    #endif
    
      FT_LOCAL( void )
      cff_slot_done( FT_GlyphSlot  slot );
    
      FT_LOCAL( FT_Error )
      cff_slot_init( FT_GlyphSlot  slot );
    
    
      /*************************************************************************/
      /*                                                                       */
      /* Face functions                                                        */
      /*                                                                       */
      FT_LOCAL( FT_Error )
      cff_face_init( FT_Stream      stream,
                     FT_Face        face,           /* CFF_Face */
                     FT_Int         face_index,
                     FT_Int         num_params,
                     FT_Parameter*  params );
    
      FT_LOCAL( void )
      cff_face_done( FT_Face  face );               /* CFF_Face */
    
    
      /*************************************************************************/
      /*                                                                       */
      /* Driver functions                                                      */
      /*                                                                       */
      FT_LOCAL( FT_Error )
      cff_driver_init( FT_Module  module );
    
      FT_LOCAL( void )
      cff_driver_done( FT_Module  module );
    
    
    FT_END_HEADER
    
    #endif /* __CFFOBJS_H__ */
    
    
    /* END */