shithub: freetype+ttf2subf

Download patch

ref: f61f49fef7a958830be54ffbed801c1bfd18a0be
parent: 1e7a8f30c231bace001c617099e78f78743dd3b4
author: John Tytgat <[email protected]>
date: Fri Jan 18 08:25:23 EST 2019

[sfnt] Handle TT fonts having two PostScript font names (#55471).

* src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
other language found for PostScript font names.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-01-18  John Tytgat  <[email protected]>
+
+	[sfnt] Handle TT fonts having two PostScript font names (#55471).
+
+	* src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
+	other language found for PostScript font names.
+
 2019-01-08  Chris Liddell <[email protected]>
 
 	[psaux] Fix closepath (#55414).
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -608,10 +608,10 @@
 
       if ( name->nameID == id && name->stringLength > 0 )
       {
-        if ( IS_WIN( name ) )
+        if ( IS_WIN( name ) && ( name->languageID == 0x409 || *win == -1 ) )
           *win = n;
 
-        if ( IS_APPLE( name ) )
+        if ( IS_APPLE( name ) && ( name->languageID == 0 || *apple == -1 ) )
           *apple = n;
       }
     }