nanogui: Freetype2 position Y problem


Previous by date: 29 Dec 2006 13:24:30 +0000 Freetype2 position Y problem, Teemu Keskinarkaus
Next by date: 29 Dec 2006 13:24:30 +0000 Problem While Using Freetype2 Support, pratish ganguly
Previous in thread: 29 Dec 2006 13:24:30 +0000 Freetype2 position Y problem, Teemu Keskinarkaus
Next in thread: 29 Dec 2006 13:24:30 +0000 Re: Freetype2 position Y problem, Teemu Keskinarkaus

Subject: Re: [nanogui] Freetype2 position Y problem
From: "Uwe Klatt" ####@####.####
Date: 29 Dec 2006 13:24:30 +0000
Message-Id: <01a501c72b4c$a1cc5420$081710ac@arnstein.miwe.de>

Hello,

> 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 use the following code (not in 0.91 but allready in cvs):
====================== font_truetype2.c ===============

        /*
         * Offset the starting point if necessary,
         * FreeType always aligns at baseline
         */
        if (flags & MWTF_BOTTOM) {
                pos.y = (abs(size->metrics.descender) + 63) & ~63;
/* descent */
        } else if (flags & MWTF_TOP) {
                pos.y = (size->metrics.ascender + 63) & ~63;
/* -ascent */
        } else {
                pos.y = 0;
        }


Bye
Uwe


Previous by date: 29 Dec 2006 13:24:30 +0000 Freetype2 position Y problem, Teemu Keskinarkaus
Next by date: 29 Dec 2006 13:24:30 +0000 Problem While Using Freetype2 Support, pratish ganguly
Previous in thread: 29 Dec 2006 13:24:30 +0000 Freetype2 position Y problem, Teemu Keskinarkaus
Next in thread: 29 Dec 2006 13:24:30 +0000 Re: Freetype2 position Y problem, Teemu Keskinarkaus


Powered by ezmlm-browse 0.20.