I draw letters without a background, so far it is not critical, but I hope you will be able to fix this problem.bzt wrote:Okay, we have two things here.
First, about the baseline, the problem is definitely in your code. I've quickly modified sfntest8: I've added 64 pixel size as the 7th line, and "AaBb" to the string. As you can see in the attachment it is rendered correctly in all sizes (28, 120 and finally 64).
Second, I can confirm that the rendered bitmap is taller than it should be. I did the math on paper, and with FreeSans using quality 6 (which has bounding box top 284, bottom 737 and baseline at 634), rendering in 64 pixels size should result in 82 pixels, not 187. This means there's an issue when calculating the height, which I'll find and fix.
Thanks for the feedback, I couldn't catch this bug without you! Until the fix arrives, I'd recommend printing characters with transparent background. You can clear the area first, then put the text (not the best solution, I know, but this is just a temporary workaround for the time being).
Cheers,
bzt
Thank you so much for your help and for taking the time to help me, you and others like you make a huge contribution to my life, and I hope to be like you in the future. I'm glad that the community osdev.org this is great(not like on stackoverflow).
Love you.