From: John H. <jd...@gm...> - 2009-08-31 00:44:28
|
On Sun, Aug 30, 2009 at 5:47 PM, Andrew Straw<str...@as...> wrote: > John Hunter wrote: >> On Sun, Aug 30, 2009 at 4:17 PM, John Hunter<jd...@gm...> wrote: >>> According to RobK, you can reconfigure your ubuntu system to turn >>> these off. He suggests: >>> >>> To use autohinting, use the hint in this post, or just run the >>> following command: >>> >>> sudo dpkg-reconfigure fontconfig-config >>> >>> then choose “autohinter”, then choose “always”, then choose “no” >> >> If that doesn't work, this guy has more involved instructions on how >> to rebuild ubuntu libfreetype and disable the bytecode patch >> >> http://ubuntuforums.org/showthread.php?t=84359 > > OK, I disabled all Ubuntu patches to libfreetype and recompiled and > re-installed it. Unfortunately, I'm still getting the same failures. > > Then I additionally installed fontconfig-config and did the > dpkg-reconfigure fontconfig-config step, setting everything to "Never". > Same failures. > > These font errors make me unhappy. I think we should test some very > simple pure libfreetype C program outputs generated on the various > machines. I've just been playing with ftview, but that doesn't seem to > have a command-line interface to save directly to a file. Attached is "example1.c" from the freetype tutorial. When I wrote ft2font, I started with this tutorial and built around it, so some of the core logic is the same. A lot has been added since then, including a lot of stuff Michael has added to improve hinting, so we may not see any differences at this level. The program outputs an ascii-art file to stdout, so we could start by checking the md5 on the output. Since *most* of your unit tests agree with the baseline, we may struggle to find a difference. I compiled the example with gcc -I/Users/jdhunter/dev/include -I/Users/jdhunter/dev/include/freetype2 -L/Users/jdhunter/dev/lib -o example1 example1.c -lfreetype and ran it with ./example1 ~/mpl/lib/matplotlib/mpl-data/fonts/ttf/Vera.ttf "this is a test" > run.out my md5 on the output is home:~/tmp> md5 run.out MD5 (run.out) = 01868827436d858b4452ff03f80f7222 The example and output are attached -- we could easily replace the example "show_image" with a binary output file that we could read into numpy arrays to diff or display with imshow. I'm available to skype if you want to brainstorm this. JDH |