[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Question about font size
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Question about font size |
Date: |
Sun, 10 Sep 2006 15:09:54 +0200 (CEST) |
> I would expect to get a character size around 1.0. For 'j' I get
> 0.485149 :(
> float h=face->size->metrics.height;
It seems that you haven't read the documentation about `height':
height :: The height is the vertical distance
between two consecutive baselines,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
expressed in font units. It is always
positive. Only relevant for scalable
formats.
With other words, it doesn't give the maximum size of a letter but the
distance between to text lines, normally larger than the largest
character. You probably want to use the `ascender' and `descender'
fields of FT_Size_Metrics.
Werner