[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font rendering
From: |
Nathan Hurst |
Subject: |
Re: font rendering |
Date: |
Wed, 19 Jul 2000 09:06:55 +1000 (EST) |
On Tue, 18 Jul 2000, Allen Lin wrote:
> Do you know offhand, if the rendering output of the font code will be
>
> a. a monochrome pixel map (one bit per pixel)
> b. a color pixel map at 8, 16, or 32 bits per pixel (BPP)
> c. if 16 bpp, will it be in 5-5-5 format or 5-6-5 format? (the former is
> preferable)
The code only generates 8bpp greyscale.
from memory it is also 'upsidedown', i.e. the value represents the
blackness of the pixel. To transform to an rgb colour:
k = *pixelptr;
i = 255 - k;
r = (base_red*i)>>8;
g = (base_green*i)>>8;
b = (base_blue*i)>>8;
njh