[luatex] luatex - font encoding for type 1 fonts

Pali Rohár pali.rohar at gmail.com
Thu Jun 9 22:44:56 CEST 2016


Hello,

how I can specify font encoding for specific type 1 font?

E.g. font csr10 (stored in fonts/type1/public/cs/csr10.pfb) is in IL2 
encoding which means that character č (Latin Small Letter C with caron) 
is at position 232.

Code 232 is invalid in UTF-8 and therefore I cannot enter it normally 
for luatex. So for printing it I need to use sequence \char232, which 
works.

\font\csr=csr10
\csr\char232
\bye

Is there any simple way to tell luatex font encoding table (unicode 
character --> code in type 1 font)? So I could be able to write utf8 
string "č" directly in text editor instead \char232.

My very quick hack for this was changing catcode of č to 13 and then 
defining macro č as \char232.

\catcode`\č=\active
\defč{\char232}
\font\csr=csr10
\csrč
\bye

But I would like to avoid changing catcode of unicode characters and fix 
this at font level.

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- 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/luatex/attachments/20160609/e4fc23bc/attachment.bin>


More information about the luatex mailing list