Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Drawing text with antialiasing

Posted on 1998-05-27
3
Medium Priority
?
356 Views
Last Modified: 2013-11-20
Hi all,
I have to draw text with antialiasing .
I try to draw text using largest possible font to compatible DC. Then strech it to the size I need but effect is worst ....

Thanks in advance.
0
Comment
Question by:Livepix
3 Comments
 

Expert Comment

by:rosborn051498
ID: 1315523
I'm just curious about why you need antialiasing.
0
 
LVL 2

Expert Comment

by:lucidity
ID: 1315524
why do you think, so text doesn't look like crap. From my experience MFC doesn't do that, unless you make your own font class, that sort of thing is no fun. Depending on the situation you can load DIBs or BMPs (onto a button or directly to the sreen)  which you create with the appropriate anti-aliased text. You can use transparent images or simply keep the background of the image the same as your apps background. There are several methods for different situations, depending on where you want this text. If you are interested let me know where you are trying to put this text.
0
 
LVL 3

Accepted Solution

by:
tma050898 earned 200 total points
ID: 1315525
Livepix,

You need to set the lfQuality member of the LOGFONT structure used to write text to ANTIALIASED_QUALITY. In addition, you need to make sure the OS you are running under (95 or NT) has font smoothing installed. In NT 4.0, this feature is a part of the OS. However, in 95 you will need to install it from the Microsoft web site (http://www.microsoft.com/opentype/free.htm). I believe that it also comes with MS Plus (for 95).

Tom

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question