bug-a2ps
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a2ps 4.13: Hyphen character being rendered as a box.


From: Trent Nelson
Subject: a2ps 4.13: Hyphen character being rendered as a box.
Date: Sun, 29 Jul 2001 18:48:29 +0800
User-agent: Mutt/1.2.5i

Hi,

    I've come to the point where I've torn far too much of my hair out
    trying to work this problem out - so I think it's about time I
    shared it with you.

 PROBLEM DESCRIPTION

    When using the font SAS Monospace, a2ps is displaying the hyphen
    character as a box instead of the "dash" I would expect to see.

    SAS Monospace and SAS Monospace Bold were originally TrueType fonts
    that I converted to .afm/pfa formats using the tool ``ttf2pt1''.

 SO WHAT MAKES THIS AN A2PS PROBLEM?

    I've been using the resulting fonts as my terminal font in X Windows
    for the past few months (XFree86 4.1.0) and all characters display
    correctly.  

    Today, I also set out to see if I could find something else that did
    text->PostScript conversion to see if it also rendered the hyphen as
    a box using the SAS Monospace font.

    After playing with enscript for a while and getting it to recognise
    my fonts (after realising I forgot to copy the .pfa files into
    enscript's directory), it turns out that enscript renders the font
    fine.

    So, I've pretty much eliminated the possibility of having faulty
    font files.

 OBSERVATIONS

    What I find strange is that in the two PostScript files from a2ps
    and enscript (which are attached to this e-mail), they both include
    the exact copy of the contents in SASMONO.TTF.pfa.  As far as I can
    tell, this means the font is being defined exactly the same way in
    each case - so there's something else a2ps is doing to make that one
    character turn into a box.

 WHAT OUTPUTS ARE DISPLAYING THE CHARACTER AS A BOX?
    (i.e printer, Ghostview, etc)

    Everything.  The following is a listing of everything I've tried:

        *   Oce 3150 printer (native PostScript, high-end commercial)
        *   HP 8100 printer
        *   ``gv'' on FreeBSD and Linux, relying on Ghostscript 6.5.
        *   ``gs'' raw X11 display.

 DETAILS

    This problem has occured on FreeBSD 4.2-RELEASE, 4.3-RELEASE &
    RedHat 6.2 (kernel 2.2.14-5 from memory (I try to avoid using it at
    work)).  I'm using GNU a2ps 4.13.  Version 3.3.4 of ``ttf2pt1'' was
    used to convert the fonts.  Compiler details are as follows:

% gcc -v
Using builtin specs.
gcc version 2.95.3 [FreeBSD] 20010315 (release)

% cpp -v
Using builtin specs.
gcc version 2.95.3 [FreeBSD] 20010315 (release)
 /usr/libexec/cpp -lang-c -v -Di386 -D__FreeBSD__=4
 -D__FreeBSD_cc_version=430000 -Dunix -D__i386__ -D__FreeBSD__=4
 -D__FreeBSD_cc_version=430000 -D__unix__ -D__i386 -D__unix -Acpu(i386)
 -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386)
 -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ -
 GNU CPP version 2.95.3 [FreeBSD] 20010315 (release) (i386 FreeBSD/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /usr/include
End of search list.
The following default directories have been omitted from the search
path:
 /usr/include/g++
End of omitted list.

    a2ps was installed as the ``a2ps-a4'' port on FreeBSD, and, from
    memory, an RPM on RedHat.

 WHAT FILES HAVE BEEN ATTACHED?

    I've attached the following files to this e-mail:

     *  SASMONO.TTF.afm, SASMONO.TTF.pfa 
            These are the font files I've placed in afm/ & fonts/
            respectively.  They were created by the following command:

                % ttf2pt1 -e SASMONO.TTF

            Which creates the .afm and .pfa files in the current
            directory.

     *  example.a2ps.ps, example.enscript.ps
            These files were created using the following commands:

% a2ps -v --prologue=test -o example.a2ps.ps example.txt

% enscript -v address@hidden -p example.enscript.ps example.txt  

    ``example.txt'' is simply a text file containing the following:

        "The following character is a hyphen (0x2d): -".

     *  test.pro is the prologue specifying the SAS Monospace font.

    As you'll be able to see, example.enscript.ps has the hyphen
    displayed correctly, whereas example.a2ps.ps has the box instead.

    If you could shed some light on this problem - and even offer a
    quick-hack solution (pending a proper fix) - I'd be extremely
    grateful.  I think a2ps is a great program and I'm working towards
    having it handle just about everything on our print server at work.

    If you'd like to have a copy of the original TrueType files:

        http://members.dingoblue.net.au/~tpnelson/SASMONO.TTF
        http://members.dingoblue.net.au/~tpnelson/SASMONOB.TTF

    The homepage for ``ttf2pt1'' is:

        http://ttf2pt1.sourceforge.net

    Thanks in advance!

    Regards,

        Trent.

--
Trent Nelson - Software Engineer - address@hidden
    "A man with unlimited enthusiasm can achieve
            almost anything." --unknown

Attachment: SASMONO.TTF.pfa
Description: Text document

Attachment: SASMONO.TTF.afm
Description: Text document

Attachment: example.enscript.ps
Description: PostScript document

Attachment: example.a2ps.ps
Description: PostScript document

Attachment: test.pro
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]