From: David Webber on
A quick test has revealed that my MFC app is ignoring kerning pairs when
drawing text on its CView.

Delving into the help system, I can't (thus far) find any mention of
kerning.

Is there something I have to do with one or more of CFont, DrawText(),
TextOut(), ExtTextOut() in order for text to respect the kerning pairs
defined in a TrueType font?

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: AliR on
Are you saying that the characters are not spaced correctly based on the
font, or are yo trying to change the spacing?

AliR.


"David Webber" <dave(a)musical-dot-demon-dot-co.uk> wrote in message
news:%23XSpQqrvKHA.4552(a)TK2MSFTNGP04.phx.gbl...
>A quick test has revealed that my MFC app is ignoring kerning pairs when
>drawing text on its CView.
>
> Delving into the help system, I can't (thus far) find any mention of
> kerning.
>
> Is there something I have to do with one or more of CFont, DrawText(),
> TextOut(), ExtTextOut() in order for text to respect the kerning pairs
> defined in a TrueType font?
>
> Dave
> --
> David Webber
> Mozart Music Software
> http://www.mozart.co.uk
> For discussion and support see
> http://www.mozart.co.uk/mozartists/mailinglist.htm


From: David Webber on
"AliR" <AliR(a)online.nospam> wrote in message
news:uxXZlYtvKHA.3408(a)TK2MSFTNGP06.phx.gbl...

> Are you saying that the characters are not spaced correctly based on the
> font, or are yo trying to change the spacing?

The former.

The spacing of the characters is what it would be if there were no kerning
pairs.

[It's easy enough to check as Word 2007 - and maybe earlier versions - lets
you switch kerning on an off, so you can see how much difference it makes.
Typically, for example, AV will be closer together than the individual
spacing of the letters would imply.]

I sort of assumed that APIs like ExtTextOut and DrawText would respect the
kerning adjustment, but it appears not. After that I looked for possible
flags in a LOGFONT which might change this aspect of the font its used to
create, but I can't see anything. So I'm a bit puzzled. Something ought
to be going on deep down in the truetype font engine and there must be
something at the Windows API level (if not at the MFC level) to make it
happen???

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm



From: Mihai N. on

> Something ought
> to be going on deep down in the truetype font engine and there must be
> something at the Windows API level (if not at the MFC level) to make it
> happen???

No, there is nothing. And there is no good reason for it to be.
Kerning is good for typography, where you deal with high resolutions.
The stuff on screen, at 72 dpi (or around that) should be as sharp
and clear as possible, so fancy stuff is left out.

Changes in that behavior resulted in major complaints
(for instance the first Safary port on Windows, and the first
previews of VS 2010)

A great interview here:
http://channel9.msdn.com/posts/scobleizer/Cleartype-Team-Typography-in-
Windows-Vista/


--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

From: David Webber on
"Mihai N." <nmihai_year_2000(a)yahoo.com> wrote in message
news:Xns9D35E3B5C2035MihaiN(a)207.46.248.16...
>
>> Something ought
>> to be going on deep down in the truetype font engine and there must be
>> something at the Windows API level (if not at the MFC level) to make it
>> happen???
>
> No, there is nothing. And there is no good reason for it to be.
> Kerning is good for typography, where you deal with high resolutions.
> The stuff on screen, at 72 dpi (or around that) should be as sharp
> and clear as possible, so fancy stuff is left out.

I could live with that on the screen, (though this stuff isn't *that* fancy)
but my WYSIWYG document prints exactly as it appears in the window - with no
kerning.

Is it not possible to *print* with kerning.

> A great interview here:
> http://channel9.msdn.com/posts/scobleizer/Cleartype-Team-Typography-in-
> Windows-Vista/

I'll get back to this when I have more time - it seems to be starting rather
slowly.

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm