[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I cannot figure out where to put the baseline...
From: |
David Turner |
Subject: |
Re: I cannot figure out where to put the baseline... |
Date: |
Tue, 11 Jul 2000 10:18:19 +0200 |
HI Paul,
What about using the yMax of the global bounding box ?
(after scaling it), as in
FT_MulFix( face->global_bbox.yMax, face->size->metrics.y_scale );
to get the value in 26.6 units..
Hope this helps,
- David
"Pedriana, Paul" a écrit :
>
> I cannot figure out where to place the baseline
> from the FreeType documentation. Once I know
> where to place the baseline, it is simple enough
> to calculate where to blit the character and where
> to advance the pen.
>
> If you want to write a text editor, you need to know
> the distance from the top of the full character cell
> down to the baseline (shown as "???" below). I cannot
> find out how to figure out this value from the FreeType
> documentation. It certainly is not equal to the Y bearing
> of any character, and it certainly isn't equal to the
> ascender for the character (since Y bearing is often
> greater than the ascender).
>
> So how do I find out what it is? The documentation doesn't
> seem to tell you how to do this rather important thing.
>
> ---------------------------------- -|
> |
> |
> * -| |
> * * | |
> * * | | ??? <---------
> * * |Y Bearing |
> ********* | |
> * * | |
> * * | |
> +* * -| -|
>
> -------------------------------------
>
> + => Current pen position at baseline.
> ??? => Unknown distance that I need to know.