ref: 7bfcaacaf5153001b071482fdc7744b3ec71fcd3
parent: f89c67f043c73e709e5721e651f2b616dab72ead
author: Werner Lemberg <[email protected]>
date: Sat Oct 7 09:14:38 EDT 2017
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2017-10-07 Werner Lemberg <[email protected]>
+ [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 <[email protected]>
+
[cff, truetype] Adjust behaviour of named instances.
This commit completely separates the interaction between named
--- 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 );
--- 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;