Solved

Font smoothing for DrawText calls(Win32)

Posted on 1997-03-29
2
666 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…

863 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

19 Experts available now in Live!

Get 1:1 Help Now