[pdftex] [PATCH v3] pdftex - Add support for encfile and \pdfgentounicode for PK fonts
Pali Rohár
pali.rohar at gmail.com
Wed Jul 6 14:26:20 CEST 2016
... continued thread "[pdftex] pdftex - Encoding for metafont PK fonts"
This patch allows to specify encoding file also for bitmap PK fonts
(generated by MetaFont) and add support for \pdfgentounicode primitive
for these fonts.
Example for csb12 (CSFonts, Latin 2 encoding):
\nopagenumbers
\pdfmapline{+csb12 <csr.enc}
\pdfglyphtounicode{ccaron}{010D}
\pdfgentounicode=1
\font\csb=csb12
\csb \char232
\bye
Char 232 (0xE8) in font csb12 is 'č' (LATIN SMALL LETTER C WITH CARON)
and glyph name for 'č' is /ccaron. Unicode character is 0+010D.
Note that U+OOE8 (decimal 232) is 'è' (LATIN SMALL LETTER E WITH GRAVE)
which is reason why encoding file (csr.enc) is needed. Unicode is
extension of Latin 1 (character positions 127-255 are same) so this is
reason why Latin 1 PK fonts works fine without encoding files...
In V3 version of patch I added check for duplicate glyph names to
prevent generating incorrect PDF files. Duplicates of glyph names are
not used and default glyph name used by pdftex "\a<number>" is used as
before. And I added small extension to pdftex-t.tex documentation as
Karl Berry wanted.
--
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdftex-pkfonts-encfile-tounicode-v3.patch
Type: text/x-patch
Size: 6094 bytes
Desc: not available
URL: <http://tug.org/pipermail/pdftex/attachments/20160706/6fb4efc0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdftex-t.tex-pkfonts-encfile.patch
Type: text/x-patch
Size: 541 bytes
Desc: not available
URL: <http://tug.org/pipermail/pdftex/attachments/20160706/6fb4efc0/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://tug.org/pipermail/pdftex/attachments/20160706/6fb4efc0/attachment-0002.bin>
More information about the pdftex
mailing list