bug-groff
[Top][All Lists]
Advanced

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

[bug #64577] [grops] can't embed/download fonts from a subdirectory


From: G. Branden Robinson
Subject: [bug #64577] [grops] can't embed/download fonts from a subdirectory
Date: Mon, 21 Aug 2023 05:58:34 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64577>

                 Summary: [grops] can't embed/download fonts from a
subdirectory
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Mon 21 Aug 2023 09:58:32 AM UTC
                Category: Driver grops
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 21 Aug 2023 09:58:32 AM UTC By: G. Branden Robinson <gbranden>
Filing on behalf of Phil Chadwick <phil.chadwick@claremont.farm>, who
[https://lists.gnu.org/archive/html/bug-groff/2023-08/msg00196.html reported
it to the bug-groff list].

***

I have just discovered that as of GNU grops (groff) version 1.23.0
groff no longer downloads and encodes PostScript fonts into documents.

This is the method by which I create fully self-contained PostScript
documents that can be viewed or printed anywhere (because all the fonts
are encoded within the document).

The method by which this is done is to configure access to the PostScript
fonts in the devps/download file by appending the font name and location
(relative to the devps directory), e.g.


    [strand.178] $ uname -a
    FreeBSD strand.my.dom 13.2-RELEASE-p2 FreeBSD 13.2-RELEASE-p2 GENERIC
amd64

    [strand.148] $ cd /usr/local/share/groff/1.23.0/font/devps

    [strand.149] $ cat download
    # PostScript-name       Filename
    # These three come standard with groff
    Symbol-Slanted          symbolsl.pfa
    ZapfDingbats-Reverse    zapfdr.pfa
    FreeEuro                freeeuro.pfa
 
    Dot-Matrix      Type1Fonts/Dot-Matrix.ps


Thyere is also a font metrics file: 


    [strand.150] $ head -10 Dot-Matrix
    name Dot-Matrix
    internalname Dot-Matrix
    spacewidth 750
    encoding text.enc
    charset
    ha  750,803 2       0000    asciicircum
    ti  750,803 2       0001    asciitilde
    :Y  750,803,53      2       0006    Ydieresis
    tm  750,803,303     3       0007    trademark
    aq  750,803 2       0010    quotesingle


And a Postscript font:


    [strand.158] $ file Type1Fonts/Dot-Matrix.ps
    Type1Fonts/Dot-Matrix.ps: PostScript Type 1 font text (Dot-Matrix 1.000)


In the past a "\f[Dot-Matrix]" directive would cause groff to encode the
Dot-Matrix.ps font file into the PostScript document it produced.


    [strand.487] $ cat e.nr
    \f[Dot-Matrix]Hello world

    [strand.488] $ groff -Tps e.nr >e.ps
    grops:<standard input>:(e.nr):20: error: failed to open PostScript
resource
'Type1Fonts/Dot-Matrix.ps': No error: 0


That error message is new to groff version 1.23.0.

The font Dot-Matrix is not encoded into the output file:


    [strand.142] $ grep Dot-Matrix e.ps
    %%DocumentNeededResources: font Dot-Matrix
    %%IncludeResource: font Dot-Matrix
    /Dot-Matrix@0 ENC0/Dot-Matrix RE
    /F0 10/Dot-Matrix@0 SF(Hello)72 12 Q(world)7.5 E 0 Cg EP


With GNU grops (groff) version 1.22.4, I get what I want and expect:


    [sherman.134] $ grep Dot-Matrix e.ps     
    %%+ font Dot-Matrix
    %%BeginResource: font Dot-Matrix
    %!PS-AdobeFont-1.0: Dot-Matrix 1.000
    FontDirectory/Dot-Matrix known{/Dot-Matrix findfont dup/UniqueID
known{dup
    /FontName /Dot-Matrix def
    /Dot-Matrix@0 ENC0/Dot-Matrix RE
    /F0 10/Dot-Matrix@0 SF(Hello)72 12 Q(world)3.33 E 0 Cg EP


The groff version 1.23.0 e.ps file:

    - displays correctly on an X11 screen using gv, probably because
      ghostscript knows where to find the pfb files for the Type 1 fonts.

    - will not print correctly (the PostScript printer knows nothing about
      the Dot-Matrix font), nor can I send the document to someone else to
      view (because they won't have the Dot-Matrix font).

I think it's a bug.  Sincerely hoping it's not a "feature".







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64577>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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