diff --git a/ChangeLog b/ChangeLog index 98c837407..2e8c6d829 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-10-07 Werner Lemberg + + [sfnt] Adjust behaviour of PS font names for variation fonts. + + * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's + PS name only if no variation is applied. + 2017-10-07 Werner Lemberg [cff, truetype] Adjust behaviour of named instances. diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 77d277ef5..113f68260 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -3519,6 +3519,13 @@ FT_BEGIN_HEADER /* */ /* http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html */ /* */ + /* [Since 2.8.2] Special PostScript names for named instances are */ + /* only returned if the named instance is set with */ + /* @FT_Set_Named_Instance (and the font has corresponding entries in */ + /* its `fvar' table). If @FT_IS_VARIATION returns true, the */ + /* algorithmically derived PostScript name is provided, not looking */ + /* up special entries for named instances. */ + /* */ FT_EXPORT( const char* ) FT_Get_Postscript_Name( FT_Face face ); diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index fc4eaf74c..293306717 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -862,7 +862,8 @@ NULL, &mm_var ); - if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ) + if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) && + !FT_IS_VARIATION( FT_FACE( face ) ) ) { SFNT_Service sfnt = (SFNT_Service)face->sfnt;