8

I am trying to use the pigpen font https://ctan.org/tex-archive/fonts/pigpen by Oliver Corff.

The pigpen.tex file is really small and seems equivalent to the following:

\font\pp=pigpen

but the following won't produce a valid PDF using xetex

\font\pp=pigpen

{\pp HELLO WORLD}

\bye

Sorry, pfa format not supported

What am I missing?

4
  • Your approach works for me when processed by PdfTeX but not XeTeX. I'm not familiar with XeTeX.
    – DJP
    Commented Nov 28, 2022 at 1:31
  • When I compile with XeTex to DVI and then to PDF, I can get PDF output. If I try to compile XeTex to PDF, I can't get output.
    – DJP
    Commented Nov 28, 2022 at 1:57
  • Does \usepackage{pigpen.sty} in XeLaTeX work for you?
    – Davislor
    Commented Nov 28, 2022 at 8:16
  • @Davislor texlive xdvpdfmx can not include the supplied font, I just posted an answer Commented Nov 28, 2022 at 9:32

3 Answers 3

11

enter image description here

If I run your example in texlive 2022 get

xdvipdfmx:fatal: Sorry, pfa format not supported; please convert the font to pfb, e.g., with t1binary.

and indeed texlive does only have a pfa version rather than the compressed pfb form.

So...

t1binary /usr/local/texlive/2022/texmf-dist/fonts/type1/public/pigpen/pigpen.pfa  pigpen.pfb

Makes a pigpen.pfb in the current directory

cp  /usr/local/texlive/2022/texmf-dist/fonts/map/dvips/pigpen/pigpen.map .

makes a pigpen.map which looks like

pigpen <<pigpen.pfa

edit that so it says

pigpen <<pigpen.pfb

Then

xetex --no-pdf yourfile

will make yourfile.xdv and xdvipdfmx will make the pdf if you supply the modified map

xdvipdfmx -f pigpen.map yourfile.xdv 

produces a PDF with the output above.

6

I made an experiment. I copied the pigpen.pfa file from

/usr/local/texlive/2022/texmf-dist/fonts/type1/public/pigpen/pigpen.pfa

to a working directory with the name originalpigpen.pfa and ran

t1binary originalpigpen.pfa -o pigpen.pfa

(yes, the produced PFB file with extension .pfa). Running your example file is now successful.

Now you can use the personal tree

mkdir -p $(kpsewhich -var-value=TEXMFHOME)/fonts/type1/public/pigpen
mv pigpen.pfa $(kpsewhich -var-value=TEXMFHOME)/fonts/type1/public/pigpen

and the PFB file masqueraded as PFA will be found with precedence over the distributed one.

enter image description here

I made a query on the TeX Live list, let's see what happens. The hack suggested above should be innocuous when the file format is changed at the distribution level.

4

The following worked for me in plain (Xe)TeX:

\input pigpen
\mypigpenfont
HELLO WORLD
\bye

Pigpen sample

It embeds a type 3 (bitmap) font, rather than a vector font.

4
  • That's really strange, do you know why?
    – user285558
    Commented Nov 28, 2022 at 9:09
  • Can you say what version of xetex and (especially) xdvipdfmx you have, I get xdvipdfmx:fatal: Sorry, pfa format not supported; please convert the font to pfb, e.g., with t1binary. and there is only pigpen.pfa but (weirdly) I get the same error if I use t1binary to make a pfb file in same directory Commented Nov 28, 2022 at 9:09
  • Personally, XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022/MacPorts 2022.62882_0) and This is xdvipdfmx Version 20211117 by the DVIPDFMx project team, modified for TeX Live,
    – user285558
    Commented Nov 28, 2022 at 9:11
  • it works on windows by converting the font with mktexpk to a bitmap font (zoom in and look at the corners), to get a vector font one has to use one of the other answers. Commented Nov 28, 2022 at 10:17

You must log in to answer this question.