Re: [AD] monochrome 8x8 builtin font + upscaling algorithm |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Thanks. Attached is a new cumulative patch (includes documentation update and previous patch and int* to const int* change). I had to strip some comments from the code itself, so the doc generator could find the function signatures. Dennis Busch d_busch@xxxxxxxxxx On 9 Jul 2012 at 12:11, allefant wrote: > 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.
The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. ---- File information ----------- File: 0001-simple-builtin-8x8-font-sheet-creation-and-informati.patch Date: 9 Jul 2012, 13:15 Size: 31580 bytes. Type: Unknown
Attachment:
0001-simple-builtin-8x8-font-sheet-creation-and-informati.patch
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |