Solved

Font smoothing for DrawText calls(Win32)

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

Independent Software Vendors: 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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…

726 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