From: Fay J. F C. AAC/W. <joh...@eg...> - 2004-05-04 19:18:33
|
Richard, I beg to differ with you on the "off-by-one" bug, at least as far as "freeglut" is concerned. The difference may be in the font data. I see where you changed the matrix definitions in "glutBitmapString" to make the function use the identity matrices. Again, I don't think this is correct. The raster position is decremented in the (transformed model space) y-direction by one character height and the original x-coordinate is used. I figure the text is being printed in the model space and so it should work as implemented in "freeglut". If you have an example of where it doesn't (after all, "should" is the longest word in the English language) please let me know. John F. Fay joh...@eg... -----Original Message----- From: fre...@li... [mailto:fre...@li...]On Behalf Of Richard Rauch Sent: Thursday, April 22, 2004 1:09 AM To: fre...@li... Subject: [Freeglut-developer] Font system bugs. <snip> Note that as a practical matter, I also removed what I considered to be an "off by one" error in og_font.c, at about the same time. To use the new data, you need to change several {x - 1} to {x} (where {x} is some expression which I forget) in og_font.c's bitmapped font operations. The og_font.c edits required are pretty obvious when you look at the code. Secondly: While Doxygenating OpenGLUT, I found and fixed at least one font bug: glutBitmapString() was using the (unknown) model space to position the cursor when processing a \n character. I was too busy with writing documentation at the time, and did not make much noise about the fix. As I was also making some alterations to the shapes demo (for which I was using glutBitmapString()), I did not think about the fix as much as I should have. A better fix would probably have been to blit an empty bitmap that moves the drawing pen where it should go. freeglut may wish to implement this so that glutBitmapString() actually works as an average user might expect. Since the stroked fonts live in model space, the \n bug should not affect glutStrokeString(). -- "I probably don't know what I'm talking about." http://www.olib.org/~rkr/ |