[GRASS-dev] Re: [bug #4905] (grass) gis.m: d.text.freetype does not allow spaces in text

Huidae Cho grass4u at gmail.com
Wed Aug 30 12:41:16 EDT 2006


On Wed, Aug 30, 2006 at 03:16:04PM +1200, Hamish wrote:
> William Kyngesburye wrote:
> 
> > Do you know what fonts you were trying to use that didn't work?  Most 
> > of the common fonts that come with OSX are dfonts (Apple's fonts) and 
> > 
> > suitcase TT fonts (the M$ fonts).  There are a few unix-style .ttf  
> > fonts in the system (but those tend to be other language script  
> > fonts), and some OTF Japanese fonts.
> > 
> > X11 vs Aqua shouldn't affect freetype itself.  Though if you use  
> > Apple's X11-bundled freetype, I found that suitcase font support is  
> > disabled there, and only dfonts and unix-style fonts work.
> 
> 
> Hi,
> 
> just testing d.text.freetype on GRASS 6.3 (including just-now fix from
> Glynn for main.c) I'm still getting a crash (SIGFPE) if the text=""
> contains a space. The debugger traces it to this call in main.c (line
> 1040).
> 
>         if(FT_Render_Glyph(face->glyph, ft_render_mode_mono))
> 	{
> 
> i.e. it breaks within FT_Render_Glyph() if ch=32; it doesn't make it as
> far as Glynn's new code (the next line).
> 
> in the terminal:
> Floating point exception
> Monitor <x0>: Premature EOF
> 
> Similar problems with GRASS 6.0.2 and 6.1.0 (!). I'm a little surprised
> to find this in 6.0.2 as I've been using the same Debian/stable setup
> for a while so nothing has changed much. I guess I've been using
> d.font.freetype + d.text mostly, but I'm surprised none the less. In
> 6.0.2 it gives a segmentation fault, not a FPE.
> 

Hamish,

I've changed FT_LOAD_DEFAULT to FT_LOAD_NO_BITMAP not to try to load
embedded bitmaps.  Could you please test this code?

Thank you.
Huidae




More information about the grass-dev mailing list