/[freetype]/freetype2/src/truetype/ttgload.c
ViewVC logotype

Diff of /freetype2/src/truetype/ttgload.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.151 by freetype, Fri Sep 23 13:22:10 2005 UTC revision 1.152 by wl, Wed Sep 28 07:34:45 2005 UTC
# Line 755  Line 755 
755    /*                                                                       */    /*                                                                       */
756  #define cur_to_org( n, zone ) \  #define cur_to_org( n, zone ) \
757            FT_ARRAY_COPY( (zone)->org, (zone)->cur, (n) )            FT_ARRAY_COPY( (zone)->org, (zone)->cur, (n) )
758    
759    static FT_Error    static FT_Error
760    TT_Hint_Glyph( TT_Loader     loader,    TT_Hint_Glyph( TT_Loader  loader,
761                   FT_Bool       is_composite )                   FT_Bool    is_composite )
762    {    {
763      TT_GlyphZone  zone = &loader->zone;      TT_GlyphZone  zone = &loader->zone;
764      FT_Pos        origin;      FT_Pos        origin;
765    
     FT_UNUSED(is_composite);  
   
766  #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER  #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
   
767      FT_UInt       n_ins;      FT_UInt       n_ins;
768    #else
769        FT_UNUSED( is_composite );
770    #endif
771    
772    
773    #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
774      n_ins = loader->glyph->control_len;      n_ins = loader->glyph->control_len;
   
775  #endif  #endif
776    
777      origin = zone->cur[zone->n_points - 4].x;      origin = zone->cur[zone->n_points - 4].x;
# Line 779  Line 780 
780        translate_array( zone->n_points, zone->cur, origin, 0 );        translate_array( zone->n_points, zone->cur, origin, 0 );
781    
782  #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER  #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
   
783      /* save original point positioin in org */      /* save original point positioin in org */
784      if ( n_ins > 0 )      if ( n_ins > 0 )
785        cur_to_org( zone->n_points, zone );        cur_to_org( zone->n_points, zone );
   
786  #endif  #endif
787    
788      /* round pp2 and pp4 */      /* round pp2 and pp4 */
789      zone->cur[zone->n_points - 3].x = FT_PIX_ROUND( zone->cur[zone->n_points - 3].x );      zone->cur[zone->n_points - 3].x =
790      zone->cur[zone->n_points - 1].y = FT_PIX_ROUND( zone->cur[zone->n_points - 1].y );        FT_PIX_ROUND( zone->cur[zone->n_points - 3].x );
791        zone->cur[zone->n_points - 1].y =
792          FT_PIX_ROUND( zone->cur[zone->n_points - 1].y );
793    
794  #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER  #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
795    
# Line 803  Line 804 
804        if ( error )        if ( error )
805          return error;          return error;
806    
807        loader->exec->is_composite     = is_composite;        loader->exec->is_composite = is_composite;
808        loader->exec->pts              = *zone;        loader->exec->pts          = *zone;
809    
810        debug = !( loader->load_flags & FT_LOAD_NO_SCALE ) &&        debug = !( loader->load_flags & FT_LOAD_NO_SCALE ) &&
811                ( (TT_Size)loader->size )->debug;                ( (TT_Size)loader->size )->debug;
# Line 842  Line 843 
843    static FT_Error    static FT_Error
844    TT_Process_Simple_Glyph( TT_Loader  loader )    TT_Process_Simple_Glyph( TT_Loader  loader )
845    {    {
846      FT_GlyphLoader  gloader  = loader->gloader;      FT_GlyphLoader  gloader = loader->gloader;
847      FT_Error        error    = TT_Err_Ok;      FT_Error        error   = TT_Err_Ok;
848      FT_Outline*     outline;      FT_Outline*     outline;
849      FT_UInt         n_points;      FT_UInt         n_points;
850    
851    
852      outline = &gloader->current.outline;      outline  = &gloader->current.outline;
853      n_points = outline->n_points;      n_points = outline->n_points;
854    
855      /* set phantom points */      /* set phantom points */
# Line 870  Line 871 
871      if ( ((TT_Face)loader->face)->doblend )      if ( ((TT_Face)loader->face)->doblend )
872      {      {
873        /* Deltas apply to the unscaled data. */        /* Deltas apply to the unscaled data. */
874        FT_Vector*    deltas;        FT_Vector*  deltas;
875        FT_Memory     memory = loader->face->memory;        FT_Memory   memory = loader->face->memory;
876        FT_UInt       i;        FT_UInt     i;
877    
878    
879        error = TT_Vary_Get_Glyph_Deltas( (TT_Face)(loader->face),        error = TT_Vary_Get_Glyph_Deltas( (TT_Face)(loader->face),
# Line 1006  Line 1007 
1007              ( subglyph->flags & SCALED_COMPONENT_OFFSET ) )              ( subglyph->flags & SCALED_COMPONENT_OFFSET ) )
1008  #endif  #endif
1009        {        {
1010    
1011  #if 0  #if 0
1012    
1013    /*************************************************************************/    /*************************************************************************/
# Line 1041  Line 1043 
1043                                   FT_MulFix( subglyph->transform.xx,                                   FT_MulFix( subglyph->transform.xx,
1044                                              subglyph->transform.xx ) +                                              subglyph->transform.xx ) +
1045                                   FT_MulFix( subglyph->transform.xy,                                   FT_MulFix( subglyph->transform.xy,
1046                                              subglyph->transform.xy) );                                              subglyph->transform.xy ) );
1047          FT_Fixed  mac_yscale = FT_SqrtFixed(          FT_Fixed  mac_yscale = FT_SqrtFixed(
1048                                   FT_MulFix( subglyph->transform.yy,                                   FT_MulFix( subglyph->transform.yy,
1049                                              subglyph->transform.yy ) +                                              subglyph->transform.yy ) +
# Line 1128  Line 1130 
1130    
1131    
1132        /* TT_Load_Composite_Glyph only gives us the offset of instructions */        /* TT_Load_Composite_Glyph only gives us the offset of instructions */
1133        /* so we read them here */        /* so we read them here                                             */
1134        if ( FT_STREAM_SEEK( loader->ins_pos ) ||        if ( FT_STREAM_SEEK( loader->ins_pos ) ||
1135             FT_READ_USHORT( n_ins )           )             FT_READ_USHORT( n_ins )           )
1136          return error;          return error;
# Line 1200  Line 1202 
1202      FT_Bool         opened_frame = 0;      FT_Bool         opened_frame = 0;
1203    
1204  #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT  #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
   
1205      FT_Vector*      deltas       = NULL;      FT_Vector*      deltas       = NULL;
   
1206  #endif  #endif
1207    
1208  #ifdef FT_CONFIG_OPTION_INCREMENTAL  #ifdef FT_CONFIG_OPTION_INCREMENTAL
   
1209      FT_StreamRec    inc_stream;      FT_StreamRec    inc_stream;
1210      FT_Data         glyph_data;      FT_Data         glyph_data;
1211      FT_Bool         glyph_data_loaded = 0;      FT_Bool         glyph_data_loaded = 0;
   
1212  #endif  #endif
1213    
1214    
# Line 1278  Line 1276 
1276          left_bearing  = (FT_Short)metrics.bearing_x;          left_bearing  = (FT_Short)metrics.bearing_x;
1277          advance_width = (FT_UShort)metrics.advance;          advance_width = (FT_UShort)metrics.advance;
1278    
1279  # if 0  #if 0
1280    
1281          /* GWW: Do I do the same for vertical metrics ??? */          /* GWW: Do I do the same for vertical metrics? */
1282          metrics.bearing_x = 0;          metrics.bearing_x = 0;
1283          metrics.bearing_y = top_bearing;          metrics.bearing_y = top_bearing;
1284          metrics.advance = advance_height;          metrics.advance = advance_height;
# Line 1292  Line 1290 
1290          top_bearing  = (FT_Short)metrics.bearing_y;          top_bearing  = (FT_Short)metrics.bearing_y;
1291          advance_height = (FT_UShort)metrics.advance;          advance_height = (FT_UShort)metrics.advance;
1292    
1293  # endif  #endif /* 0 */
1294    
1295        }        }
1296    

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.152

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26