On Thu, 2005-12-08 at 10:29, Juliusz Chroboczek wrote:
> You will find what I believe is the most up-to-date version of
> fonttosfnt in the X.Org CVS tree.  There's also a version in XFree86,
> but I'm not sure it has been kept up to date.
I believe the entrySel field in the table directory of the output sfnt
is off by 1.


*** write.c~	2005-12-16 15:10:29.000000000 -0800
--- write.c	2005-12-16 15:10:29.000000000 -0800
***************
*** 358,364 ****
      writeULONG(out, 0x10000);   /* version */
      writeUSHORT(out, numTables); /* numTables */
      writeUSHORT(out, 16 * ti);  /* searchRange */
!     writeUSHORT(out, i - 1);    /* entrySelector */
      writeUSHORT(out, 16 * (numTables - ti)); /* rangeShift */
  
      /* see fixupDir */
--- 358,364 ----
      writeULONG(out, 0x10000);   /* version */
      writeUSHORT(out, numTables); /* numTables */
      writeUSHORT(out, 16 * ti);  /* searchRange */
!     writeUSHORT(out, i);        /* entrySelector */
      writeUSHORT(out, 16 * (numTables - ti)); /* rangeShift */
  
      /* see fixupDir */

Reply via email to