Date: Wed, 10 Oct 2001 11:32:40 -0500
From: henke@insync.net
To: aaron@ardiri.com
Subject: PilRC 2.8p7: FONT bug + patch

Hello,

I think I have discovered a bug in the font handling of PilRC. The symptoms
are: some characters within custom fonts do not display properly (or at
all) on the Palm device. (Specifics depend on the font in question.)

I have attached a file font.txt which consistently produces buggy output
when used with PilRC versions 2.8 through 2.8p7 inclusive. (2.3a through
2.7a inclusive produce correct output. Versions prior to 2.3a did not have
font support.)

Attached is a unified context diff for a patch which I believe fixes the
problem. (It certainly makes things work right for the included font.txt;
as I do not really understand the internal structure of the font data, that
may only be coincidental.) The patch file is pilrc-2.8p7-fontpatch.

I have also attached three font objects built from font.txt:
	NFNT270f.bin-2.7a -- built with stock PilRC 2.7a; works
	NFNT270f.bin-2.8p7 -- built with stock PilRC 2.8p7; broken
	NFNT270f.bin-2.8p7-dgh -- built with PilRC 2.8p7 + my patch; works

Finally, I have attached two builds of a simple Palm program that
demonstrates the problem:
	tstfont-ok.prc -- built with NFNT270f.bin-2.8p7-dgh; works
	tstfont-bad.prc -- built with NFNT270f.bin-2.8p7; broken

Note that in the case of the latter, the digit '9' does not display
properly. Source for the test program and the utility I used to create
font.txt are available from http://www.insync.net/~henke/pbm2pfnt/ .

Thanks for all your work on PilRC. I hope this information is useful
to you. Please don't hesitate to contact me by email if there is anything
further I can do to help.

Regards,
