#1 2013-06-12 23:33:47

kln
Member
Registered: 2013-06-12
Posts: 1

TGDIPages.GetLineHeight

Hello,

i think that :
GetLineHeight would probably be tm.tmHeight + tm.tmExternalLeading not tm.tmHeight + tm.tmInternalLeading + tm.tmExternalLeading

tmInternalLeading
Specifies the amount of leading (space) INSIDE the bounds set by the tmHeight member. Accent marks and other diacritical characters may occur in this area. The designer may set this member to zero.

so when you add tm.tmInternalLeading it is counted two times.

Offline

#2 2013-06-13 07:16:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: TGDIPages.GetLineHeight

It is true, from the font definition perspective.

My concern is that we need some blank space between the lines, for proper rendering.
So I've used this formula to add a little space, so line height returns 1.125 of actual glyph height:

fLineHeight := ((tm.tmHeight+tm.tmExternalLeading)*9)shr 3;

See http://synopse.info/fossil/info/93292f21a4

Offline

Board footer

Powered by FluxBB