[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FreeType: How do I calculate baseline position?
From: |
Pedriana, Paul |
Subject: |
FreeType: How do I calculate baseline position? |
Date: |
Sat, 27 May 2000 15:06:49 -0700 |
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? While I'm at it, I can't
figure out how to know what the cell height is either.
Maybe it is face->size->metrics.height, but I wouldn't
know from the documentation.
---------------------------------- -|
|
|
* -| |
* * | |
* * | | ???
* * |Y Bearing |
********* | |
* * | |
* * | |
+* * -| -|
-------------------------------------
+ => Current pen position at baseline.
??? => Unknown distance that I need to know.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FreeType: How do I calculate baseline position?,
Pedriana, Paul <=