Here is a "diff -urNpad" that prevents a crash on<br>
'Monotype Courier New' version 2.90<br>
==================================<br>
====== xc/lib/font/FreeType/ftfuncs.c: ======<br>
==================================<br>
--- ftfuncs.c.bad 2005-10-04 01:32:27.000000000 +0300 <br>
+++ ftfuncs.c.good 2005-10-04 01:12:29.000000000 +0300 <br>
@@ -932,9 +932,18 @@ FT_Do_SBit_Metrics( FT_Face ft_face, FT_<br>
sfnt = (SFNT_Service)face->sfnt;<br>
<br>
if ( strike_index != 0xFFFFU && sfnt->load_sbits ) {<br>
- /* Check whether there is a glyph sbit for the current index */ <br>
- error = sfnt->find_sbit_image( face, glyph_index, strike_index, <br>
+ /* <br>
+ * A sanity check. `Monotype Courier New' version 2.90 crashes <br>
+ * xfs or X servers. Freetype 2.1.10 sets <br>
+ * sfnt->find_sbit_image to 0 in sfnt_interface in <br>
+ * freetype-2.1.10/src/sfntsfdriver.c on line 370. <br>
+ */ <br>
+ if (sfnt && sfnt->find_sbit_image) { <br>
+ /*
Check whether there is a glyph sbit for the current index */ <br>
+ error =
sfnt->find_sbit_image( face, glyph_index, strike_index, <br>
&range, &strike, &glyph_offset );<br>
+ } <br>
+ else error = -1; /* Need this in case sfnt->find_sbit_image is 0 */ <br>
}<br>
else error=-1;<br>
if ( error ) goto Exit;<br>
<br>
=================================================<br>
=========== CUT ====== EOF ========================<br>
=================================================<br>