Hi Uz, In reality the text is always starting at exact pixels. We do not need the digits after the decimal points. For special effects like flying logos or zooms I always render the text to a bitmap and let the sprite engine work on the bitmap. To do this with outtext would be quite complex compared to manipulating a single sprite. Plus it would be much more code. Thank you for the help in finding this bug! -- Karri On 21.09.2012 00:20, Ullrich von Bassewitz wrote: > Hi! > > On Tue, Sep 18, 2012 at 11:15:13AM +0300, Karri Kaksonen wrote: >> The textwidth code uses something called _tgi_charwidth which is >> zeroed at the time when the driver loads. I can not find any place >> in the code that would copy _tgi_fontwidth to _tgi_charwidth. > Thanks for your efforts! tgi_charwidth and _tgi_charheight are initialized in > tgi_settextstyle, which is called at the end of tgi_init. > > The problem was an error in the calculation in tgi_gettextwidth which didn't > work correctly. > > One question however, since I don't know if the current implementation is > absolutely correct: > > The Lynx has fine scaling for bitmap fonts. Is it correct that each character > starts at a full pixel position? So if the width of one char is 20.5 pixels, > the next one starts at 21 pixel? > > If so, the width calculation needs a correction. Currently it just drops the > digits after the decimal point. But it should nevertheless generate better > results than before:-) > > Regards > > > Uz > > ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Fri Sep 21 06:39:31 2012
This archive was generated by hypermail 2.1.8 : 2012-09-21 06:39:35 CEST