freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] smooth/ftgrays.c question


From: David Turner
Subject: Re: [ft-devel] smooth/ftgrays.c question
Date: Tue, 28 Nov 2006 09:41:19 +0100

Hello Tracey,

thanks for spotting these problems; I've commited a fix to the CVS that
gets rid of the hard-coded error values, as well as deal appropriately
with the 0-sized bitmap case.

The reason why -1 was being used is historical (the code started as something
independent that could be compiled without FreeType; we fixed it at some time
but apparently forgot a few error codes)

Let us know if you still encounter problems;

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)


On Mon, 27 Nov 2006 10:06:50 -0800, "Camp, TracyX E" <address@hidden> said:
> 
> I've writting a few simple unit tests for freetype as part of an effort
> to include freetype into the LSB (see http://www.freestandards.org/).
> I've ran across a test failure using some fronts from the freefont
> project (see http://www.nongnu.org/freefont/).  The test does various
> gratuitous rendering calls for each glyph in each face of each font at a
> variety of random sizes.  The FT_Render_Glyph() fails after awhile on a
> particular glyph with a error of -1 (this is the immediate question
> btw).  
> 
> I'm still tracing through code to figure out exactly why the but it
> doesn't seem right that FT_Render_Glyph() fails with -1 rather than a FT
> error code.  The point of failure is in smooth/ftgrays.c in
> gray_raster_render() where it checks that a target_map->buffer exists if
> params->flags does not have FT_RASTER_FLAG_DIRECT set.  The reason the
> buffer does not exist is because ft_smooth_render_generic() alloced a
> 0-byte buffer due to the bounding box for the glyph having yMin == yMax
> (the Y values in the outline struct all have the value 64 in this case -
> still trying to figure out why, it renders fine earlier in the test).
> 
> There is another point in gray_raster_render() that returns -1 rather
> than an FT_error as well.  These seem like 'this shouldn't happen'
> conditions, but obviously this particular condition can happen.
> 
> Thanks,
> 
> Tracy Camp
> 
> 
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype-devel




reply via email to

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