Re: [AD] True Colour font loading fix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, 2005-04-03 at 20:31 +0200, Evert Glebbeek wrote:
> On Saturday 02 April 2005 19:06, Evert Glebbeek wrote:
> > The attached patch fixes problems loading high and true colour font
> > bitmaps.
>
> Seems I once again forgot to attach the patch. Never mind, this one is
> better anyway :)
> It should not affect 8bit fonts in any way, but it affects high/true colour
> bitmap fonts in the following way: they are converted to the current
> colourdepth when they are loaded, just as bitmaps are. The user is not
> able to override this because the font actually needs to be in the current
> colordepth to be useable at all.
> That said, there is currently no API to convert a font to a selected
> colourdepth. This is a shame, but to add it now is quite a large change -
When would it be needed?
> too large in my opinion. Therefor, the glyph renderer will convert each
> glyph on the fly (using blit) before drawing it (using masked_blit with
> the new bitmap). This has obvious performance repercussions, which can be
> slightly reduced by making the bitmap static and reusing it, but I haven't
> bothered. A note in the docs that for optimal performance true colour
> fonts should be loaded after set_color_depth() has been called should
> suffice. This is not really different from bitmaps anyway.
>
> Documentation to follow.
Makes sense. There's not that much point in using true-color fonts, but
in a different color-depth than the screen.
--
Elias Pschernig