Solved

Drawing text with antialiasing

Posted on 1998-05-27
3
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generic progress indicator 6 121
sum28 challenge 31 117
has77  challenge 9 104
Updating statistics with error notification email in SQL server 4 127
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

734 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