diff options
Diffstat (limited to 'src/truetype')
-rw-r--r-- | src/truetype/ttgxvar.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index aec43c851..249ef316a 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -3306,6 +3306,8 @@ GX_Blend blend; FT_MM_Var* mmvar; + FT_Memory memory = face->root.memory; + FT_UInt num_instances; @@ -3329,8 +3331,7 @@ if ( instance_index > 0 ) { - FT_Memory memory = face->root.memory; - SFNT_Service sfnt = (SFNT_Service)face->sfnt; + SFNT_Service sfnt = (SFNT_Service)face->sfnt; FT_Var_Named_Style* named_style; FT_String* style_name; @@ -3354,7 +3355,13 @@ named_style->coords ); } else + { + /* restore non-VF style name */ + FT_FREE( face->root.style_name ); + if ( FT_STRDUP( face->root.style_name, face->non_var_style_name ) ) + goto Exit; error = TT_Set_Var_Design( face, 0, NULL ); + } Exit: return error; |