Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Allegro5 al_load_font_f ?

This thread is locked; no one can reply to it. rss feed Print
Allegro5 al_load_font_f ?
aniquilator
Member #9,841
May 2008
avatar

Hello,
I'm coding some wrapper code to use fonts in my framework, and When I was coding the allegro5 backend for it, I realized that there isn't any al_load_font_f, or something like that.
I know I can use al_load_ttf_font_f, but... Is there a way to load bitmap fonts as well using ALLEGRO_FILE ? If I could use al_load_font_f, it would be great...

Any Ideas? Thanks in advance.

SiegeLord
Member #7,827
October 2006
avatar

Looks like it's an oversight. You can use al_grab_font_from_bitmap as an approximate replacement (it's approximate because it doesn't auto-determine the ranges of characters in the font file like al_load_bitmap_font does).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Elias
Member #358
May 2000

al_load_bitmap_font doesn't determine ranges - you can't even load the a4_font.png example with it. So always better to use al_grab_font_from_bitmap anyway. Ideally al_load_bitmap_font also would have the ranges parameters though (and it would have an _f) version.

--
"Either help out or stop whining" - Evert

Go to: