Re: [AD] monochrome 8x8 builtin font + upscaling algorithm

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Jul 9, 2012 at 12:48 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
>
> Keeping in mind the reason for introducing the builtin font in the first
> place (quick debugging) I think there should just be one function that
> returns a ready to use font.
>

True. Just something like this would work I think:

ALLEGRO_FONT *al_create_builtin_font(void);

Maybe with a flags parameter? None of the possible flags for
al_load_font would apply though as far as I can see (since the builtin
font has no alpha).

It can just call the other three functions from the patch (and they
can be made internal).

For the future, if we actually want something like bitmap scaling
algorithms or special font effects, maybe there can be functions like:

ALLEGRO_BITMAP *al_create_font_sheet(ALLEGRO_FONT *font);
int al_get_font_ranges(int *ranges);

They would create a glyph sheet (for bitmap fonts, just clone the
existing one) which could then be processed and passed back to
al_grab_font_from_bitmap. And so for the builtin font, if you really
need it as a bitmap, you would be able to use this.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/