[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 7bfcaac 8/8: [sfnt] Adjust behaviour of PS font names
From: |
Werner LEMBERG |
Subject: |
[freetype2] master 7bfcaac 8/8: [sfnt] Adjust behaviour of PS font names for variation fonts. |
Date: |
Sat, 7 Oct 2017 07:46:29 -0400 (EDT) |
branch: master
commit 7bfcaacaf5153001b071482fdc7744b3ec71fcd3
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>
[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.
---
ChangeLog | 7 +++++++
include/freetype/freetype.h | 7 +++++++
src/sfnt/sfdriver.c | 3 ++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 98c8374..2e8c6d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2017-10-07 Werner Lemberg <address@hidden>
+ [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 <address@hidden>
+
[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 @@ 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 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 7bfcaac 8/8: [sfnt] Adjust behaviour of PS font names for variation fonts.,
Werner LEMBERG <=