HylaFAX The world's most advanced open source fax server |
I fixed the textfmt problem thanks to a posting I found on an Ubuntu mailing list (thanks chrisrd, whoever you are) I tried a myriad of combinations to get the Fontmap parameter right, but this script put the right entries into hyla.conf #!/bin/bash fm=`locate Fontmap | perl -ne 'chomp; if (s!/Fontmap(?:\.GS)?$!!) { $d{$_}=1; } END { print join(":", keys %d), "\n" } '` James Smith Network Administrator 812.481.7215 direct 812.309.9708 cell james.smith@xxxxxxxxx From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx] On Behalf Of James Smith It looks like when textfmt is invoked via sendfax, it works ok but when its invoked via the mailfax route, it fails From: Matthew Nickerson [mailto:mnickerson@xxxxxxxxxx] Sounds like the same problem I had. Here’s the solution that worked for me. Just make the change to hyla.conf: ------------------------------------------------------------------------------------------ Here's what's going on... In Fontmap.HylaFAX it gives Courier-Bold as an alias for NimbusMonL-Bold. ------------------------- (Courier-Bold) /NimbusMonL-Bold ; ------------------------- NumbusMonL-Bold is expected to be found in n0220041.pfb ------------------------- (NimbusMonL-Bold) (n022004l.pfb) ; ------------------------- Searching the hard drive for the n0220041.pfb file finds it in two places... lee@ubuntu6767:/var/spool/hylafax/etc$ find / -name n022004l.pfb 2>/dev/null /usr/share/fonts/type1/gsfonts/n022004l.pfb /var/lib/defoma/gs.d/dirs/fonts/n022004l.pfb However, textfmt is going to need the associated font metric file, and that only exists in one of those two places... lee@ubuntu6767:/var/spool/hylafax/etc$ find / -name n022004l.afm 2>/dev/null /usr/share/fonts/type1/gsfonts/n022004l.afm So I changed your hyla.conf file to read... lee@ubuntu6767:/var/spool/hylafax/etc$ cat /usr/local/lib/fax/hyla.conf FontMap: /var/spool/hylafax/etc FontPath: /usr/share/fonts/type1/gsfonts Now it works fine. For what it's worth, the problem appears to be a bug in the Debian Ghostscript package. The 'gs -h' output should include /usr/share/fonts/type1/gsfonts, but it doesn't. So it means that the Debian Ghostscript package is installing at least some fonts in a directory that is unknown to Ghostscript. This Debian Ghostscript bug has been around a long time. This is why I use the configure option: --with-PATH_AFM="/usr/share/fonts/type1/gsfonts" ... in my build script for building the HylaFAX+ Debian binary (.deb file) that is available on the Sourceforge files download page (both the build scripts and the binaries are available for download there). It may be wise to run 'make distclean' and then re-run configure (with the suggested option), make and then make install. Thanks, Lee. From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx] On Behalf Of James Smith The distro is Ubuntu 10.04 with backports repository, which probably explains the FontMap line, but I have no idea why textfmt isn’t seeing the font metrics From: Matthew Nickerson [mailto:mnickerson@xxxxxxxxxx] What version of linux are you on? From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx] On Behalf Of James Smith Ok, a bit more digging and I found that in the hyla.conf entry for FontMap was pointing to a non-existant directory so I pointed it to the one that does exist like so:- FontMap: /usr/share/ghostscript/8.71/lib But the textfmt command that is called by the script is still saying it cant find the font metrics. It’s looking like it should be easy to fix, but I don’t know the spell to cast to get the textfmt command to see the font metrics Any ideas anybody? From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx] On Behalf Of James Smith Ok, I fixed the initial script errors, but now faxmail is throwing me font errors Font Courier: /usr/share/fonts/type1/gsfonts/Courier: Can not open font metrics file; using fixed widths. Font Helvetica-Bold: /usr/share/fonts/type1/gsfonts/Helvetica-Bold: Can not open font metrics file; using fixed widths. Font Helvetica-Oblique: /usr/share/fonts/type1/gsfonts/Helvetica-Oblique: Can not open font metrics file; using fixed widths textfmt: No font metric information found for "Courier-Bold". I looked in the dir for the fonts mentioned and there are no font files with names, just numbers Now I really am lost From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx] On Behalf Of James Smith Hi I’m trying to get a mail to fax gateway going using the supplied mailfax script with postfix The problem I’m having is that the script is returning an error when it tries to process an email (Command died with status 2: "/usr/bin/mailfax". Command output: /usr/bin/mailfax: 121: Bad substitution ) I’ve typed the command in at the prompt with the parameters on the server just to check and it gives the same error The line in question is TMPVAR=${USER//\`/} Any ideas anyone? Thx |