ref: d2c3bbcd8ec175a750d76f0bf50162ea9e3aaf85
parent: 0c2bdb01a2e1d24a3e592377a6d0822856e10df2
author: Werner Lemberg <[email protected]>
date: Sat Mar 19 15:31:25 EDT 2022
[cff] Synchronize `cff_slot_load` with `TT_Load_Glyph`. * src/cff/cffgload.c (IS_DEFAULT_INSTANCE): New macro. (cff_slot_load): Use it.
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -29,7 +29,15 @@
#include "cfferrs.h"
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#define IS_DEFAULT_INSTANCE( _face ) \
+ ( !( FT_IS_NAMED_INSTANCE( _face ) || \
+ FT_IS_VARIATION( _face ) ) )
+#else
+#define IS_DEFAULT_INSTANCE( _face ) 1
+#endif
+
/**************************************************************************
*
* The macro FT_COMPONENT is used in trace mode. It is an implicit
@@ -255,8 +263,8 @@
if ( size->strike_index != 0xFFFFFFFFUL &&
- sfnt->load_eblc &&
- ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
+ ( load_flags & FT_LOAD_NO_BITMAP ) == 0 &&
+ IS_DEFAULT_INSTANCE( size->root.face ) )
{
TT_SBit_MetricsRec metrics;