[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: need help! (font width vs. font height)
From: |
Werner LEMBERG |
Subject: |
Re: need help! (font width vs. font height) |
Date: |
Sat, 04 Nov 2000 02:15:52 +0100 (CET) |
> 1) once i have the font correctly scaled, i need to get "\baselineskip"
> from it. i tried face->size->metrics.height, but the value doesn't
> work (it's actually less than ascender-descender). i then used
> ascender-descender, which seems to work ok. is that right?
I rather suggest to multiply `ascender - descender' by a given value;
for example, TeX uses the factor 1.2 by default. Otherwise, the lines
are sticking.
> 2) now i have the height for the lines. but i still need the offset
> from the bottom of the line and the baseline. i tried
> face->size->metrics.descender, but this value seems to fall short
> about 2 pixels from the "real" value. the letter "j", for example,
> extends 2 pixels below the line. (i am using cmtt10 for tests).
I'm not exactly sure what you want, but what about the value
1.2 * (ascender - descender) - (ascender - descender)
= 0.2 * (ascender - descender)
Werner