[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] smooth/ftgrays.c question
From: |
Camp, TracyX E |
Subject: |
[ft-devel] smooth/ftgrays.c question |
Date: |
Mon, 27 Nov 2006 10:06:50 -0800 |
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
- [ft-devel] smooth/ftgrays.c question,
Camp, TracyX E <=