|
|
|
@ -66,25 +66,25 @@ |
|
|
|
|
|
|
|
|
|
typedef enum FT_PaintFormat_Internal_ |
|
|
|
|
{ |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID = 3, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT = 5, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT = 7, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT = 9, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSFORM = 13, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSLATE = 15, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE = 17, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_CENTER = 18, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_CENTER = 19, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_UNIFORM = 20, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM = 21, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_UNIFORM_CENTER = 22, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM_CENTER = 23, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE = 25, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_ROTATE_CENTER = 26, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE_CENTER = 27, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW = 29, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER = 30, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW_CENTER = 31, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID = 3, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT = 5, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT = 7, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT = 9, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSFORM = 13, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSLATE = 15, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE = 17, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_CENTER = 18, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_CENTER = 19, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_UNIFORM = 20, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM = 21, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SCALE_UNIFORM_CENTER = 22, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM_CENTER = 23, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE = 25, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_ROTATE_CENTER = 26, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE_CENTER = 27, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW = 29, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER = 30, |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW_CENTER = 31, |
|
|
|
|
|
|
|
|
|
} FT_PaintFormat_Internal; |
|
|
|
|
|
|
|
|
@ -177,6 +177,7 @@ |
|
|
|
|
FT_ULong colr_offset_in_stream; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* `COLR' always needs `CPAL' */ |
|
|
|
|
if ( !face->cpal ) |
|
|
|
|
return FT_THROW( Invalid_File_Format ); |
|
|
|
@ -334,11 +335,11 @@ |
|
|
|
|
if ( colr->var_store.axisCount && var_idx_map_offset ) |
|
|
|
|
{ |
|
|
|
|
error = mm->load_delta_set_idx_map( |
|
|
|
|
FT_FACE( face ), |
|
|
|
|
colr_offset_in_stream + var_idx_map_offset, |
|
|
|
|
&colr->delta_set_idx_map, |
|
|
|
|
&colr->var_store, |
|
|
|
|
table_size ); |
|
|
|
|
FT_FACE( face ), |
|
|
|
|
colr_offset_in_stream + var_idx_map_offset, |
|
|
|
|
&colr->delta_set_idx_map, |
|
|
|
|
&colr->var_store, |
|
|
|
|
table_size ); |
|
|
|
|
if ( error != FT_Err_Ok ) |
|
|
|
|
goto InvalidTable; |
|
|
|
|
} |
|
|
|
@ -681,7 +682,7 @@ |
|
|
|
|
|
|
|
|
|
else if ( apaint->format == FT_COLR_PAINTFORMAT_SOLID || |
|
|
|
|
(FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID ) |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID ) |
|
|
|
|
{ |
|
|
|
|
ENSURE_READ_BYTES( 4 ); |
|
|
|
|
apaint->u.solid.color.palette_index = FT_NEXT_USHORT( p ); |
|
|
|
@ -689,7 +690,7 @@ |
|
|
|
|
|
|
|
|
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT |
|
|
|
|
if ( (FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID ) |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID ) |
|
|
|
|
{ |
|
|
|
|
ENSURE_READ_BYTES( 4 ); |
|
|
|
|
var_index_base = FT_NEXT_ULONG( p ); |
|
|
|
@ -725,10 +726,10 @@ |
|
|
|
|
if ( !get_child_table_pointer( colr, paint_base, &p, &child_table_p ) ) |
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
if ( apaint->format == FT_COLR_PAINTFORMAT_LINEAR_GRADIENT || |
|
|
|
|
if ( apaint->format == FT_COLR_PAINTFORMAT_LINEAR_GRADIENT || |
|
|
|
|
( do_read_var = |
|
|
|
|
( (FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT ) ) ) |
|
|
|
|
( (FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT ) ) ) |
|
|
|
|
{ |
|
|
|
|
if ( !read_color_line( colr, |
|
|
|
|
child_table_p, |
|
|
|
@ -773,10 +774,10 @@ |
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else if ( apaint->format == FT_COLR_PAINTFORMAT_RADIAL_GRADIENT || |
|
|
|
|
else if ( apaint->format == FT_COLR_PAINTFORMAT_RADIAL_GRADIENT || |
|
|
|
|
( do_read_var = |
|
|
|
|
( (FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT ) ) ) |
|
|
|
|
( (FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT ) ) ) |
|
|
|
|
{ |
|
|
|
|
FT_Pos tmp; |
|
|
|
|
|
|
|
|
@ -835,10 +836,10 @@ |
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else if ( apaint->format == FT_COLR_PAINTFORMAT_SWEEP_GRADIENT || |
|
|
|
|
else if ( apaint->format == FT_COLR_PAINTFORMAT_SWEEP_GRADIENT || |
|
|
|
|
( do_read_var = |
|
|
|
|
( (FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT ) ) ) |
|
|
|
|
( (FT_PaintFormat_Internal)apaint->format == |
|
|
|
|
FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT ) ) ) |
|
|
|
|
{ |
|
|
|
|
if ( !read_color_line( colr, |
|
|
|
|
child_table_p, |
|
|
|
@ -1462,13 +1463,13 @@ |
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
font_clip_box.xMin += |
|
|
|
|
FT_MulFix( item_deltas[0], face->root.size->metrics.x_scale ); |
|
|
|
|
FT_MulFix( item_deltas[0], face->root.size->metrics.x_scale ); |
|
|
|
|
font_clip_box.yMin += |
|
|
|
|
FT_MulFix( item_deltas[1], face->root.size->metrics.y_scale ); |
|
|
|
|
FT_MulFix( item_deltas[1], face->root.size->metrics.y_scale ); |
|
|
|
|
font_clip_box.xMax += |
|
|
|
|
FT_MulFix( item_deltas[2], face->root.size->metrics.x_scale ); |
|
|
|
|
FT_MulFix( item_deltas[2], face->root.size->metrics.x_scale ); |
|
|
|
|
font_clip_box.yMax += |
|
|
|
|
FT_MulFix( item_deltas[3], face->root.size->metrics.y_scale ); |
|
|
|
|
FT_MulFix( item_deltas[3], face->root.size->metrics.y_scale ); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|