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

Reinhard Kotucha reinhard.kotucha at web.de
Mon Mar 27 23:53:41 CEST 2017


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.

Instead of using Type3 fonts, you get better results if you create
Type1 fonts from the Metafont sources.

  http://www.tex.ac.uk/FAQ-textrace.html

textrace first used autotrace, later potrace, in order to create Type1
outlines from high-resolution bitmaps created by Metafont.  The
disadvantage is that the final outlines are not always perferct.  I do
not know how much time Vladimir Volovich spent on manual tweaking when
he created the CM-Super Type1 fonts.  On the other hand, Tigran
Aivazian converted Yannis Haralambous' Hebrew fonts using textrace for
his Bible project in 2006 and the result was excellent.  AFAIK he
didn't tweak anything manually.

The main problem with textrace is that I don't know whether this
program is available anymore.  It's not on CTAN, but if it had ever
been there, I could check my old TeX Collection CDs/DVDs.

Maybe the better choice nowadays is MetaType1.  The Metafont source
files are processed by MetaPost and converted to PostScript.  The
PostScript files are then converted to high-quality Type1 fonts by a
bunch of scripts.  I assume that MetaType1 is quite reliable because
the Latin Modern fonts were created with MetaType1, presumably without
manual interaction.  After all, MetaType1 is still maintained.

Type3 fonts can contain arbitrary PostScript code.  They are just
collections of pictures.  However, the Type3 font format allows to
assign pictures to characters.  Even if glyphs are made up of lines
and curves, the quality is quite poor.  Type1 fonts contain so-called
"hints" which provide additional information used when glyphs are
fitted to a grid.  The hints make sure that all vertical stems of an
"m" have the same width, for example.

dvips (and later pdftex) used the Type3 font format in order to allow
bitmaps created with Metafont to be inserted into PostScript or PDF
files.  This was fine at a time when very few Type1 fonts were
available.

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.

If you are successful, please upload the Type1 fonts to CTAN.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the ntg-pdftex mailing list