Re: [AD] monochrome 8x8 builtin font + upscaling algorithm |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
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. Which files to I need to edit to add documentation for those functions? Dennis Busch d_busch@xxxxxxxxxx --- relevant conversation bits and pieces: Dennis said: >>> So maybe we might only want something like >>> "al_create_builtin_font_bitmap" >>> for now? (returns an ALLEGRO_BITMAP instead of ALLEGRO_FONT) >>> (to keep it open and flexible for future extensions and allowing >>> the user to manipulate it any way they like before usage) Elias said: >> I would prefer that. >> [..] >> al_create_builtin_font_bitmap (maybe _sheet would be a better name?), >> [..] Trent said: > I agree with Elias on this. I think creating the full bitmap is all > that's needed.
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, 11:04 Size: 30584 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/ |