On Tuesday, 13 December 2022 20:26:53 GMT G. Branden Robinson wrote: > Hi Deri, > > At 2022-11-27T01:41:57+0000, Deri wrote: > > I have looked at the SS font now. > > > > It is not included in devpdf because symbolsl.pfa is not a type 1 > > postscript font! It is a postscript program which generates a font > > when run by a postscript interpreter. The gropdf man page does say you > > can only use it with type 1 fonts. If you view the file you will see > > it is significantly different from other pfa files on your system. > > Well, not _blatantly_... > > $ head -n 1 /usr/share/a2ps/fonts/pcfont.pfa > %!PS-AdobeFont-1.0 -*- PostScript -*-
Hi Branden, That is a type 1 font. > $ head -n 1 ./build/font/devps/symbolsl.pfa > %!PS-Adobe-3.0 Resource-Font And this is a type 3, a very different beast:- https://www.prepressure.com/fonts/basics/type3 Which requires a postscript interpreter to parse it, as I said. > So I looked at a PFB file, too. > > $ head -n 1 /usr/share/fonts/type1/gsfonts/n022023l.pfb | od -c > 0000000 200 001 035 005 \0 \0 % ! P S - A d o b e > 0000020 F o n t - 1 . 0 : N i m b u s > 0000040 M o n L - R e g u O b l i 1 . > 0000060 0 6 \n > 0000063 > > $ file /usr/share/a2ps/fonts/pcfont.pfa > /usr/share/a2ps/fonts/pcfont.pfa: PostScript Type 1 font text (-*- > PostScript -*-) > > $ file ./build/font/devps/symbolsl.pfa > ./build/font/devps/symbolsl.pfa: PostScript Type 1 font text > > $ file /usr/share/fonts/type1/gsfonts/n022023l.pfb > /usr/share/fonts/type1/gsfonts/n022023l.pfb: PostScript Type 1 font program > data > > I don't think we should shell out from gropdf to run the file(1) command > anyway, but... > > Is "%!PS-AdobeFont-" a reliable indicator of acceptability to gropdf? No. Postscript fonts 0, 2, 4, 5, 32 and 42 are equally not allowed. > > I don't think it is unreasonable for gropdf to barf over its contents, > > and viewers to barf as well. > > I agree. If we can make gropdf barf on invalid input, we don't subject > the PDF viewer to the indignity of playing centipede.[1] > > > A reasonable error message when consuming a non type 1 file would be > > desirable. :-) > > Yes. Happy to code one up and run it by you on this list if you can > verify my surmise above, or offer a substitute. It would be a warning only. The important thing is to avoid embedding the body of the font if it is not a type 1 font, to stop confusing the viewer, but leave the font stub the same as is done for non-embedded fonts. It is on my list, once committed, happy for you to adjust the precise wording of the warning. Cheers Deri > Regards, > Branden > > [1] https://en.wikipedia.org/wiki/Centipede_(video_game) [2] > [2] (Why, what did you _think_ I meant?)