From: Mihai N. on

> Can you tell me what "precision" parameter you used in the LOGFONT or
> CreateFont?

Here is the full dump:
lfHeight = -27
lfWidth = 0
lfEscapement = 0
lfOrientation = 0
lfWeight = 400
lfItalic = 0
lfUnderline = 0
lfStrikeOut = 0
lfCharSet = 0
lfOutPrecision = OUT_STROKE_PRECIS
lfClipPrecision = CLIP_STROKE_PRECIS
lfQuality = DRAFT_QUALITY
lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN
lfFaceName = _T("Times New Roman")

It is what the font selection dialog gives me by default, I did
not mess with it in any way.

And nothing fancy about the drawing either:

wnd->GetClientRect( &m_Rect );
CDC *pdc = wnd->GetDC();

CBrush brush(RGB(0xff,0xff,0xff));
pdc->FillRect( m_Rect, &brush );

CFont *pfOld = pdc->SelectObject( &m_Font );
pdc->SetBkMode( TRANSPARENT );
pdc->DrawText( inString, inString.GetLength(), m_Rect, 0 );
pdc->SelectObject( pfOld );

wnd->ReleaseDC( pdc );

And it might also matter how the kerning is created.
Some applications don't recognize the GPOS kern unless
ther is also a GSUB table (don't ask me why)

Might try to dump Times New Roman and take a look inside
TTX at http://www.letterror.com/code/ttx/ or
TTFdump at http://www.microsoft.com/typography/tools/tools.aspx
can come in handy


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

From: Mihai N. on

> I looked into Uniscribe some while back and it looked complicated. :-(

That's because it is :-)



> (And in any case the distinction between Latin and Arabic scripts is now
> essentially gone: the characters are just there at the appropriate Unicode
> code points in the font, and it would therefore seem odd if text output
> respected kerning in one area of the font but not another.)

Actually, Arabic fonts have very little use of kerning (if any).


--
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:Xns9D382EE5A03AMihaiN(a)207.46.248.16...
>
>> Can you tell me what "precision" parameter you used in the LOGFONT or
>> CreateFont?
>
> Here is the full dump:
> lfHeight = -27
> lfWidth = 0
> lfEscapement = 0
> lfOrientation = 0
> lfWeight = 400
> lfItalic = 0
> lfUnderline = 0
> lfStrikeOut = 0
> lfCharSet = 0
> lfOutPrecision = OUT_STROKE_PRECIS
> lfClipPrecision = CLIP_STROKE_PRECIS
> lfQuality = DRAFT_QUALITY
> lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN
> lfFaceName = _T("Times New Roman")
>...

Thanks - I appear to be using

logfont.lfOutPrecision = OUT_TT_PRECIS;
logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;

but the code dates from somewhere up to 20 years ago and I'm not sure if
I've reviewed it since! I'll investigate the difference.

>...
> And it might also matter how the kerning is created.
> Some applications don't recognize the GPOS kern unless
> ther is also a GSUB table (don't ask me why)
>
> Might try to dump Times New Roman and take a look inside
> TTX at http://www.letterror.com/code/ttx/ or
> TTFdump at http://www.microsoft.com/typography/tools/tools.aspx
> can come in handy

So far I've just been looking at text output. Conclusions are weird:

2. Microsoft Word 2007, under Vista or Windows 7, gives a choice - kerned
or unkerned. It works for Times New Roman and it also works for my font.

2a. My MFC App under Vista: doesn't kern either TNR; or my font.
2b. My MFC App under 7: kerns TNR but *doesn't* kern my font.

Looks like I may have to experiment with LOGFONT settings *and* learn about
GPOS and GSUB (about which I am thus far completely ignorant, so thanks for
the hint!)

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: Joseph M. Newcomer on
See below...
On Thu, 11 Mar 2010 00:17:15 -0800, "Mihai N." <nmihai_year_2000(a)yahoo.com> wrote:

>
>> Can you tell me what "precision" parameter you used in the LOGFONT or
>> CreateFont?
>
>Here is the full dump:
> lfHeight = -27
> lfWidth = 0
****
Note that it is unusual to provide a width other than 0 except for special effects
(nonzero value produce really weird-looking fonts!)
****
> lfEscapement = 0
> lfOrientation = 0
> lfWeight = 400
****
400 is FW_NORMAL
****
> lfItalic = 0
> lfUnderline = 0
> lfStrikeOut = 0
> lfCharSet = 0
> lfOutPrecision = OUT_STROKE_PRECIS
> lfClipPrecision = CLIP_STROKE_PRECIS
> lfQuality = DRAFT_QUALITY
> lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN
> lfFaceName = _T("Times New Roman")
>
>It is what the font selection dialog gives me by default, I did
>not mess with it in any way.
>
>And nothing fancy about the drawing either:
>
> wnd->GetClientRect( &m_Rect );
> CDC *pdc = wnd->GetDC();
>
> CBrush brush(RGB(0xff,0xff,0xff));
> pdc->FillRect( m_Rect, &brush );
>
> CFont *pfOld = pdc->SelectObject( &m_Font );
> pdc->SetBkMode( TRANSPARENT );
> pdc->DrawText( inString, inString.GetLength(), m_Rect, 0 );
> pdc->SelectObject( pfOld );
>
> wnd->ReleaseDC( pdc );
>
>And it might also matter how the kerning is created.
>Some applications don't recognize the GPOS kern unless
>ther is also a GSUB table (don't ask me why)
>
>Might try to dump Times New Roman and take a look inside
>TTX at http://www.letterror.com/code/ttx/ or
>TTFdump at http://www.microsoft.com/typography/tools/tools.aspx
>can come in handy
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: David Webber on

"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
news:k3kop557t378trcetmd7m4v1u8fckbc99a(a)4ax.com...

[LOGFONT]

> Note that it is unusual to provide a width other than 0 except for special
> effects
> (nonzero value produce really weird-looking fonts!)

Yes - I stick to zero as a matter of course.

>> lfWeight = 400
> 400 is FW_NORMAL

Yes - I usually use FW_NORMAL or FW_BOLD (=700 IIRC)

>> lfItalic = 0
>> lfUnderline = 0
>> lfStrikeOut = 0
>> lfCharSet = 0
>> lfOutPrecision = OUT_STROKE_PRECIS
>> lfClipPrecision = CLIP_STROKE_PRECIS
>> lfQuality = DRAFT_QUALITY
>> lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN
>> lfFaceName = _T("Times New Roman")

It doesn't look like any of these affect kerning and...

>>And it might also matter how the kerning is created.
>>Some applications don't recognize the GPOS kern unless
>>ther is also a GSUB table (don't ask me why)

As far as I can see (after a little reading) High Logic Font Creator
doesn't allow me a GSUB table.

>>Might try to dump Times New Roman and take a look inside
>>TTX at http://www.letterror.com/code/ttx/ or
>>TTFdump at http://www.microsoft.com/typography/tools/tools.aspx
>>can come in handy

So my next step is to look at these.

I am also starting to wonder if GDI+ text output will give different
results.

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