nanogui: Freetype2 position Y problem
Subject:
Freetype2 position Y problem
From:
Teemu Keskinarkaus ####@####.####
Date:
29 Dec 2006 11:23:13 +0000
Message-Id: <FB4B49604ADFD949A9F32F2D8E6C4D470197DE94@alban.ccs.local>
Hi,
I recently posted here about problem with TTF fonts. That was solved, but
then I had new problem that the fonts were too high.
I debugged the problem and found out that in engine/font_freetype2.c in
function freetype2_drawtext there is a bug in code that counts value for
pos.y. It doesn't count the baseline in pos.y thus the text is baseline
amount too high. If I add the baseline value to the pos.y I get the text
where I want them to be. Except that now I'm using fixed value for baseline
so it works only for one font. With some other font it might be wrong so I
need to calculate the baseline for each fonts or save that value in
font-struct.
I'm using NanoX version 0.91. Is this known bug or am I just using some
fonts that are different that NanoX was tested? Same problems occurs on
multiple fonts so it's not one font's problem. There are no problems with
'built-in' fonts.
Teemu Keskinarkaus
CC-Systems