[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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
diff --git a/ChangeLog b/ChangeLog
index db292bf..b0e3691 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-12-20 Werner Lemberg <wl@gnu.org>
+
+ [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 <bungeman@google.com>
Werner Lemberg <wl@gnu.org>
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 3e0ef86..3f426c6 100644
--- 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
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 66e721e..91ddff5 100644
--- 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