From 202297eb5c88d22be2fe4ce8382cd6f4a8820f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Ramos?= Date: Sun, 25 May 2025 12:15:11 -0300 Subject: [PATCH] * src/base/ftobjs.c (FT_Load_Glyph): Loosen auto-hinting constraints. Fixes issue #1320. --- src/base/ftobjs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index f55078c16..cbea30604 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -994,8 +994,7 @@ /* the check for `num_locations' assures that we actually */ /* test for instructions in a TTF and not in a CFF-based OTF */ /* */ - /* since `maxSizeOfInstructions' might be unreliable, we */ - /* check the size of the `fpgm' and `prep' tables, too -- */ + /* we check the size of the `fpgm' and `prep' tables, too -- */ /* the assumption is that there don't exist real TTFs where */ /* both `fpgm' and `prep' tables are missing */ if ( ( mode == FT_RENDER_MODE_LIGHT && @@ -1003,9 +1002,8 @@ !is_light_type1 ) ) || ( FT_IS_SFNT( face ) && ttface->num_locations && - ttface->max_profile.maxSizeOfInstructions == 0 && ttface->font_program_size == 0 && - ttface->cvt_program_size == 0 ) ) + ttface->cvt_program_size <= 7 ) ) autohint = TRUE; } }