al_grab_font_from_bitmap() Documentation Error
Todd Cope

I just noticed this in the documentation for al_grab_font_from_bitmap():

int ranges[] = {32, 126};
al_font_grab_font_from_bitmap(bitmap, 1, ranges)

int ranges[] = {
    0x0020, 0x007F,  /* ASCII */
    0x00A1, 0x00FF,  /* Latin 1 */
    0x0100, 0x017F,  /* Extended-A */
    0x20AC, 0x20AC}; /* Euro */
al_font_grab_font_from_bitmap(bitmap, 4, ranges)

It should be this:

int ranges[] = {32, 126};
al_grab_font_from_bitmap(bitmap, 1, ranges)

int ranges[] = {
    0x0020, 0x007F,  /* ASCII */
    0x00A1, 0x00FF,  /* Latin 1 */
    0x0100, 0x017F,  /* Extended-A */
    0x20AC, 0x20AC}; /* Euro */
al_grab_font_from_bitmap(bitmap, 4, ranges)

Evert

Is there anything different in the two code samples you posted?

Thomas Fjellstrom
Evert said:

Is there anything different in the two code samples you posted?

Only the names of the functions. And it took me several tries to see it :o

Evert

Only the names of the functions. And it took me several tries to see it :o

Indeed. I checked all the font ranges three times, as well as the comments and the function arguments.
It would have been useful to point that out. ;)

SiegeLord

I used diff >.>

Thread #605838. Printed from Allegro.cc