[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BlueSky fonts and subfont [the fix!]
In an amazing feat of meddling with things I don't (fully) understand,
I seem to have fixed the problems I was having with subfont.
I fixed the ``Unexpected end of Subrs: '\n' While 39 Subrs yet not defined''
problem by modifying the BlueSky fonts, putting each font through the
pipeline:
t1disasm | grep -v '^[ \t]*$' | t1asm
... to remove some blank lines which I figured where spooking the
simplistic parser used by subfont.
That fixed the problems with the first two fonts, but subfont dumped core
on CMSY10. Investigating with gdb, I found (eventually) that the problem
lay in the fact that CMSY10 didn't have any `Subrs', and this was tickling
a bug in subfont. Enclosed is a patch for that bug, for anyone else who
cares about subfont.
Hope this helps someone out there,
Melissa.
P.S. I was saying the other day that I never used gdb, but it was good to
know it was there... and today, I did use it.
Enc.
--- subfont.c.orig Mon Mar 10 22:27:32 1997
+++ subfont.c Mon Mar 10 22:28:18 1997
@@ -1401,7 +1401,9 @@
{ Subr[i] = Subr[3]; Subr[i].use = 0; }
else
{ k = i; l++; }
- MaxSubrs = k+1; /* Forget tail of unused subrs ... */
+ if (k+1 < MaxSubrs) {
+ MaxSubrs = k+1; /* Forget tail of unused subrs ... */
+ }
if ( HiSubr != NULL )
{
for ( i = 0 , k = 0 ; i < HiMaxSubrs ; i++ )
@@ -1409,7 +1411,9 @@
{ HiSubr[i] = HiSubr[3]; HiSubr[i].use = 0; }
else
{ k = i; l++; }
- HiMaxSubrs = k+1; /* Forget tail of unused subrs ... */
+ if (k+1 < MaxSubrs) {
+ HiMaxSubrs = k+1; /* Forget tail of unused subrs ... */
+ }
}
l = MaxSubrs + (HiSubr == NULL ? 0 : HiMaxSubrs) - l;