[NTG-pdftex] [PATCH v3] pdftex - Add support for encfile and \pdfgentounicode for PK fonts

Hans Hagen pragma at wxs.nl
Wed Mar 29 00:12:41 CEST 2017


On 3/28/2017 11:46 PM, Pali Rohár wrote:
> On Tuesday 28 March 2017 11:27:03 Hans Hagen wrote:
>> On 3/27/2017 11:53 PM, Reinhard Kotucha wrote:
>>> On 2017-03-27 at 09:59:34 +0200, Pali Rohár wrote:
>>>  > Anyway, is there some script or program which can generate any
>>>  > PGC files? Quick look at google does not find anything, even
>>>  > not any specification for that file. I could probably decode it
>>>  > from pdftex source code...
>>>
>>> AFAIK the "PDF Font Containers" are not officially maintained.
>>> They were introduced in order to support development of pdfTeX
>>> itself but never supposed to be used by mortal users.
>>
>> We added that as an experiment as part of Thanh's thesis work. It
>> permitted injection of shapes generated by metapost.
>
> Are there any PGC font files? Or are there any scripts which can
> generate them (e.g. from metapost output)?
>
> I was not able to find any information about PGC, just that what is in
> pdftex documentation.
>
>>> But nowadays I don't see any reason to care about Type3 fonts or
>>> "PDF Glyph Containers" at all.  The best solution is to create
>>> Type1 fonts from Metafont sources.
>>
>> it's still interesting to be able to inject arbitrary shapes (with a
>> bit of packaging in actualtext one can even get cut/paste right)
>
> Am I right that simple PDF picture could be stored in PGC container and
> then used as one font glyph from pdfTeX?

This whole subproject - by thanh, taco and me - was a prelude to outline 
fonts as replacement for mf bitmap fonts but after a while the lm / gyre 
font projects made that obsolete.

I have a zio with some old test files from 1998 on my machine, perl 
scripts that I wrote for conversion etc etc. But I don't like 
distributing code that is that old and might nor work any more.

Fonts were defined with:

\pdffont <scale> =
\pdfscale <number>
\pdfglyph <number> <width> <llx> <lly> <urx> <ury> =
<pdf literals>
\pdfendglyph
\pdfglyph <number> <width> <llx> <lly> <urx> <ury> =
<pdf literals>
\pdfendglyph
\pdfendfont

(I didn't check if that stil can be done as i haven't used pdftex for a 
while.)

There were more such experiments, like positional support which I first 
prototyped for dvi, after which Thanh added experimental primitives, and 
finally we cooked up some definitive solution.

Some of the bitmap support in pdftex relates to font expansion and 
runtime generated font instances but I think that code was removed 
eventually.

But ... these font experiments are 20 year old and I have no time to 
look into them and see if I can revive the examples. It's also not 
really a topic for a good-old-times talk or article.

As others suggested: just go for outlines and forget about bitmap fonts.

(If i'd want bitmap fonts I would probably write this from scratch in 
LuaTeX using virtual fonts and reuseable pdf objects which is not that 
hard to do.)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-pdftex mailing list