Solved

Drawing text with antialiasing

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 54
How to match SAS datasets by multiple key variables and then rename and create new variables? 2 98
Separate into files by filename 12 87
mapAB Challlenge 35 156
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

860 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