Disable Antialasing in LoadImageFont?
BlitzMax Forums/BlitzMax Programming/Disable Antialasing in LoadImageFont?
| ||
I have trouble to get mask, since the text seen to look awful when using maskblend and have to much alpha with alphablend, when using the lowest resoulutions. It is any way I can disable antialasing when loading a font, so it can looke fine in 320x240 resolutions (but of course enable it on all other resoulutions)? I guess antialasing is the whole problem for that in the loading sequence. Either the style tag seen not have a effect in any way. Regaardsles what I wrote here, the font look very the same. here is some test code I used: Graphics 320, 240, 32 Font:TImageFont=LoadImageFont("C:\Windows\Fonts\tahoma.ttf", 12, 0) SetAlpha 1.0 SetImageFont Font Repeat SetClsColor 0, 0, 0 Cls() SetColor 255,255,255 SetBlend(MASKBLEND) DrawText "abcdefghijklmnopqrstuvwxyzĉĝċ", 40, 20 DrawText "ABCDEFGHIJKLMNOPQRSTUVWXYZĈĜĊ", 40, 40 SetBlend(ALPHABLEND) DrawText "abcdefghijklmnopqrstuvwxyzĉĝċ", 40, 60 DrawText "ABCDEFGHIJKLMNOPQRSTUVWXYZĈĜĊ", 40, 80 SetBlend(LIGHTBLEND) DrawText "abcdefghijklmnopqrstuvwxyzĉĝċ", 40, 100 DrawText "ABCDEFGHIJKLMNOPQRSTUVWXYZĈĜĊ", 40, 120 Flip 1 Until KeyDown(KEY_ESCAPE)=1 NB. I'm creating a application, wich should look good on a old arcade monitor as well, wich dosent have any high resoulution. |
| ||
They look fine to me. Am i missing something? |
| ||
![]() The upper is created in Paint Shop Pro without antialasing, and the below is created by the code. As you can see, the first first font is much nicher is look, since it dosen't have antialasing when it would shown on a low resolutions. I could use an pixelfont instead, but the problem is so, these fonts dosent support unicode.... |
| ||
Oops, my bad. I have windows on a different drive so it loaded the default font ;) NOW i see your problem.. hehe |
| ||
Ive tried messing around with BRL.FreeTypeFont to load without antialiasing, got it to work but it aint pretty :/ EDIT: the antialiasing (or hinting) ends up as full pixels anyway, so its just as ugly. |
| ||
maybe the SMOOTHFONT flag would work? I dunno.. I've had the same problem as you and never found a solution. |
| ||
I have allready tried that. it make no sence. As I see if it could load the font without antialasing, it would been a never an problem. BTW it still not a problem with antialasing for shown in 640x480 and higher. But I still like the app to run in 320x240 as well. It look like a missing flag (NOANTIALASING) wich could disable that? |