Re: man-pages PDF book: fonts

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

 



On Mon, Mar 25, 2024 at 12:40:07PM +0100, Alejandro Colomar wrote:
> 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.)

Oh, and there's also pfb2pfa(1), it seems.

alx@debian:~$ apt-file find bin/pfbtops
groff: /usr/bin/pfbtops                   
alx@debian:~$ apt-file find bin/pfbtopfa
ghostscript: /usr/bin/pfbtopfa            
alx@debian:~$ apt-file find bin/pfb2pfa
texlive-binaries: /usr/bin/pfb2pfa        

> 
> 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.



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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux