public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: linux-man@vger.kernel.org
Subject: Re: man-pages PDF book: fonts
Date: Mon, 25 Mar 2024 12:40:07 +0100	[thread overview]
Message-ID: <ZgFioIO94vFupB53@debian> (raw)
In-Reply-To: <20240325041954.fofjtgghwhe4znm6@illithid>

[-- Attachment #1: Type: text/plain, Size: 3955 bytes --]

Hi Branden!

On Sun, Mar 24, 2024 at 11:19:54PM -0500, G. Branden Robinson wrote:
> Hi Alex,
> 
> At 2024-03-22T18:35:02+0100, Alejandro Colomar wrote:
> > I see that Debian provides the Tinos font in some package:
> > 
> > $ apt-file find -x Tinos.*pf
> > texlive-fonts-extra: /usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos-Bold.pfb
> > texlive-fonts-extra: /usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos-BoldItalic.pfb
> > texlive-fonts-extra: /usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos-Italic.pfb
> > texlive-fonts-extra: /usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos.pfb
> > 
> > The above is .pfb, not .pfa, which I don't understand and may not be
> > usable for our purposes,
> 
> PFA and PFB are closely related font file formats.  Reputedly, they
> stand for "PostScript" (or "Printer") "Font" "ASCII" or "Binary",
> respectively.  PFB was much more widely used on MS-DOS, due either to
> the meager disk space there, the 640kB RAM limit, or because it was
> thought that the fonts would be "pirated" (or even understood) less
> because the nature of their contents was less obvious.  Who knows?
> 
> Regardless, groff provides a tool for converting uncouth PFB to
> civilized PFA.
> 
> $ apropos pfbtops
> pfbtops (1)    - translate Printer Font Binary files to PostScript ASCII
> 
> The grops(1) and gropdf(1) man pages in groff 1.23.0 discuss using this
> tool to prepare fonts so that groff can read them.

Hmmm, so I could add a Makefile target to produce this .pfa font from
the packaged .pfb one, and then get gropdf(1) to use this one.  --Using
a Makefile pays for itself.--  The process is fast, it seems.

$ time pfbtops \
	/usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos.pfb \
| wc -l
19570

real	0m0.012s
user	0m0.015s
sys	0m0.001s

I'll try it.  This should remove a gigantic file from the project
repository.  Thanks!  =)

> (Why not "pfbtopfa"?  Ghostscript was already using that name.  Why does
> groff provide a tool that does the same thing?  Good question.  I don't
> know.  It is not a young program--it is old.[1]  Maybe at one time groff
> was portable to MS-DOS but Ghostscript was not.)

Which one do you recommend?  pfbtopfa(1) seems to have problems:

$ pfbtopfa /usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos.pfb
Error: /invalidfileaccess in --file--
Operand stack:   in1   (/usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos.pfb)   (r)
Execution stack:   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1949   1   3   %oparray_pop   1948   1   3   %oparray_pop   1933   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--
Dictionary stack:   --dict:746/1123(ro)(G)--   --dict:0/20(G)--   --dict:88/200(L)--
Current allocation mode is local
Last OS error: Permission deniedCurrent file position is 980
GPL Ghostscript 10.03.0: Unrecoverable error, exit code 1

> > Can we similarly get the Unifont for zh_CN PDFs?
> 
> As I understand it, GNU Unifont is a low-resolution bitmap font intended
> for terminal emulators.[2]  I expect it would look offensively bad when
> typeset.

That's the font Deri used in his patch:
<https://lore.kernel.org/linux-man/2607548.uBY7QHFjlC@pip/>

I guess that's better than nothing.

Have a lovely day!
Alex

> 
> Regards,
> Branden
> 
> [1] https://git.savannah.gnu.org/cgit/groff.git/tree/NEWS?h=1.23.0#n3211
>     https://www.youtube.com/watch?v=K2tgZCabTzs
> [2] https://unifoundry.com/unifont/index.html



-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-03-25 11:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 17:35 man-pages PDF book: fonts Alejandro Colomar
2024-03-25  4:19 ` G. Branden Robinson
2024-03-25 11:40   ` Alejandro Colomar [this message]
2024-03-25 11:48     ` Alejandro Colomar
2024-03-25 12:07     ` Alejandro Colomar
2024-03-25 18:36   ` James Cloos
2024-03-26 18:10   ` Brian Inglis
2024-04-20 12:06     ` Alejandro Colomar
2024-04-20 13:00       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZgFioIO94vFupB53@debian \
    --to=alx@kernel.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox