Next: groff, Previous: dvips, Up: Encodings

### B.5 ‘`ec.enc`’: Cork encoding

    % @@psencodingfile@{
    %   date      = "24feb10",
    %   filename  = "ec.enc",
    %   email     = "tex-fonts@@tug.org",
    %   docstring = "This is the EC (aka Cork aka T1) encoding vector
    %                for 8-bit fonts to be used with TeX."
    % @}
    %
    % The original paper can be found on
    %    https://www.tug.org/TUGboat/Articles/tb11-4/tb30ferguson.pdf
    %
    % Names of the glyphs try to comply with:
    %    Adobe Glyph List For New Fonts, ver. 1.6, 30 Januaury 2006
    %    http://partners.adobe.com/public/developer/en/opentype/aglfn13.txt
    % but some exceptions are listed below.
    %
    % The following characters are not present in Unicode:
    % - /perthousandzero = used to compose /perthousand, /pertenthousand, ... out of /percent + this character
    % -  Germandbls      = now there is a related character in Unicode,
    %                      U+1E9E - LATIN CAPITAL LETTER SHARP S
    %                      but probably /S_S ligature name should be used instead
    %
    % The following two characters have different Unicode mappings than on the AGL:
    % - /tcedilla     = U+0163 - LATIN SMALL LETTER T WITH CEDILLA
    %                   according to AGL it should be /tcommaaccent
    % - /Tcedilla     = U+0162 - LATIN CAPITAL LETTER T WITH CEDILLA
    %                   according to AGL it should be /Tcommaaccent
    % But having /scedilla and /tcommaaccent mixed is even more ugly.
    %
    % The following characters are not present on the AGL:
    % - /dotlessj     = U+0237 - LATIN SMALL LETTER DOTLESS J
    % - /cwm          = U+200B - ZERO WIDTH SPACE
    % - /visiblespace = U+2423 - OPEN BOX
    % and should probably better be labeled with uniXXXX notation
    % (though hardly any font has those glyphs anyway).
    %
    % The following ligatures are deprecated by recent AGL:
    % - /ff, /fi, /fl, /ffi, /ffl = /f_i and similar should have been used instead
    %
    % Hyphen character:
    % There are two character named "hyphen". The original article explains
    % the background of this decision (if one wanted to use a different
    % hyphenation character and still be able to use the dash). So the first
    % character should serve as "hyphen char" and the other one as "dash" in
    % compound words.  The character 0x2D is supposed to be the hyphen char,
    % but since there used to be two characters of the same name in this
    % file for some time, the tools like afmtotfm have been confused and
    % remapped the hyphen char to 0x7F automatically.  After the second
    % character's name was changed, hyphenation characters in existing
    % tfm fonts (generated with the old ec.enc) have disappeared, so the
    % second character has been renamed back to "hyphen". Anyone generating
    % tfm fonts is strongly encouraged to make a copy of this file, rename
    % it and change glyph names as required for their font.
    %
    % Other remarks:
    % - /Eth = U+00D0 - LATIN CAPITAL LETTER ETH
    %          must also be used as /Dcroat
    %          U+0110 - LATIN CAPITAL LETTER D WITH STROKE
    %
    % Misleading names and shapes of letters (that lead to different names in past)
    % - /lcaron = U+013E - LATIN SMALL LETTER L WITH CARON
    %             /lquoteright
    % - /Lcaron = U+013D - LATIN CAPITAL LETTER L WITH CARON
    %             /Lquoteright
    % - /dcaron = U+010F - LATIN SMALL LETTER D WITH CARON
    %             /dquoteright
    % - /tcaron = U+0165 - LATIN SMALL LETTER T WITH CARON
    %             /tquoteright
    % - /dcroat = U+0111 - LATIN SMALL LETTER D WITH STROKE
    %             /dbar, /dmacron
    %
    % - /cwm        - /bom, /zerowidthnobreakspace
    % - /underscore - /underline
    % - /hyphen.alt - /sfthyphen, /hyphen, /dash
    %
    %
    % Turkish & Romanian
    % --------------------
    % EC encoding has been defined to include /tcedilla and /scedilla.
    % For Turkish one needs /scedilla, while for Romanian one would need
    % "t with comma below" (/tcommaaccent) and "s with comma below" (/scommaaccent).
    % "t with cedilla" in not used in any language except in inferior
    % Romanian typography that can use cedillas instead of commas below.
    % AGL has a strange mapping as well.
    %
    % Without adding an additional character, it is impossible to support both
    % languages at the same time, so EC is not really best choice for Romanians,
    % even though it can be "misused" if one replaces both /scedilla and /tcedilla
    % with /scommaaccent and /tcommaaccent.
    %
    % Characters that have been renamed in July 2008:
    %    0x18        /zeroinferior -> /perthousandzero
    %    0x20 U+2423 /visualspace  -> /visiblespace (if font doesn't have it, use /space)
    %    0x8D U+014A /Ng           -> /Eng
    %    0x9E U+0111 /dbar         -> /dcroat
    %    0xAD U+014B /ng           -> /eng
    %    0xB4 U+0165 /tquoteright  -> /tcaron
    %
    % Although these ligatures and kerns are somewhat questionable to have
    % in an encoding file, they've been here forever, and they are
    % traditional in the TeX world, so we preserve them.
    %
    % LIGKERN space l =: lslash ; space L =: Lslash ;
    % LIGKERN question quoteleft =: questiondown ; exclam quoteleft =: exclamdown ;
    % LIGKERN hyphen hyphen =: endash ; endash hyphen =: emdash ;
    % LIGKERN quoteleft quoteleft =: quotedblleft ;
    % LIGKERN quoteright quoteright =: quotedblright ;
    %
    %   We blow away kerns to and from spaces (TeX doesn't have a
    %   space) and also remove any kerns from the numbers (although
    %   the only kern pair that mentions a number in Times-Roman.afm
    %   is one one.)
    %
    % LIGKERN space {} * ; * {} space ; zero {} * ; * {} zero ;
    % LIGKERN one {} * ; * {} one ; two {} * ; * {} two ;
    % LIGKERN three {} * ; * {} three ; four {} * ; * {} four ;
    % LIGKERN five {} * ; * {} five ; six {} * ; * {} six ;
    % LIGKERN seven {} * ; * {} seven ; eight {} * ; * {} eight ;
    % LIGKERN nine {} * ; * {} nine ;
    % LIGKERN comma comma =: quotedblbase ; less less =: guillemotleft ;
    % LIGKERN greater greater =: guillemotright ;
    %
    /ECEncoding [    % now 256 chars follow
    /grave           % 0x00 U+0060
    /acute           % 0x01 U+00B4
    /circumflex      % 0x02 U+02C6
    /tilde           % 0x03 U+02DC
    /dieresis        % 0x04 U+00A8
    /hungarumlaut    % 0x05 U+02DD
    /ring            % 0x06 U+02DA
    /caron           % 0x07 U+02C7
    /breve           % 0x08 U+02D8
    /macron          % 0x09 U+00AF
    /dotaccent       % 0x0A U+02D9
    /cedilla         % 0x0B U+00B8
    /ogonek          % 0x0C U+02DB
    /quotesinglbase  % 0x0D U+201A
    /guilsinglleft   % 0x0E U+2039
    /guilsinglright  % 0x0F U+203A
    /quotedblleft    % 0x10 U+201C
    /quotedblright   % 0x11 U+201D
    /quotedblbase    % 0x12 U+201E
    /guillemotleft   % 0x13 U+00AB
    /guillemotright  % 0x14 U+00BB
    /endash          % 0x15 U+2013
    /emdash          % 0x16 U+2014
    /cwm             % 0x17 U+200B
    /perthousandzero % 0x18 ______
    /dotlessi        % 0x19 U+0131
    /dotlessj        % 0x1A U+0237
    /ff              % 0x1B U+FB00
    /fi              % 0x1C U+FB01
    /fl              % 0x1D U+FB02
    /ffi             % 0x1E U+FB03
    /ffl             % 0x1F U+FB04
    /visiblespace    % 0x20 U+2423
    /exclam          % 0x21
    /quotedbl        % 0x22
    /numbersign      % 0x23
    /dollar          % 0x24
    /percent         % 0x25
    /ampersand       % 0x26
    /quoteright      % 0x27 U+2019
    /parenleft       % 0x28
    /parenright      % 0x29
    /asterisk        % 0x2A
    /plus            % 0x2B
    /comma           % 0x2C
    /hyphen          % 0x2D
    /period          % 0x2E
    /slash           % 0x2F
    /zero            % 0x30
    /one             % 0x31
    /two             % 0x32
    /three           % 0x33
    /four            % 0x34
    /five            % 0x35
    /six             % 0x36
    /seven           % 0x37
    /eight           % 0x38
    /nine            % 0x39
    /colon           % 0x3A
    /semicolon       % 0x3B
    /less            % 0x3C
    /equal           % 0x3D
    /greater         % 0x3E
    /question        % 0x3F
    /at              % 0x40
    /A               % 0x41
    /B               % 0x42
    /C               % 0x43
    /D               % 0x44
    /E               % 0x45
    /F               % 0x46
    /G               % 0x47
    /H               % 0x48
    /I               % 0x49
    /J               % 0x4A
    /K               % 0x4B
    /L               % 0x4C
    /M               % 0x4D
    /N               % 0x4E
    /O               % 0x4F
    /P               % 0x50
    /Q               % 0x51
    /R               % 0x52
    /S               % 0x53
    /T               % 0x54
    /U               % 0x55
    /V               % 0x56
    /W               % 0x57
    /X               % 0x58
    /Y               % 0x59
    /Z               % 0x5A
    /bracketleft     % 0x5B
    /backslash       % 0x5C
    /bracketright    % 0x5D
    /asciicircum     % 0x5E
    /underscore      % 0x5F
    /quoteleft       % 0x60 U+2018
    /a               % 0x61
    /b               % 0x62
    /c               % 0x63
    /d               % 0x64
    /e               % 0x65
    /f               % 0x66
    /g               % 0x67
    /h               % 0x68
    /i               % 0x69
    /j               % 0x6A
    /k               % 0x6B
    /l               % 0x6C
    /m               % 0x6D
    /n               % 0x6E
    /o               % 0x6F
    /p               % 0x70
    /q               % 0x71
    /r               % 0x72
    /s               % 0x73
    /t               % 0x74
    /u               % 0x75
    /v               % 0x76
    /w               % 0x77
    /x               % 0x78
    /y               % 0x79
    /z               % 0x7A
    /braceleft       % 0x7B
    /bar             % 0x7C
    /braceright      % 0x7D
    /asciitilde      % 0x7E
    /hyphen          % 0x7F U+002D (explicit "hyphen char")
    /Abreve          % 0x80 U+0102
    /Aogonek         % 0x81 U+0104
    /Cacute          % 0x82 U+0106
    /Ccaron          % 0x83 U+010C
    /Dcaron          % 0x84 U+010E
    /Ecaron          % 0x85 U+011A
    /Eogonek         % 0x86 U+0118
    /Gbreve          % 0x87 U+011E
    /Lacute          % 0x88 U+0139
    /Lcaron          % 0x89 U+013D
    /Lslash          % 0x8A U+0141
    /Nacute          % 0x8B U+0143
    /Ncaron          % 0x8C U+0147
    /Eng             % 0x8D U+014A
    /Ohungarumlaut   % 0x8E U+0150
    /Racute          % 0x8F U+0154
    /Rcaron          % 0x90 U+0158
    /Sacute          % 0x91 U+015A
    /Scaron          % 0x92 U+0160
    /Scedilla        % 0x93 U+015E
    /Tcaron          % 0x94 U+0164
    /Tcedilla        % 0x95 U+0162
    /Uhungarumlaut   % 0x96 U+0170
    /Uring           % 0x97 U+016E
    /Ydieresis       % 0x98 U+0178
    /Zacute          % 0x99 U+0179
    /Zcaron          % 0x9A U+017D
    /Zdotaccent      % 0x9B U+017B
    /IJ              % 0x9C U+0132
    /Idotaccent      % 0x9D U+0130
    /dcroat          % 0x9E U+0111
    /section         % 0x9F U+00A7
    /abreve          % 0xA0 U+0103
    /aogonek         % 0xA1 U+0105
    /cacute          % 0xA2 U+0107
    /ccaron          % 0xA3 U+010D
    /dcaron          % 0xA4 U+010F
    /ecaron          % 0xA5 U+011B
    /eogonek         % 0xA6 U+0119
    /gbreve          % 0xA7 U+011F
    /lacute          % 0xA8 U+013A
    /lcaron          % 0xA9 U+013E
    /lslash          % 0xAA U+0142
    /nacute          % 0xAB U+0144
    /ncaron          % 0xAC U+0148
    /eng             % 0xAD U+014B
    /ohungarumlaut   % 0xAE U+0151
    /racute          % 0xAF U+0155
    /rcaron          % 0xB0 U+0159
    /sacute          % 0xB1 U+015B
    /scaron          % 0xB2 U+0161
    /scedilla        % 0xB3 U+015F
    /tcaron          % 0xB4 U+0165
    /tcedilla        % 0xB5 U+0163
    /uhungarumlaut   % 0xB6 U+0171
    /uring           % 0xB7 U+016F
    /ydieresis       % 0xB8 U+00FF
    /zacute          % 0xB9 U+017A
    /zcaron          % 0xBA U+017E
    /zdotaccent      % 0xBB U+017C
    /ij              % 0xBC U+0133
    /exclamdown      % 0xBD U+00A1
    /questiondown    % 0xBE U+00BF
    /sterling        % 0xBF U+00A3
    /Agrave          % 0xC0
    /Aacute          % 0xC1
    /Acircumflex     % 0xC2
    /Atilde          % 0xC3
    /Adieresis       % 0xC4
    /Aring           % 0xC5
    /AE              % 0xC6
    /Ccedilla        % 0xC7
    /Egrave          % 0xC8
    /Eacute          % 0xC9
    /Ecircumflex     % 0xCA
    /Edieresis       % 0xCB
    /Igrave          % 0xCC
    /Iacute          % 0xCD
    /Icircumflex     % 0xCE
    /Idieresis       % 0xCF
    /Eth             % 0xD0
    /Ntilde          % 0xD1
    /Ograve          % 0xD2
    /Oacute          % 0xD3
    /Ocircumflex     % 0xD4
    /Otilde          % 0xD5
    /Odieresis       % 0xD6
    /OE              % 0xD7 U+0152
    /Oslash          % 0xD8
    /Ugrave          % 0xD9
    /Uacute          % 0xDA
    /Ucircumflex     % 0xDB
    /Udieresis       % 0xDC
    /Yacute          % 0xDD
    /Thorn           % 0xDE
    /Germandbls      % 0xDF (U+1E9E, /S_S)
    /agrave          % 0xE0
    /aacute          % 0xE1
    /acircumflex     % 0xE2
    /atilde          % 0xE3
    /adieresis       % 0xE4
    /aring           % 0xE5
    /ae              % 0xE6
    /ccedilla        % 0xE7
    /egrave          % 0xE8
    /eacute          % 0xE9
    /ecircumflex     % 0xEA
    /edieresis       % 0xEB
    /igrave          % 0xEC
    /iacute          % 0xED
    /icircumflex     % 0xEE
    /idieresis       % 0xEF
    /eth             % 0xF0
    /ntilde          % 0xF1
    /ograve          % 0xF2
    /oacute          % 0xF3
    /ocircumflex     % 0xF4
    /otilde          % 0xF5
    /odieresis       % 0xF6
    /oe              % 0xF7 U+0153
    /oslash          % 0xF8
    /ugrave          % 0xF9
    /uacute          % 0xFA
    /ucircumflex     % 0xFB
    /udieresis       % 0xFC
    /yacute          % 0xFD
    /thorn           % 0xFE
    /germandbls      % 0xFF U+00DF
    ] def