Sunday, October 17, 2010

Converting text files to fax fails - Hylafax, Ghostscript, FC10

I have been trying to solve the infamous error:

/usr/sbin/textfmt: No font metric information found for "Courier-Bold"

when running sendfax to test asterisk + hylafax.

This is a bug in ghostscript-8.70-1 & fonts for Fedora Core 10. So if you are not using FC10 this may not be the answer you 're looking for.

To fix the error:

1) Download & extract latest ghostscript-fonts http://sourceforge.net/projects/gs-fonts/
2) View the fonts.dir file and locate the file name of the font you wish to use for Courier-Bold, I chose n022004l.pfb
3) Copy n022004l.* (2 files) to /usr/share/fonts/default/ghostscript/
4) Edit /usr/share/ghostscript/8.70/Resource/Init/Fontmap.GS and change:

/Courier-Bold /NimbusMonL-Bold ;

to:

/Courier-Bold (n022004l.pfa) ;

Try it now and it should work.

Of course this is just one of many solutions, the main point being that NimbusMonL-Bold cannot be found and causing the issue.

2 comments:

Anonymous said...

this was exactly what i needed to solve this problem with the fonts. i had tried alot of suggestions found on the web and only your hint helped.

just a note: I use Centos 5.8 and my files where not pfa, but pfb, so this worked:

%/Courier /NimbusMonL-Regu ;
/Courier (n022003l.pfb) ;
% /Courier-Bold /NimbusMonL-Bold ;
/Courier-Bold (n022004l.pfb) ;

Anonymous said...
This comment has been removed by a blog administrator.