Dear FreeTypers,
It looks like ft_outline_ignore_dropouts is ignored, and doesn't
appear anywhere in the source except where it's defined in ftimage.h.
Also, in ftraster.c, dropOutControl is used in some conditionals,
but it's only assigned the value 2 and there appears to be no way
for it to have any other value (without editing ftraster.c), so it's
effectively constant.
This matters in the rendering of Chinese horizontal strokes, as
illustrated here:
http://www.wenlin.com/ft_heng1.jpg
There are two problems. First, a "protruberant pixel" at the lower
right corner of the first of the four strokes (and another one at
the upper left corner). This can be fixed by changing the line
"ras.dropOutControl = 2" to "ras.dropOutControl = 0" in
Render_Glyph() in ftraster.c. Probably this ought to be the effect
of ft_outline_ignore_dropouts. The result is the following:
http://www.wenlin.com/ft_heng2.jpg
The second problem is, the four strokes are not equally thick. The
coordinates of the outlines are such that the thickness should be
uniform, and only the decorations (or serifs) at the left and right
ends should differ. The uneven effect can be seen in the following
Chinese characters:
http://www.wenlin.com/ft_heng3.jpg
http://www.wenlin.com/ft_heng4.jpg
For the thickness, it seems to make no difference what the value of
dropOutControl is; ft_outline_single_pass and
ft_outline_high_precision don't seem to matter either.
I'm directly filling in an FT_Outline and calling
FT_Outline_Render(). The simplest (undecorated) outline is a
rectangle. The left-side decoration is two straight lines. The
right-side decoration (the bump) is one straight line and one curve
(with two off-curve control points). Characters are rasterized one
stroke at a time. The "undecorated" versions are used where strokes
overlap.
I've tried stepping through the code in ftraster.c, but haven't
managed yet to understand it. One thing that makes this harder is
that I can't set breakpoints in ftraster.c (using OS X Project
Builder, which is a shell around the GNU compiler/debugger); maybe
the reason is that the project only contains raster.c, which has the
line
#include "ftraster.c"
Has anyone else found this to be a problem? IDE's may not be good at
handling this kind of code, where #include is used for .c rather
than .h files.
Tom Bishop
--