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; |
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 |
|
|
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; |
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 */ |
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), |
1007 |
( subglyph->flags & SCALED_COMPONENT_OFFSET ) ) |
( subglyph->flags & SCALED_COMPONENT_OFFSET ) ) |
1008 |
#endif |
#endif |
1009 |
{ |
{ |
1010 |
|
|
1011 |
#if 0 |
#if 0 |
1012 |
|
|
1013 |
/*************************************************************************/ |
/*************************************************************************/ |
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 ) + |
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; |
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 |
|
|
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; |
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 |
|
|