nanogui: [patch] fix font_pcf.c when default char is missing
Subject:
[patch] fix font_pcf.c when default char is missing
From:
"Alexander Stohr" ####@####.####
Date:
14 Jul 2005 13:42:34 +0100
Message-Id: <000501c58871$56e41f80$9b01a8c0@starlightpc>
Hello,
i used Paul's most recent code (font_pcf.c-20050708)
for further bug fixing on the pcf font file reader.
i have addressed these subjects with attached patch
(packed aside to the current full text of the file):
- fix for font reading when default char is empty
- fix for signed/unsigned mixing in loop counters
- added one more NULL initializer for 8 bit font entry point structure
- added check for result after any malloc call
- a few lines with 1 column indention
i suppose that pointing to a non existant default
char was the true reason for the partial random
appearance of font dumps that i noticed yesterday.
there must be a bug in the font renderer of 0.91:
- when a char has a width of 0 then the char
is still tried beeing rendered, which results
in the "X2>=X1" assertion. font renderer should
instead simply return if a zero width is passed.
it should be easy to find and fix, but i just dont
know right now where to find the rendering routine.
please can you find a fix for that? (if not already
done; meanswhile i have locally replaced the assert
with a return in the horizontal line routine.)
-Alex.
[Content type application/octet-stream not shown. Download]