[gs-commits] rev 10997 - trunk/gs/psi

chrisl at ghostscript.com chrisl at ghostscript.com
Wed Mar 31 13:07:44 UTC 2010


Author: chrisl
Date: 2010-03-31 13:07:44 +0000 (Wed, 31 Mar 2010)
New Revision: 10997

Modified:
   trunk/gs/psi/fapi_ft.c
Log:
For certain errors from FT, retry interpretting the glyph without hinting - this more closely matches the existing behaviour.

Modified: trunk/gs/psi/fapi_ft.c
===================================================================
--- trunk/gs/psi/fapi_ft.c	2010-03-31 11:32:10 UTC (rev 10996)
+++ trunk/gs/psi/fapi_ft.c	2010-03-31 13:07:44 UTC (rev 10997)
@@ -350,6 +350,11 @@
 	a_fapi_font->char_data = saved_char_data;
 	ft_error = FT_Load_Glyph(ft_face, index, a_bitmap ? FT_LOAD_MONOCHROME | FT_LOAD_RENDER: FT_LOAD_MONOCHROME);
     }
+
+    if (ft_error == FT_Err_Too_Many_Hints || ft_error == FT_Err_Invalid_Argument || ft_error == FT_Err_Too_Many_Function_Defs || FT_Err_Invalid_Glyph_Index) {
+        a_fapi_font->char_data = saved_char_data;
+        ft_error = FT_Load_Glyph(ft_face, index, a_bitmap ? FT_LOAD_MONOCHROME | FT_LOAD_RENDER | FT_LOAD_NO_HINTING: FT_LOAD_MONOCHROME | FT_LOAD_NO_HINTING);
+    }
     /* Previously we interpreted the glyph unscaled, and derived the metrics from that. Now we only interpret it
      * once, and work out the metrics from the scaled/hinted outline.
      */



More information about the gs-commits mailing list