![]() |
|
Change Image Scaling Algorithm? |
kaykay
Member #23,741
February 2023
|
Since there are no variable text size fonts in allegro, I am trying to implement my own. I am rendering all text to a bitmap then rendering that bitmap to the screen. The only problem is that the default interpolation allegro uses to scale images makes the text look bad {"name":"uyhlN9R.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/6\/66c136bc00a38853c1031bcd78208433.png","w":1284,"h":722,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/6\/66c136bc00a38853c1031bcd78208433"} As you can see where it says "Scaled down text" it looks bad. I had an idea of create a list of the same font at multiple sizes and scaling them by interpolating between them to make it look less bad, but maybe there is an easier option. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
You can set the new bitmap flags to use linear min filtering. ALLEGRO_MIN_LINEAR You can also use mip maps to interpolate for free. ALLEGRO_MIPMAP https://liballeg.org/a5docs/trunk/graphics.html#al_set_new_bitmap_flags My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|