Re: [cc65] TGI bitmap fnts revisited

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2011-07-12 23:03:56
On Tue, Jul 12, 2011 at 11:52:23PM +0300, Karri Kaksonen wrote:
> I would also like to test this on the Lynx. The Lynx is also capable
> of scaling bitmap fonts with fractional sizes. Every bitmap can be
> scaled with a 16 bit integer.
>  $0100 means 1:1.
>  $0200 means 2:1

Is the scale 8.8 fixed point? If so this would be quite cool, since TGI in the
snapshot requires the programmer to specify scaling in this format. The TGI
kernel uses the fixed point for the vector fonts and rounds it to the nearest
integer for the bitmap fonts. The scaling factors currently look like this:

; The following two store an 8.8 fixed point value in the first two bytes,
; and a rounded integer value in the third byte. The latter is passed to the
; driver to scale the bitmap font. The variables are expected to be in
; this order and adjacent.
_tgi_textscalew:    .res    3           ; Text scale for the width
_tgi_textscaleh:    .res    3           ; Text scale for the height

Not sure how to pass this down to the driver in an efficient manner, but if
the Lynx is really using 8.8 fixed point, it would be a pity if we wouldn't do
that.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jul 12 23:04:11 2011

This archive was generated by hypermail 2.1.8 : 2011-07-12 23:04:14 CEST