shithub: freetype+ttf2subf

Download patch

ref: 7653c76533dcde3d87bd7af5a2c12e8c95412c12
parent: cadd29de08abd1bba38d42a76efdb4971d45d01e
author: Alexei Podtelezhnikov <[email protected]>
date: Thu Aug 17 17:28:32 EDT 2017

[sfnt] Avoid synthetic unicode for symbol fonts with PUA.

Reported as

  https://bugs.chromium.org/p/chromium/issues/detail?id=754574

* src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-08-17  Alexei Podtelezhnikov  <[email protected]>
+
+	[sfnt] Avoid synthetic unicode for symbol fonts with PUA.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/chromium/issues/detail?id=754574
+
+	* src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL.
+
 2017-08-16  Werner Lemberg  <[email protected]>
 
 	* src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -1492,7 +1492,8 @@
 
 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
 
-          if ( charmap->encoding == FT_ENCODING_UNICODE )
+          if ( charmap->encoding == FT_ENCODING_UNICODE   ||
+               charmap->encoding == FT_ENCODING_MS_SYMBOL )  /* PUA */
             has_unicode = TRUE;
         }