Archive: Force text to use ClearType antialiasing method


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.

You'd have to write a plug-in or use the System plug-in to create your own font handle.


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.

Why would you want to force cleartype on? think of the poor people with CRT's that prefer cleartype off


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! ;)


http://pastebin.ca/858408


Wow! That was quick!
Thanks again, Anders! NSIS wouldn't be what it is without the outstanding support from people such as yourself! :D