Re: Raghindi Font and Xft



Eric Mader <mader jtcsv com> writes:

> At 09:17 AM 5/8/2002, Owen Taylor wrote:
> >I spent a little more time looking at it, and the problem is simply
> >that Raghindi includes a 0 length 'kern' table, which is presumably
> >supposed to be ignored.
> >
> >When I modified fonttools to skip 0-length tables, then dumped and
> >recompiled the font, the result was read correctly by FreeType and
> >worked well with the indic-xft shaper
> 
> >I've CC'ed Prof. R.K. Joshi on this email ... perhaps it would be
> >possible for him to produce a version of raghu.ttf without the
> >0-length table?
> >
> >If not, the alternative would be to get FreeType changed to treat
> >0-length tables the same as missing tables.
> 
> I think we should get FreeType changed in any case because there are
> probably other fonts out there with 0-length tables.

Pro:
 
 If Windows does allow such tables, there _are_ most likely 
 other fonts out there like this.

Con:

 As far as I can see, the TrueType specification does not allow
 such fonts, so if FreeType is changed in this fashion, we are 
 encouraging non-conformant fonts.

I've attached a patch for FreeType that implements skipping 0-length
tables.

Regards,
                                        Owen

Index: src/sfnt/ttload.c
===================================================================
RCS file: /cvs/freetype/freetype2/src/sfnt/ttload.c,v
retrieving revision 1.78
diff -u -p -r1.78 ttload.c
--- ttload.c	2002/05/02 06:50:58	1.78
+++ ttload.c	2002/05/09 15:30:50
@@ -73,7 +73,10 @@
 
     for ( ; entry < limit; entry++ )
     {
-      if ( entry->Tag == tag )
+      /* For compatibility with Windows, we consider 0-length
+       * tables the same as missing tables.
+       */
+      if ( entry->Tag == tag && entry->Length != 0 )
       {
         FT_TRACE3(( "found table.\n" ));
         return entry;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]