Commit 7653c76533dcde3d87bd7af5a2c12e8c95412c12

Alexei Podtelezhnikov 2017-08-17T21:28:32

[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.

diff --git a/ChangeLog b/ChangeLog
index ca92d32..236842e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-08-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[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  <wl@gnu.org>
 
 	* src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 58f67c0..289eeef 100644
--- 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;
         }