shithub: freetype+ttf2subf

Download patch

ref: ee3f36f6b3880f7652488169dd27292c5e7c1a76
parent: 631e21814726b7befc4f9ac310053a9b70abda1d
author: Werner Lemberg <[email protected]>
date: Thu Jul 14 06:25:20 EDT 2016

[sfnt] Fix `face_index' value in `FT_Face' for named instances.

* src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-07-14  Werner Lemberg  <[email protected]>
 
+	[sfnt] Fix `face_index' value in `FT_Face' for named instances.
+
+	* src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
+
+2016-07-14  Werner Lemberg  <[email protected]>
+
 	* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
 
 2016-07-14  Behdad Esfahbod  <[email protected]>
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -1,4 +1,16 @@
 
+CHANGES BETWEEN 2.6.5 and 2.7
+
+  I. IMPORTANT BUG FIXES
+
+    - After  loading a  named instance  of  a GX  variation font,  the
+      `face_index'  value  in  the returned  `FT_Face'  structure  now
+      correctly holds the named instance  index in the upper 16bits as
+      documented.
+
+
+======================================================================
+
 CHANGES BETWEEN 2.6.4 and 2.6.5
 
   I. IMPORTANT BUG FIXES
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -977,7 +977,7 @@
 #endif
 
     face->root.num_faces  = face->ttc_header.count;
-    face->root.face_index = face_index;
+    face->root.face_index = face_instance_index;
 
     return error;
   }