[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.
diff --git a/ChangeLog b/ChangeLog
index 98c8374..2e8c6d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2017-10-07 Werner Lemberg <wl@gnu.org>
+ [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 <wl@gnu.org>
+
[cff, truetype] Adjust behaviour of named instances.
This commit completely separates the interaction between named
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 77d277e..113f682 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3519,6 +3519,13 @@
/* */
/* 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 fc4eaf7..2933067 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;