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 11:46 AM, <Dennis-Busch@xxxxxxxxxx> wrote:
Ok, it seems we agree/know what we want for the builtin bitmap font
now.

Attached is a patch which only adds the simple, unscaled 8x8 font
sheet creation to the font addon and includes a small modification to
ex_font to demonstrate usage. No scaling is performed and all scaling
code has been removed.

With this patch (keeping flexibility as previously discussed in mind)
there are three new functions in the font addon:

ALLEGRO_BITMAP *al_create_builtin_font_sheet(void);

int *, al_get_builtin_font_sheet_ranges(void);

int, al_get_builtin_font_sheet_ranges_count(void);


The two extra functions are necessary, so that users always have the
correct character range information for their own
al_grab_font_from_bitmap call after manipulating(scaling, recoloring,
etc) the plain font sheet bitmap.

Also, with these, future extensions (more characters, more ranges) to
the builtin font data can be made without breaking user code.


Thanks, I'll apply it. I'll change the "int *" return to "int const *" though as a hint for the user not to free it.
 
Which files to I need to edit to add documentation for those
functions?


docs/src/refman/font.txt

Ok, I'll wait until there's also documentation then.



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