[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] Line space calculation in FT 1

From: Antoine Leca
Subject: Re: [Freetype] Line space calculation in FT 1
Date: Fri, 23 Apr 2004 17:41:32 +0200

Hi Rob,

On Friday, April 23, 2004 4:46 PM, Rob Kramer va escriure:

> On Friday 23 April 2004 02:46 am, Antoine Leca wrote:
>>> How do I convert the 1697 to a number of pixels?
>> As with any quantity: dividing with EM and multiplying the point size
>> (really the other way ;-)).
> Point size, as in 15 point font?

Really, I should have written pixel size. That is, adjusted for the screen
resolution when it differs from 72. (It you do not know, assume 96). But you
got that.

> I tried according to the FT2 docs, design metrics -> device metrics
> (TrueType only),
> (y_ppem / units_per_em) * design_y
> (20 / 2048) * 1697 = 16.57
> And 16 pixels is barely high enough to fit a glyph in, so the lines
> would be very close together indeed.

Well, first it should be 17!

I notice you found something wrong above. With 34 pixels, I believe the
result will appear quite stretched.

Meanwhile, I took a look at FT2.
In fact, FT2 goes the easy way, and always use the Apple formula
(Ascent-Descender+Line_Gap, all from horizontal->*). Which in your case will
result in a BTBD of 1220 (24 pixels), quite a bit more aesthetical, I
believe ;-). But probably there may be cases of collisions between high
diacritics and low descenders. Now, this in turn will depend on the script
coverage you are intending...

Hope it helps,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]