[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: |
Boris Letocha |
Subject: |
RE: I cannot figure out where to put the baseline... |
Date: |
Tue, 11 Jul 2000 08:02:43 +0200 |
It is ascender. But in Times New Roman this value is smaller for same
European characters than Y Bearing, this is shit :-).
May be I sugest to add half of linegap (height-ascender-descender) *0.5 to
ascender and half add to descender and forget linegap ...
Also line size in text processor is 120% of height by standard(???).
Also problem is that some characters have negative X Bearing! eg. "j" in
Arial I think.
But Yes I wnat to hear some more qualified answer from authors of FreeType
...
Another answer for topic: Renderer?
In gray scale renderer you can specify span callback. But there is only one
done to grayscale bitmap ... So you have to write it yourself.
Boris Letocha
> 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.