![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
[A5] feature request: "al_create_builtin_8x8_bitmap_font" |
Michał Cichoń
Member #11,736
March 2010
|
Elias said: Would this read in all system fonts? Yes. Operation will take a few seconds. Elias said: And what would be the code to get an ALLEGRO_FONT once I have the ALLEGRO_FONT_INFO of the font I want? Hm... I think this will be something like: Lack of function overloading make those above a bit ugly, but descriptive. Functions such: "God starts from scratch too" |
Trent Gamblin
Member #261
April 2000
![]() |
How does the old allegro-dev saying go? The person who writes the code dictates the API? I think it looks fine and I would use it. I think it's a good base to work with anyway. You'll not usually hammer out an entire API and then write the code without any changes. So if you want, you could start writing this in preparation for 5.1. If anybody doesn't like it, well, they've had a chance to say so. And if something turns out not to work well, code is always modifiable. You'd still keep the underlying code in tact so no loss.
|
Elias
Member #358
May 2000
|
I agree. And the simple builtin 8x8 font the thread originally was about is completely separate - it may still be useful to some even when we have a way to use system fonts. -- |
Dennis
Member #1,090
July 2003
![]() |
I just noticed that rendering fonts with that font created by my function is ridiculously slow. Turned out to be a lot faster when I changed it to make it create a video bitmap instead of a memory bitmap but with a video bitmap the process of creating the font takes several seconds, so maybe there should be a parameter to the font creation function to choose the bitmap type to use. --- 0xDB | @dennisbusch_de --- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Dennis said: I just noticed that rendering fonts with that font created by my function is ridiculously slow. Turned out to be a lot faster when I changed it to make it create a video bitmap instead of a memory bitmap but with a video bitmap the process of creating the font takes several seconds, so maybe there should be a parameter to the font creation function to choose the bitmap type to use. Try creating the initial bitmap as a memory bitmap, then set the new bitmap flags to video, and al_clone_bitmap the bitmap, and use that bitmap for the font. Should load fairly fast, and render decently as well. -- |
Evert
Member #794
November 2000
![]() |
I think I once replaced the ALLEGRO_FONT vtable so that you could actually render the standard Allegro 4 font. The difficulty then becomes rendering the characters efficiently (didn't solve that one, I was more concerned with getting it to work, so I just used al_draw_pixel). Maybe locking and unlocking the bitmap will help there. |
Dennis
Member #1,090
July 2003
![]() |
Thomas Fjellstrom said: Try creating the initial bitmap as a memory bitmap, then set the new bitmap flags to video, and al_clone_bitmap the bitmap, and use that bitmap for the font. Should load fairly fast, and render decently as well. Yes, that did the trick. Thank you Tomasu. --- 0xDB | @dennisbusch_de --- |
|
1
2
|