HylaFax needs fonts

Trying to use HylaFax on CentOS 6, I got the following message:

/usr/sbin/textfmt: No font metric information found for "Courier-Bold".
Usage: /usr/sbin/textfmt [-1] [-2] [-B] [-c] [-D] [-f fontname] [-F fontdir(s)] [-m N] [-o #] [-p #] [-r] [-U] [-Ml=#,r=#,t=#,b=#] [-V #] files... >out.ps
Default options: -f Courier -1 -p 11bp -o 0
Error converting data; command was "/usr/sbin/textfmt -B -f Courier-Bold        -Ml=0.4in -p 11 -s default

This means that the font Courier-Bold is not installed on the system. On my CentOS 6 installation, I got it working by performing the following actions:

  • adding /usr/share/enscript/afm to both FontMap: and FontPath: in /etc/hylafax/hyla.conf
  • run sed -i "s/Courier-Bold/cob/g" /etc/hylafax/typerules
  • also, you need to install the package enscript: yum -y install enscript
© GeekLabInfo HylaFax needs fonts is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

2 comments on “HylaFax needs fonts”

  1. Can You help me please

    Centos 5 last version

    Uname -a

    2.6.18-274.12.1.el5

    # sed -i "s/Courier-Bold/cob/g" /etc/hylafax/typerules

    # vim /etc/hylafax/hyla.conf

    FontPath: /usr/local/lib/ghostscript/fonts:/usr/share/ghostscript/8.70/Resource/Init:/usr/share/ghostscript/8.70/lib:/usr/share/ghostscript
    /8.70/Resource/Font:/usr/share/ghostscript/fonts:/usr/share/fonts/default/ghostscript:/usr/share/fonts/default/Type1:/usr/share/fonts/default/amspsfnt/pfb:/usr/share/fonts/default/cmpsfont/pfb:/usr/share/fonts/japanese:/etc/ghostscript:/usr/share/enscript/afm
    #FontPath: /usr/share/fonts/default/Type1
    FontMap: /usr/share/ghostscript/8.70/lib:/usr/share/enscript/afm

    # ls /usr/share/enscript/afm

    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 agd.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 agdo.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 agw.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 agwo.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 bkd.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 bkdi.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 bkl.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 bkli.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 cob.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 cobo.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 com.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 coo.afm
    -rw-r--r-- 1 root root 1.4K 2008-10-29 00:44 font.map
    -rw-r--r-- 1 root root 19K 2008-10-29 00:44 hv.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 hvb.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 hvbo.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 hvc.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 hvcb.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 hvcbo.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 hvcdo.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 hvn.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 hvnb.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 hvnbo.afm
    -rw-r--r-- 1 root root 19K 2008-10-29 00:44 hvno.afm
    -rw-r--r-- 1 root root 19K 2008-10-29 00:44 hvo.afm
    -rw-r--r-- 1 root root 12K 2008-10-29 00:44 matrix.afm
    -rw-r--r-- 1 root root 56K 2008-10-29 00:44 matrix.pfa
    -rw-r--r-- 1 root root 17K 2008-10-29 00:44 ncb.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 ncbi.afm
    -rw-r--r-- 1 root root 18K 2008-10-29 00:44 nci.afm
    -rw-r--r-- 1 root root 17K 2008-10-29 00:44 ncr.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 pob.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 pobi.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 poi.afm
    -rw-r--r-- 1 root root 16K 2008-10-29 00:44 por.afm
    -rw-r--r-- 1 root root 9.7K 2008-10-29 00:44 sy.afm
    -rw-r--r-- 1 root root 19K 2008-10-29 00:44 tib.afm
    -rw-r--r-- 1 root root 19K 2008-10-29 00:44 tibi.afm
    -rw-r--r-- 1 root root 19K 2008-10-29 00:44 tii.afm
    -rw-r--r-- 1 root root 19K 2008-10-29 00:44 tir.afm
    -rw-r--r-- 1 root root 17K 2008-10-29 00:44 zcmi.afm
    -rw-r--r-- 1 root root 9.5K 2008-10-29 00:44 zd.afm

    ERROR LOG

    Command died with status 255:
    "/usr/bin/faxmail". Command output: Font Courier:
    /usr/share/enscript/afm/Courier: Can not open font metrics file; using
    fixed widths. Font Helvetica-Bold: /usr/share/enscript/afm/Helvetica-Bold:
    Can not open font metrics file; using fixed widths. Font Helvetica-Oblique:
    /usr/share/enscript/afm/Helvetica-Oblique: Can not open font metrics file;
    using fixed widths. faxmail: listen: Permission denied

  2. Hi Koray,

    Please post the output of:
    grep -viE "^#" /etc/hylafax/typerules

    I'm running CentOS 6, my instructions may not work on CentOS 5. But let's see.

    I first thought of a permissions problem, but now I'm not so sure. But it's worth a shot. Do you have SELinux running? Don't permanently switch off SELinux, but you can disable it temporarily to debug.
    1. See the status by running sestatus
    2. Temporarily disable it by running setenforce 0
    3. Test faxmail again
    4. Re-enable security by running setenforce 1
    If it works with a disabled SELinux, you can write custom SELinux rules.

    What is the output of ls -aslZ /usr/bin/faxmail

Leave a Reply