shithub: freetype+ttf2subf

Download patch

ref: 70704b34ace5667ac700a5d85d7d8a1ba2b58da0
parent: 59b0b3a76c767393f1d9d28ece314b4e03b0f661
author: Werner Lemberg <[email protected]>
date: Tue Dec 20 07:27:22 EST 2016

[truetype] Improve logic for getting fast advance widths.

* src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
(tt_get_advances): Use `is_default_instance' for test; this gets
recomputed after changing blend coordinates.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-12-20  Werner Lemberg  <[email protected]>
+
+	[truetype] Improve logic for getting fast advance widths.
+
+	* src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
+	(tt_get_advances): Use `is_default_instance' for test; this gets
+	recomputed after changing blend coordinates.
+
 2016-12-20  Ben Wagner  <[email protected]>
 	    Werner Lemberg  <[email protected]>
 
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -219,8 +219,8 @@
       {
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
         /* no fast retrieval for blended MM fonts without VVAR table */
-        if ( ( FT_HAS_MULTIPLE_MASTERS( face ) && ttface->blend ) &&
-             !( var && var->vadvance_adjust )                     )
+        if ( !ttface->is_default_instance     &&
+             !( var && var->vadvance_adjust ) )
           return FT_THROW( Unimplemented_Feature );
 #endif
 
@@ -251,8 +251,8 @@
       {
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
         /* no fast retrieval for blended MM fonts without HVAR table */
-        if ( ( FT_HAS_MULTIPLE_MASTERS( face ) && ttface->blend ) &&
-             !( var && var->hadvance_adjust )                     )
+        if ( !ttface->is_default_instance     &&
+             !( var && var->hadvance_adjust ) )
           return FT_THROW( Unimplemented_Feature );
 #endif
 
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -238,8 +238,8 @@
     {
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
       /* no fast retrieval for blended MM fonts without VVAR table */
-      if ( ( FT_HAS_MULTIPLE_MASTERS( ttface ) && face->blend ) &&
-           !( var && var->vadvance_adjust )                     )
+      if ( !face->is_default_instance       &&
+           !( var && var->vadvance_adjust ) )
         return FT_THROW( Unimplemented_Feature );
 #endif
 
@@ -258,8 +258,8 @@
     {
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
       /* no fast retrieval for blended MM fonts without HVAR table */
-      if ( ( FT_HAS_MULTIPLE_MASTERS( ttface ) && face->blend ) &&
-           !( var && var->hadvance_adjust )                     )
+      if ( !face->is_default_instance       &&
+           !( var && var->hadvance_adjust ) )
         return FT_THROW( Unimplemented_Feature );
 #endif