Commit b98dd169a1823485e35b3007ce707a6712dcd525

Behdad Esfahbod (بهداد اسفهبد) 2022-05-25T14:49:37

* src/sfnt/ttmtx.c (tt_face_get_metrics): Apply variations unconditionally. This causes a speed-up of approx. 20% for getting advance widths.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c
index 8837732..c895eec 100644
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -306,7 +306,7 @@
     }
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-    if ( var )
+    if ( var && face->blend )
     {
       FT_Face  f = FT_FACE( face );
       FT_Int   a = (FT_Int)*aadvance;