[truetype, type1] Additional variation tags.

Sync with
  https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags

* src/truetype/ttgxvar.h (TTAG_ital): New tag.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Use it.
* src/type1/t1loaad.c (T1_Get_MM_Var): Handle 'slnt' and 'ital'.
This commit is contained in:
Alexei Podtelezhnikov 2023-02-08 13:36:59 +00:00
parent 27b2cd4101
commit 22e6d06b21
3 changed files with 7 additions and 0 deletions

View File

@ -2713,6 +2713,8 @@
a->name = (char*)"OpticalSize";
else if ( a->tag == TTAG_slnt )
a->name = (char*)"Slant";
else if ( a->tag == TTAG_ital )
a->name = (char*)"Italic";
next_name += 5;
a++;

View File

@ -343,6 +343,7 @@ FT_BEGIN_HEADER
#define TTAG_wdth FT_MAKE_TAG( 'w', 'd', 't', 'h' )
#define TTAG_opsz FT_MAKE_TAG( 'o', 'p', 's', 'z' )
#define TTAG_slnt FT_MAKE_TAG( 's', 'l', 'n', 't' )
#define TTAG_ital FT_MAKE_TAG( 'i', 't', 'a', 'l' )
FT_LOCAL( FT_Error )

View File

@ -355,6 +355,10 @@
mmvar->axis[i].tag = FT_MAKE_TAG( 'w', 'd', 't', 'h' );
else if ( ft_strcmp( mmvar->axis[i].name, "OpticalSize" ) == 0 )
mmvar->axis[i].tag = FT_MAKE_TAG( 'o', 'p', 's', 'z' );
else if ( ft_strcmp( mmvar->axis[i].name, "Slant" ) == 0 )
mmvar->axis[i].tag = FT_MAKE_TAG( 's', 'l', 'n', 't' );
else if ( ft_strcmp( mmvar->axis[i].name, "Italic" ) == 0 )
mmvar->axis[i].tag = FT_MAKE_TAG( 'i', 't', 'a', 'l' );
}
mm_weights_unmap( blend->default_weight_vector,