Solved

Drawing text with antialiasing

Posted on 1998-05-27
3
312 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 100 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now