Solved

Font smoothing for DrawText calls(Win32)

Posted on 1997-03-29
2
664 Views
Last Modified: 2013-12-03
If you use DrawText with font smoothing on, and then call DrawText in the background color to "erase" the previous character, the antialiasing pixels remain.  Is there any way (short of turning off font smoothing for the whole app) to erase the characters in this manner cleanly by disabling font smoothing for single DrawText calls?  (Using SystemParametersInfo to turn off font smoothing is ineffective once the app has started.)  Thank you in advance!
0
Comment
Question by:ThomasSeheeHong
2 Comments
 
LVL 2

Accepted Solution

by:
r parkinson earned 200 total points
ID: 1334296
You could 'bypass' font smoothing by setting the lfEscapement value to a non 0 value, say 1, as font smoothing only works with certain escapement values.  A value of 1 (1/10th of a degree) will not be visible in you app.  You may also have to use TextOut rather than DrawText to make this work.
0
 

Author Comment

by:ThomasSeheeHong
ID: 1334297
Easiest solution I've come across so far.  Thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

758 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

21 Experts available now in Live!

Get 1:1 Help Now