Re: Text antialiasing.
"David Lowndes" wrote in message
news:ta2i289jootm9up6c2124loeti6djdsm33@4ax.com...
What else are you setting in the LOGFONT?
Perhaps some other attribute is preventing your expected choice?
I don't *think* there's anything amiss:
LOGFONTW logfont;
// Normal font:
int nHeight = HEIGHT_NORMAL[device]; // In points.
logfont.lfHeight = nHeight * nDpiY / 72; // In pixels
logfont.lfWidth = 0;
logfont.lfEscapement = 0;
logfont.lfOrientation = 0;
logfont.lfWeight = FW_NORMAL;
logfont.lfItalic = 0;
logfont.lfUnderline = 0;
logfont.lfStrikeOut = 0;
logfont.lfCharSet = DEFAULT_CHARSET;
logfont.lfOutPrecision = OUT_TT_PRECIS;
logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
logfont.lfQuality = ANTIALIASED_QUALITY;
logfont.lfPitchAndFamily = VARIABLE_PITCH|FF_SWISS;
wcscpy( logfont.lfFaceName, FONTFACE[device] );
with constants in the header:
const CStringW FONTFACE[2] = { L"Tahoma", L"Calibri" };
const int HEIGHT_NORMAL[2] = { 12, 12 }; // Text height in
points
nDpiY is dots per inch. I'm using array arguments 0 for screen, and 1 for
printer.
Dave
-- David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm