bradharding
11th December 2007 01:13 UTC
Force text to use ClearType antialiasing method
Hi!
I would like to know how (or if it is at all possible) to force a static text control to be antialiased using ClearType under WinXP and up.
In C I'd do something like:
LOGFONT MyLogFont;
.
.
.
MyLogFont.lfQuality = CLEARTYPE_QUALITY;
But how would I be able to do the same thing using NSIS? Could I use the font handle from a CreateFont command for something?
Thanks in advance.
Brad.
kichik
11th December 2007 09:27 UTC
You'd have to write a plug-in or use the System plug-in to create your own font handle.
bradharding
17th January 2008 11:22 UTC
Hi!
It has been over a couple of months since I posted about this, but am still having immense trouble getting anything close to working. Not wanting to write a plugin, I'm wanting to create my own font handle using the System plugin to do what this C code does:
LOGFONT lf;
memset(&lf, 0, sizeof(lf));
lf.lfQuality = CLEARTYPE_QUALITY;
lf.lfHeight = -32;
strcpy(lf.lfFaceName, "Verdana");
HFONT hFont = CreateFontIndirect(&lf);
Is there any possiblity that someone could please provide an example on how to do this?
Many thanks in advance,
Brad.
Anders
17th January 2008 11:40 UTC
Why would you want to force cleartype on? think of the poor people with CRT's that prefer cleartype off
bradharding
17th January 2008 11:53 UTC
It's mainly for the welcome page and header texts that lay over bitmaps, that would look so much better anti-aliased. (And the text of course is dynamic, so that's why I haven't done the obvious by making the text part of the bitmap.)
Your expertise would be greatly appreciated! ;)
Anders
17th January 2008 12:22 UTC
http://pastebin.ca/858408
bradharding
17th January 2008 12:32 UTC
Wow! That was quick!
Thanks again, Anders! NSIS wouldn't be what it is without the outstanding support from people such as yourself! :D