The stroker mishandles merged ends.
I have encountered another issue with FreeType 2.10.4 relating to the new T1 engine. The situation when this issue was encountered was the same as #1017 (closed), but this issue concerns a different PDF and hence a different font file.
The attached font is from this other PDF. The attached test program exhibits the issue which is affected by our old workaround (setting T1_CONFIG_OPTION_OLD_ENGINE
) as well as whether or not FT_LOAD_NO_HINTING
is set when loading the problematic glyph.
First I compile two variants of FreeType at git tag VER-2-10-4 like so:
cd freetype-old-engine
CFLAGS=-DT1_CONFIG_OPTION_OLD_ENGINE ./autogen.sh
CFLAGS=-DT1_CONFIG_OPTION_OLD_ENGINE ./configure --prefix=$PWD/installed
make install
cd..
cd freetype-new-engine
./autogen.sh
./configure --prefix=$PWD/installed
make install
cd..
Then I compile my test program like this:
gcc -O0 -g -o testing -Ifreetype-old-engine/installed/include/freetype2/ -I/usr/include/libpng16 testing.c -Lfreetype-old-engine/installed/lib/ -lfreetype
Finally I run the test program with the supplied font like so:
LD_LIBRARY_PATH=freetype-old-engine/installed/lib/ ./testing font.pfb 0 > old-engine-no-hinting.pgm
LD_LIBRARY_PATH=freetype-old-engine/installed/lib/ ./testing font.pfb 1 > old-engine-hinting.pgm
LD_LIBRARY_PATH=freetype-new-engine/installed/lib/ ./testing font.pfb 0 > new-engine-no-hinting.pgm
LD_LIBRARY_PATH=freetype-new-engine/installed/lib/ ./testing font.pfb 1 > new-engine-hinting.pgm
I have attached these four images for your convenience: old-engine-no-hinting.pgm, old-engine-hinting.pgm, new-engine-no-hinting.pgm, new-engine-hinting.pgm
There are no perceptible differences between old-engine-no-hinting.pgm
and old-engine-hinting.pgm
.
However new-engine-no-hinting.pgm
differs significantly from old-engine-no-hinting.pgm
since there is a big spike at the tip of the a
. This suggests to me that there is a case where the new T1 engine has issues we didn't see with the old T1 engine. Moreover old-engine-no-hinting.pgm
and old-engine-hinting.pgm
also differ from each other, the spike at the tip of the a
gets smaller, but the spike at the internal loop of the a
is extended. This suggests to me that the issues between the new and old T1 engine might be related hinting.
If there is any further information I can provide to make it easier to confirm or fix the issue, let me know.