[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Determining the size of space character

From: Russell Shaw
Subject: Re: [ft-devel] Determining the size of space character
Date: Tue, 22 Aug 2006 13:01:48 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060205 Debian/1.7.12-1.1

Ivan Tarapov wrote:

I am involved in a project that uses FLTK+microwindows on a linux-based system. We use freetype 2.2.1 for rendering of ttf fonts. I have been struggling for a long time to get it to determine the size in pixels of the passed string correctly. What I dug up is this:

Microwindows ultimately calls FT_Glyph_Get_CBox to determine the CBox for the character and calculates its size accordingly. It doesn’t work for space character. The CBox for space character turns out to be filled with zeroes, hence wrong pixelsize for the string. FT_Glyph_Get_CBox in its turn calls ft_outline_glyph_bbox which issues a call to FT_Outline_Get_CBox which does the calculations. However the calculations are based on the outline->n_points field, which is zero for the space character. This seems like a bug to me. Or maybe there is a workaround for this?

There was a bug in 2.2.1 to do with space characters that is fixed in cvs.
Try freetype from cvs.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]