Comment 9 for bug 807726

Revision history for this message
Tani Hosokawa (tani-a) wrote :

I believe I have figured out a simple workaround, as well as a pretty good clue as to the source of this error. For me, it turned out that there were a couple of broken .ttf files, specifically

/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf

/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-BoldItalic.ttf

The bug is more easily duplicated by running

# xfstt --sync

When you run that, you can see it going through the font directories in /usr/share/fonts until you hit a crash. Then you can weed out the broken fonts from that directory, and the problem will go away completely.

I also had two broken .ttf files from a private font package, which probably won't affect most people, but to find them I just copied all the fonts from the directory that had broken fonts and used this perl script to iterate through them until I got a stack trace from xfstt. It might be useful for people who have additional broken .ttf files that aren't in a standard .deb

#!/usr/bin/perl

my $dir = "ttf-dejavu";
opendir D, "/root/$dir";
while (my $filename = readdir D) {
   -f "/root/$dir/$filename" or next;
   print "$filename\n";
   system "mv","/root/$dir/$filename","/usr/share/fonts/truetype/$dir";
   system "xfstt --sync";
   <STDIN>;
}
closedir D;