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

Hans Hagen pragma at wxs.nl
Fri Mar 31 09:29:18 CEST 2017

On 3/31/2017 12:22 AM, Pali Rohár wrote:

> Better fallback mechanism is to introduce new flag for PK/type3 fonts
> like I did in new patch for \pdfpkscalable.

A better place for flags would have been the map file itself. But ... I 
agree with Karl that you should not touch such fundamental font 
inclusions mechanisms: what works for you can break something else and 
it being a stable production tool, such patching can only happen when 
you also test it in a wide range of (font) usage ... so close to texlive 
code freeze .. a no go.

>>     Now is cmr10 really marked as scalable and included in output PDF
>>     only once (for cmr10 and also for cmr10 at 60pt).
>> But that's not what we want.
> Without modification of pdftex.web it is not possible. Changing meaning
> of scalability of PK fonts needs to fix hasfmentry() usage by new
> function (e.g. isscalable()) like I did in in patch \pdfpkscalable.
> Note that without above "+    } else if (is_std_t1font(fm))" line (which
> I forgot to include into my previous patch) all PK/type3 fonts were
> ignored by pdftex in check_fm_entry() because they were treated as type1
> (which was wrong).
>>     Yes, I understand that idea in same way.
>> Oh, you did reply, sorry. Lost in my mail.
>>     I'm going to play with PGC files as I think it still could be
>>     useful for ability to include any PDF shape into font file...
>> Fine, but pdftex is no longer the place to do experiments. We must
>> emphasize stability above all with pdftex. I suggest playing in
>> LuaTeX, where you can do all this stuff and a whole lot more at the
>> Lua level ...
> I mean to play with PGC files without modification of pdftex sources.
> Just use what is currently supported by pdftex and see what happens.

Why not do that in a local copy / derived version? As pgc is obsolete 
someone might actually decide to remove that code completely. Also, in 
successors like xetex and luatex there is no pgc (and will never be as 
there are other ways).

FWIW: If you want to turn a metafont bitmap into a scalable pdf stream 
by using the outline instead, you run into all kind of problems like 
overlapping paths/fills, harmless in bitmap, but in outline it gives 
side effects with odd/even rules, so your fonts need to be made ready 
for that (which is what lm / metatype1 is about). One reason why in the 
end we never went on with this experiment is that in a metafont - 
turned - pgc a substantial nuber of the shapes were simply not suitable 
for outline / filling. I don't know how many fonts you want to do that 
way but it will probably not pay off. Of course, nice as research, but 
for that one can use a patched pdftex as it's used for production.


                                           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