shithub: freetype+ttf2subf

Download patch

ref: 42fcd6693ec7bd6ffc65ddc63e74287a65dda669
parent: 3788187e0c396952cd7d905c6c61f3ff8e84b2b4
author: Werner Lemberg <[email protected]>
date: Sat Nov 22 07:44:33 EST 2014

[type42] Allow only embedded TrueType fonts.

This is a follow-up to Savannah bug #43659.

* src/type42/t42objs.c (T42_Face_Init): Exclusively use the
`truetype' font driver for loading the font contained in the `sfnts'
array.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2014-11-22  Werner Lemberg  <[email protected]>
 
+	[type42] Allow only embedded TrueType fonts.
+
+	This is a follow-up to Savannah bug #43659.
+
+	* src/type42/t42objs.c (T42_Face_Init): Exclusively use the
+	`truetype' font driver for loading the font contained in the `sfnts'
+	array.
+
+2014-11-22  Werner Lemberg  <[email protected]>
+
 	[type42] Fix Savannah bug #43659.
 
 	* src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -292,7 +292,9 @@
       FT_Open_Args  args;
 
 
-      args.flags       = FT_OPEN_MEMORY;
+      args.flags       = FT_OPEN_MEMORY | FT_OPEN_DRIVER;
+      args.driver      = FT_Get_Module( FT_FACE_LIBRARY( face ),
+                                        "truetype" );
       args.memory_base = face->ttf_data;
       args.memory_size = face->ttf_size;