While encoding for common fonts is easy to find, encoding for less common ones are fairly hard to obtain. I know that the encoding for cmr
is OT1
and the encoding for cmmi
is OML
. However I can't find the encoding for cmcsc
and cmtt
. Are they OT1
or some variant of it? In general how can I find the encoding for any font?
1 Answer
You're taking the wrong approach.
The original Computer Modern fonts have ad hoc encodings devised by Knuth in order to fit as many glyphs as possible in 128 slot fonts.
When Rainer Schöpf and Frank Mittelbach released the New Font Selection Scheme version 2 (NFSS2), they introduced the notion of “output encoding”, so creating the now familiar OT1, OML, OMS and OMX encodings, along with T1.
The last one is a real encoding for 256 slot fonts. It was agreed upon at the 1990 TUG meeting in Cork, Ireland, in order to cover a large number of European languages. This had become possible by the introduction of virtual fonts, which allow to remap and merge existing fonts into a consistent layout.
The (pseudo)encoding OT1 is just a portmanteau. For instance, cmr10
has ¡ and ¿ where cmtt10
has < and >, but both are “OT1-encoded”. Also cmti10
is OT1-encoded, but it has £ where cmr10
has $.
The question “what encoding is cmcsc10
” is ill-posed. It is what it is and it is assigned in LaTeX to OT1. Two OT1-encoded fonts have corresponding glyphs in most slots, but may differ as shown above in some places.