[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Type 1 fonts not downloading
From: |
Deri |
Subject: |
Re: Type 1 fonts not downloading |
Date: |
Mon, 21 Aug 2023 11:26:40 +0100 |
On Monday, 21 August 2023 06:47:37 BST Phil Chadwick wrote:
> Hi,
>
> 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".
Hi Phil,
Is it possible to provide your Type1Fonts/Dot-Matrix.ps and the corresponding
.pfb file you mention? I'd like to try to reproduce the problem.
Cheers
Deri