> What about using `FT_Get_Font_Format' instead?

Still ugly but oh well :)
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 510825359..070143eff 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -28,6 +28,9 @@
 #include FT_TRUETYPE_TABLES_H
 #include FT_TRUETYPE_TAGS_H
 #include FT_TRUETYPE_IDS_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_TYPE1_DRIVER_H
+#include FT_FONT_FORMATS_H
 
 #include FT_SERVICE_PROPERTIES_H
 #include FT_SERVICE_SFNT_H
@@ -834,6 +837,11 @@
       {
         FT_Render_Mode  mode = FT_LOAD_TARGET_MODE( load_flags );
 
+        FT_Bool isType1Font =
+          ( strstr( FT_Get_Font_Format( face ), "Type 1" ) != NULL );
+        FT_Bool isType1FontWithLightHinter =
+          isType1Font &&
+          ((PS_Driver)driver)->hinting_engine == FT_T1_HINTING_ADOBE;
 
         /* the check for `num_locations' assures that we actually    */
         /* test for instructions in a TTF and not in a CFF-based OTF */
@@ -843,7 +851,8 @@
         /* the assumption is that there don't exist real TTFs where  */
         /* both `fpgm' and `prep' tables are missing                 */
         if ( ( mode == FT_RENDER_MODE_LIGHT       &&
-               !FT_DRIVER_HINTS_LIGHTLY( driver ) )             ||
+               ( !FT_DRIVER_HINTS_LIGHTLY( driver ) &&
+                 !isType1FontWithLightHinter ) )            ||
              ( FT_IS_SFNT( face )                             &&
                ttface->num_locations                          &&
                ttface->max_profile.maxSizeOfInstructions == 0 &&
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to