Anti-Alias Text
I am using the TextOut() function to draw my text, but noticed it doesn''t draw anti-aliased text. I was wondering how I could get that same function to draw anti-aliased text. If I can''t do it with this function, what other way can I draw my text anti-aliased? Thanks for your time.
Greg FieldsSyntasoft Gameswww.syntasoft.comPost-Time Horse Racing (Available Now)
I dunno if this will help, but what if you create a font using
CreateFont() and mess with the quality of the created font?
Maybe then it will anti-alias.
regards,
GeniX
www.cryo-genix.net
CreateFont() and mess with the quality of the created font?
Maybe then it will anti-alias.
regards,
GeniX
www.cryo-genix.net
regards,GeniXwww.cryo-genix.net
January 04, 2001 09:32 PM
FYI, TextOut() doesn''t anti-alias text on DIBs and 8-bits bitmaps. Also, you have to have the option enabled in the Display properties (Effects panel -> Smooth font edges), otherwise it won''t work.
sorry, that last post is from me (damn IE)
---All you base are belong to us !
It would be REALLY helpfull if you would give some details.
what TextOut() function? Win32 API? some class member function?, for DX? OGL? get it?
anyways, if you are using DX8 the D3DX library has a nice font interface. you can use this to draw text, and set your filter to at least linier. that will help a bit with the edges when it is zoomed in. I think that you tell it what size you want the text to be, and I suggest making this pretty large like 72 so that it''s better quallity when zoomed in.
you could also, just make your own font textures of pretty high quality, and render them for text. this will give you good control.
what TextOut() function? Win32 API? some class member function?, for DX? OGL? get it?
anyways, if you are using DX8 the D3DX library has a nice font interface. you can use this to draw text, and set your filter to at least linier. that will help a bit with the edges when it is zoomed in. I think that you tell it what size you want the text to be, and I suggest making this pretty large like 72 so that it''s better quallity when zoomed in.
you could also, just make your own font textures of pretty high quality, and render them for text. this will give you good control.
Well, it looks like he meant the good ol'' Win32 API TextOut() function, to draw 2D text... I assume he would have specified something else otherwise
---All you base are belong to us !
Indeed I was referring to the good ol'' Win32 API TextOut() function! And its not an 8-bit surface I''m drawing to, its 16-bit. What exactly is a DIB? I don''t know what it is, so I don''t think I''m writing on one. And yes I am using custom fonts, by calling CreateFont(), however I haven''t messed with the quality of the font. I will try that.
Greg FieldsSyntasoft Gameswww.syntasoft.comPost-Time Horse Racing (Available Now)
DIB stands for Device-Independent Bitmap.
Whenever you create a bitmap using the Win32 APIs, it will use the color depth currently in use by the system. This is called a Device-Dependent Bitmap (DDB) and this is done mainly for the sake of optimization. Now, if you specify the color depth you want to use (in this case, 16-bits), your bitmap becomes device-independent. And for some reason, TextOut() won''t draw anti-aliased text on DIBs. It looks like there''s really nothing you can do about this, I had the same problem a while ago and couldn''t get to fix it
Whenever you create a bitmap using the Win32 APIs, it will use the color depth currently in use by the system. This is called a Device-Dependent Bitmap (DDB) and this is done mainly for the sake of optimization. Now, if you specify the color depth you want to use (in this case, 16-bits), your bitmap becomes device-independent. And for some reason, TextOut() won''t draw anti-aliased text on DIBs. It looks like there''s really nothing you can do about this, I had the same problem a while ago and couldn''t get to fix it
---All you base are belong to us !
quote: Original post by Gf11speed
I am using the TextOut() function to draw my text, but noticed it doesn''t draw anti-aliased text. I was wondering how I could get that same function to draw anti-aliased text. If I can''t do it with this function, what other way can I draw my text anti-aliased? Thanks for your time.
If you really{/i] need anti-aliased you might consider using libttf. Search the web for the code (open source)...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement