oenc.tex 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. %
  2. % Intro
  3. % =====
  4. %
  5. % A glyph can be accessed with one of the three different kinds of
  6. % macros:
  7. %
  8. % command a macro without arguments, e.g., |\textdegree|;
  9. %
  10. % composite a macro taking one argument, producing a single glyph
  11. % from a font;
  12. %
  13. % accent a macro taking one argument, producing a glyph (the
  14. % argument) with another glyph (accent) superimposed.
  15. %
  16. % Accents can place an accent mark on any glyph, but typographically
  17. % this often doesn't look good. Therefore some fonts provide some
  18. % accented glyphs designed by a designer ("composites"). For example,
  19. % typing |\'a| will result in the acute accent (|\'|) being placed
  20. % over the glyph |a| in some encodings (e.g., in OT1), but will
  21. % produce a single glyph (|a| with acute) in others (e.g., T1).
  22. %
  23. % Note that a font may contain both composites (for some letters) and
  24. % accent marks. When a composite is not available in the font, the
  25. % accent can be used to typeset the desired glyph.
  26. %
  27. % Besides the visual advantages, composites are preferable for a
  28. % technical reason -- TeX does not hyphenate words which contain
  29. % accents.
  30. %
  31. % Glyph searching
  32. % ===============
  33. %
  34. % Glyph searching means identifying a font encoding which both
  35. % contains the glyph and is supported by the current font family.
  36. %
  37. % The simplest approach at glyph searching is to search through the
  38. % list of encodings in which the glyph exists to find the first one
  39. % supported by the current font family.
  40. %
  41. % This however can result in using unnecessarily large number of
  42. % fonts. In order to decrease the font usage we can provide hints to
  43. % the glyph searching mechanism as to which font encodings are the
  44. % most likely to contain glyphs under different circumstances.
  45. %
  46. % There is some relation between input encodings and font encodings,
  47. % although it is not necessarily a one-to-one (or a many-to-one)
  48. % mapping. Each input encoding defines a list of font encodings which
  49. % should be tried first (we call it "the current font encoding list",
  50. % |\cur@fenc@list|). These are encodings which cover the input
  51. % encoding completely. Only if we don't find an encoding in this list
  52. % which is both supported by the current font family and contains the
  53. % glyph, we start searching the glyph's encoding list.
  54. %
  55. % Searching for a glyph involves an ambiguity -- the same glyph be
  56. % typeset as either an accent over a letter, or as a single composite
  57. % glyph. Ideally a composite is preferable, but if an accent is
  58. % available without changing the current font, we might prefer the
  59. % accent.
  60. %
  61. % This is how we do the searching:
  62. %
  63. % 1) Check the current encoding + current font encoding list (set up
  64. % by |@documentencoding|) "breadth-first", i.e., preferring accents
  65. % in an earlier encoding over composites in later encodings. This
  66. % is to hopefully minimize the font usage, as we would find "the
  67. % earliest" usable font.
  68. %
  69. % 2) If the glyph was not found in step 1, search the glyph's encoding
  70. % list. We now prefer composites -- we'll consider an accent only
  71. % when none of the composite's encodings is supported by the
  72. % current font family. We now don't care about font usage and
  73. % search "the best" glyph, as this is a (supposedly rare) situation
  74. % when a "non-standard" font will get used anyway, e.g., when a
  75. % user requests a Cyrillic glyph while inside a Latin environment.
  76. %
  77. % Cache
  78. % =====
  79. %
  80. % After we've found the glyph we can cache it, i.e., arrange for the
  81. % the glyph's macro the next time to typeset the glyph without doing
  82. % the searching again.
  83. %
  84. % Such cache however must be aware of changes in settings which affect
  85. % glyph searching, which are:
  86. %
  87. % 1) the current font encoding (E);
  88. % 2) the current font encoding list, set up by |@documentencoding| (EL);
  89. % 3) font encoding list of the current font family (FEL).
  90. %
  91. % Therefore, the first thing we do is assign a unique index to every
  92. % combination of E+EL+FEL we encounter in the document. Whenever we
  93. % change E, EL or FEL we check if the new combination have already
  94. % been assigned an index; if not, we allocate next index for the new
  95. % combination (see |\update@enclist@index|). When we cache a glyph we
  96. % use this index to remember for which combination of E+EL+FEL this
  97. % cache entry is for.
  98. %
  99. % This is how glyph caching works. Let's say we have to typeset
  100. % |\'a|. |\'| (being a composite or an accent) calls a macro named
  101. % |\N\'-a| (single command sequence, N is the index of the current
  102. % E+EL+FEL combination) if it's defined; if it's not defined, |\'|
  103. % calls glyph searching macro. After the glyph searching macro finds
  104. % the glyph corresponding to |\'a|, it defines the macro named
  105. % |\N\'-a| to typeset that glyph (using either accent or composite,
  106. % whatever was found), so the next time we encounter |\'a| we won't
  107. % search for the glyph (unless the E+EL+FEL combination has changed
  108. % and |\'a| had not yet been cached for that combo).
  109. %
  110. % The drawback of this method is that TeX's memory gets filled with
  111. % many cache entries for every E+EL+FEL combo ever used in the
  112. % document. It's possible to construct the glyph cache in a way to
  113. % avoid this -- for example, to define only one cache macro for |\'a|,
  114. % and add to it a new branch for each new E+EL+FEL combination, but
  115. % naturally this will be slower.
  116. %
  117. % Internal macros ("variables")
  118. % =============================
  119. %
  120. % fenc@enc font encoding currently being defined.
  121. %
  122. % fenc@list/NAME list of encodings for the glyph NAME.
  123. %
  124. % cur@fenc@list "the current font encoding list" (see "Glyph
  125. % searching" above).
  126. %
  127. % ENC/NAME definition of glyph NAME in encoding ENC.
  128. %
  129. % @enc encoding of the glyph (set after finding the
  130. % glyph / retrieving the glyph from the cache).
  131. %
  132. % cache@enc@ENC macro that defines \@enc to be ENC.
  133. %
  134. % N\NAME cache entry for glyph \NAME under a combination of
  135. % E+EL+FEL number N.
  136. %
  137. %
  138. %
  139. % \fCmd{COMMAND}{TEXT}
  140. %
  141. % Define a command that does not take arguments. Call \f@restore@enc
  142. % inside TEXT if you need to restore the original encoding (remember,
  143. % before the command is called, the encoding is changed to the one for
  144. % which the command was defined, which can be different from the
  145. % current user's encoding).
  146. \def\fCmd#1#2{%
  147. \def#1{\f@search@command #1}%
  148. \f@def@enc@glyph#1%
  149. {\f@change@enc #2\f@enc@egroup}%
  150. }%
  151. %
  152. % \fSym{COMMAND}{SLOT}
  153. %
  154. % Define a font glyph in SLOT.
  155. \def\fSym#1#2{\fCmd{#1}{\char#2 }}%
  156. %
  157. % \fCmdd{COMMAND}{TEXT}
  158. %
  159. % Define a command that takes one argument. Call \f@restore@enc
  160. % inside TEXT before typesetting the argument, to restore the original
  161. % encoding (remember, before the command is called, the encoding is
  162. % changed to the one for which the command was defined, which can be
  163. % different from the current user's encoding).
  164. \def\fCmdd#1#2{%
  165. \def#1{\f@search@accent #1}% When searching, treat it as an accent.
  166. \f@def@enc@glyph#1%
  167. ##1{\f@change@enc #2\f@enc@egroup}%
  168. }%
  169. %
  170. % \fCmp{COMMAND}{ARG}{TEXT}
  171. %
  172. % Define a composite command. If there's a corresponding accent,
  173. % composite will override the accent when the argument is ARG.
  174. \def\fCmp#1#2#3{%
  175. \def#1{\f@search@composite #1}%
  176. \f@def@enc@glyph{#1-\string#2}%
  177. {\f@change@enc #3\f@enc@egroup}%
  178. }%
  179. %
  180. % \fCmpSym{COMMAND}{ARG}{SLOT}
  181. %
  182. % Same as \fCmp, but define a composite glyph in SLOT.
  183. \def\fCmpSym#1#2#3{\fCmp#1#2{\char#3}}%
  184. %
  185. % \fAcc{COMMAND}{SLOT}
  186. %
  187. % Define an accent in SLOT. If there are corresponding composite
  188. % commands for some arguments, they will override the accent for those
  189. % arguments.
  190. \def\fAcc#1#2{%
  191. \def#1{\f@search@accent #1}%
  192. \f@def@enc@glyph#1%
  193. {\f@do@accent{#2}}%
  194. }%
  195. %
  196. %
  197. %
  198. % \f@def@enc@glyph{NAME}{DEF}
  199. %
  200. % Define a glyph in the current encoding.
  201. \def\f@def@enc@glyph#1{%
  202. % Add the font encoding to the encoding list for the command.
  203. \expandafter\def\expandafter\temp\expandafter{%
  204. \csname fenc@list/\string#1\endcsname
  205. }%
  206. \expandafter\ifx\temp\relax
  207. \let\tempa\empty
  208. \else
  209. \edef\tempa{\temp}%
  210. \fi
  211. \expandafter\edef\temp{\fenc@enc\space\tempa}%
  212. % Start definition of the glyph command for the current encoding.
  213. \expandafter\def \csname\fenc@enc/\string#1\endcsname
  214. }%
  215. %
  216. % \f@change@enc
  217. %
  218. % Start a group with \f@enc@bgroup and change font encoding to \@enc,
  219. % if the current encoding is different. The original encoding is
  220. % saved, call \f@restore@enc inside the command's def to restore it.
  221. \def\f@change@enc{%
  222. \f@enc@bgroup
  223. % Save original encoding -- the glyph macro might need to restore
  224. % it, e.g., to typeset its argument.
  225. \let\f@orig@enc\f@encoding
  226. % Switch encoding, if needed. \@enc is set when the glyph is
  227. % found or retrieved from the cache.
  228. \ifx\f@encoding\@enc \else
  229. \setfontencoding{\@enc}\selectfont
  230. \fi
  231. }%
  232. %
  233. % \f@restore@enc
  234. %
  235. % Restore encoding saved by \f@change@enc.
  236. \def\f@restore@enc{%
  237. \ifx\f@orig@enc\f@encoding \else
  238. \setfontencoding{\f@orig@enc}\selectfont
  239. \fi
  240. }%
  241. %
  242. % These are used by glyphs to start and end a group isolating a font
  243. % encoding change. Accents turn these off to avoid any grouping
  244. % inside their argument, because grouping breaks accents.
  245. \let\f@enc@bgroup\bgroup
  246. \let\f@enc@egroup\egroup
  247. %
  248. % \f@do@accent{SLOT}{ARG}
  249. %
  250. % Typeset an accent in SLOT over the ARG.
  251. \def\f@do@accent#1#2{%
  252. \bgroup
  253. % Avoid starting any more groups -- they're not needed because we
  254. % already have one, and a group between the accent and the
  255. % accented letter will break the accent.
  256. \let\f@enc@bgroup\empty
  257. \let\f@enc@egroup\empty
  258. % Preload any fonts in advance, to prevent grouping (possible when
  259. % loading fonts) from messing with the accent. Also save the
  260. % space factor of the argument -- we'll need to restore it,
  261. % otherwise, e.g., \'A will have the factor of 1000 instead of 999.
  262. \setbox\z@\hbox{#2%
  263. \xdef\f@do@accent@spacefactor{\spacefactor\the\spacefactor}}%
  264. % Save the current font encoding and switch it.
  265. \f@change@enc
  266. % Start the accent.
  267. \accent#1
  268. % Turn off \fontnotify and \setleading, because their \message and
  269. % \setbox will break the accent. We don't turn off \fontwarn
  270. % because a warning would mean that the fonts are broken anyway,
  271. % and a warning might help diagnosing.
  272. \let\@fontnotify\gobble
  273. \let\@setleading\gobble
  274. % Restore the original encoding.
  275. \f@restore@enc
  276. % Typeset the argument.
  277. #2\f@do@accent@spacefactor % Restore the space factor.
  278. \egroup
  279. }%
  280. %
  281. %
  282. %
  283. % \f@search@command{COMMAND}
  284. %
  285. % Search for the glyph COMMAND and typeset it.
  286. \def\f@search@command#1{%
  287. % Check the cache of the current font encoding list.
  288. \expandafter\let \expandafter\temp
  289. \csname \the\enclist@curr\string#1\endcsname
  290. %
  291. \ifx\temp\relax
  292. % The glyph is not in the cache, search.
  293. %\message{^^J Glyph command `\string#1' is not
  294. % in the cache (idx \the\enclist@curr).}%
  295. \def\f@search@cmd{\string#1}%
  296. \let\f@search@arg\empty
  297. \let\f@accent@arg\empty
  298. \f@search@encodings
  299. \else
  300. % The glyph is in the cache.
  301. %\message{^^J Glyph command `\string#1' is
  302. % in the cache (idx \the\enclist@curr).}%
  303. \temp
  304. \fi
  305. }%
  306. %
  307. % \f@search@composite{COMMAND}{ARGUMENT}
  308. %
  309. % Search for the composite COMMAND + ARGUMENT and typeset it. If such
  310. % composite is not defined but an accent named COMMAND is, the accent
  311. % will be substituted.
  312. \def\f@search@composite#1#2{%
  313. % Check the cache with the current font encoding list. \empty after
  314. % #2 is for a situation like \'{} (empty ARGUMENT).
  315. \expandafter\let \expandafter\temp
  316. \csname \the\enclist@curr\string#1-\string#2\empty\endcsname
  317. %
  318. \ifx\temp\relax
  319. % The glyph is not in the cache, search.
  320. %\message{^^J Glyph composite `\string#1{\string#2\empty}' is not
  321. % in the cache (idx \the\enclist@curr).}%
  322. \def\f@search@arg{-\string#2\empty}%
  323. \def\f@search@cmd{\string#1}%
  324. \def\f@accent@arg{{#2}}%
  325. \f@search@encodings
  326. \else
  327. % The glyph is in the cache.
  328. %\message{^^J Glyph composite `\string#1{\string#2\empty}' is
  329. % in the cache (idx \the\enclist@curr).}%
  330. \temp
  331. \fi
  332. }%
  333. %
  334. % \f@search@accent{COMMAND}{ARGUMENT}
  335. %
  336. % Search for the accent COMMAND and typeset it over the ARGUMENT. If a
  337. % composite with the name COMMAND is defined with the ARGUMENT, it
  338. % might be used in preference to the accent.
  339. \let\f@search@accent\f@search@composite
  340. %
  341. %
  342. %
  343. % \f@search@encodings
  344. %
  345. % Search for a glyph (accent/composite/command), first in the current
  346. % encoding, then in the current font encoding list (set up by
  347. % @documentencoding), then in all encodings in which the glyph
  348. % appears. After the glyph is found, define the cache entry for the
  349. % glyph and typeset the glyph.
  350. \def\f@search@encodings{%
  351. \let\@enc\relax
  352. \let\f@cache@arg\f@search@arg
  353. % Check the current font encoding + the current font encoding list
  354. % breadth-first. We want to find a glyph as early in the list as
  355. % possible (to hopefully minimize number of fonts that get loaded),
  356. % therefore we prefer an accent in an earlier encoding over a
  357. % composite in a later encoding, hence the "breadth first" search.
  358. \edef\temp{\f@encoding\space\cur@fenc@list}%
  359. \f@search@breadthfirst \temp
  360. %
  361. \ifx\@enc\relax
  362. % Nothing found, so we try a different tactic. We check encoding
  363. % list of the glyph to find the first encoding which is supported
  364. % by the current font family. One complication is that a glyph
  365. % can appear as a command, a composite or an accent, so we need to
  366. % check all possibilities (but preferring composites over
  367. % accents).
  368. %
  369. % Check the composite. If \f@search@arg is \empty, this will check
  370. % encoding list of the command, which is exactly what we need.
  371. \expandafter\f@search@glyph
  372. \csname fenc@list/\f@search@cmd\f@search@arg\endcsname
  373. %
  374. \ifx\@enc\relax
  375. % Nothing found, check the font encoding list of the command / accent.
  376. \let\f@search@arg\empty % It's not a composite, so we don't need arg part.
  377. \expandafter\f@search@glyph
  378. \csname fenc@list/\f@search@cmd\endcsname
  379. %
  380. \ifx\@enc\relax
  381. % Still nothing found, which means the current family does not
  382. % support any of the composite's / command's / accent's encodings.
  383. \errmessage{^^JThe font family \f@family\space does not support
  384. the command `\f@search@cmd\f@cache@arg'}%
  385. \fi
  386. \else
  387. % We've found a composite (or a command), so we don't need the arg below.
  388. \let\f@accent@arg\empty
  389. \fi
  390. \fi
  391. % Make the cache entry.
  392. \edef\temp##1{%
  393. \expandafter\gdef\expandafter\noexpand
  394. \csname \the\enclist@curr\f@search@cmd\f@cache@arg\endcsname{%
  395. % Set \@enc to the encoding of the glyph.
  396. \expandafter\noexpand
  397. \csname cache@enc@\@enc\endcsname
  398. % Call the glyph's definition for the encoding we've found.
  399. \expandafter\noexpand
  400. \csname\@enc/\f@search@cmd\f@search@arg\endcsname ##1%
  401. }%
  402. }%
  403. \expandafter\temp\expandafter{\f@accent@arg}%
  404. % Typeset the glyph.
  405. \csname \the\enclist@curr\f@search@cmd\f@cache@arg\endcsname
  406. }%
  407. %
  408. % \f@search@breadthfirst \ENC-LIST
  409. %
  410. % Search (recursively) for a glyph in encodings from \ENC-LIST,
  411. % preferring an accent in an earlier encoding over a composite in a
  412. % later encoding. When the glyph is found, \@enc, \f@search@arg and
  413. % \f@accent@arg are set accordingly (see \f@search@encodings).
  414. \def\f@search@breadthfirst#1{%
  415. \let\next\@f@search@breadthfirst % \@f@search@breadthfirst needs this.
  416. \expandafter\@f@search@breadthfirst #1\finish
  417. }%
  418. %
  419. \def\@f@search@breadthfirst#1 #2\finish{%
  420. % See if this is the last encoding in the list.
  421. \def\temp{#2}%
  422. \ifx\temp\empty % Yes, gobble the list's sentinel.
  423. \let\next\gobble@to@finish
  424. \fi
  425. % See if this encoding is supported by the current family.
  426. \expandafter\ifx \csname fam@enc/\f@family/#1\endcsname \relax
  427. \else
  428. % See if the encoding contains the composite (or the command, when
  429. % \f@search@arg is \empty).
  430. \expandafter\ifx \csname #1/\f@search@cmd\f@search@arg\endcsname \relax
  431. % No, but maybe the encoding contains the accent. (This might
  432. % also check the second time for the command if it was not found
  433. % above.)
  434. \expandafter\ifx \csname #1/\f@search@cmd\endcsname \relax \else
  435. \let\f@search@arg\empty % \f@search@encodings needs this.
  436. \def\@enc{#1}%
  437. \let\next\gobble@to@finish % Gobble the rest of the list.
  438. \fi
  439. \else % Yes, this encoding contains the composite (or a command).
  440. \let\f@accent@arg\empty % \f@search@encodings needs this.
  441. \def\@enc{#1}%
  442. \let\next\gobble@to@finish % Gobble the rest of the list.
  443. \fi
  444. \fi
  445. %
  446. \next#2\finish
  447. }%
  448. %
  449. % \f@search@glyph \ENC-LIST
  450. %
  451. % Search (recursively) for a particular type of glyph
  452. % (command/composite/accent, determined by the combination of
  453. % \f@search@cmd and \f@search@arg) in encodings from \ENC-LIST.
  454. \def\f@search@glyph#1{%
  455. \ifx#1\relax \else
  456. \let\next\@f@search@glyph % \@f@search@glyph needs this.
  457. \expandafter\@f@search@glyph#1\finish
  458. \fi
  459. }%
  460. %
  461. \def\@f@search@glyph#1 #2\finish{%
  462. % See if this is the last encoding in the list.
  463. \def\temp{#2}%
  464. \ifx\temp\empty % Yes, gobble the list's sentinel.
  465. \let\next\gobble@to@finish
  466. \fi
  467. % See if this encoding is supported by the current family.
  468. \expandafter\ifx \csname fam@enc/\f@family/#1\endcsname \relax
  469. \else % Yes, see if the encoding contains the glyph.
  470. \expandafter\ifx \csname #1/\f@search@cmd\f@search@arg\endcsname \relax
  471. \else
  472. \def\@enc{#1}%
  473. \let\next\gobble@to@finish % Gobble the rest of the list.
  474. \fi
  475. \fi
  476. %
  477. \next#2\finish
  478. }%
  479. %
  480. %
  481. %
  482. % Font ("output") encodings. LaTeX's ltoutenc.dtx v1.99h has been
  483. % used as reference.
  484. %
  485. % Some commands common to several encodings.
  486. %
  487. \def\registeredsymbol{\leavevmode\raise.7ex\hbox{\textregistered}}
  488. \def\@euro{{\setfontfamily{Eurosym}\setfontencoding{T1}\selectfont\char101}}%
  489. \def\aa{\ringaccent a}%
  490. \def\AA{\ringaccent A}%
  491. \def\@cedilla#1#2{{\setbox\z@\hbox{\f@restore@enc #2}%
  492. \ifdim\ht\z@=1ex\accent#1 \f@restore@enc #2%
  493. \else\ooalign{\unhbox\z@\crcr\hidewidth\char#1\hidewidth}\fi}}%
  494. \def\@udotaccent#1{{\o@lign{\relax\f@restore@enc#1\crcr
  495. \hidewidth\sh@ft{-1ex}.\hidewidth}}}%
  496. \def\@ubaraccent#1#2{{\o@lign{\relax\f@restore@enc#2\crcr
  497. \hidewidth\sh@ft{-3ex}\vbox to.2ex{\hbox{\char#1}\vss}\hidewidth}}}%
  498. %
  499. % This defines encoding used when defining font glyph and commands.
  500. \def\fenc@begin#1{%
  501. \def\fenc@enc{#1}%
  502. \expandafter\def\csname cache@enc@#1\endcsname{\def\@enc{#1}}%
  503. }%
  504. %
  505. % OT1.
  506. \fenc@begin{OT1}
  507. \fSym\ptexi{16}
  508. \fSym\j{17}
  509. \fAcc\`{18}
  510. \fCmp\`i{\f@restore@enc\`\ptexi}
  511. \fAcc\'{19}
  512. \fCmp\'i{\f@restore@enc\'\ptexi}
  513. \fAcc\v{20}
  514. \fAcc\u{21}
  515. \fAcc\={22}
  516. \fAcc\ringaccent{23}
  517. \fCmp\ringaccent A{\leavevmode\setbox0\hbox{!}\dimen@\ht0\advance\dimen@-1ex%
  518. \rlap{\raise.67\dimen@\hbox{\char'27}}A}
  519. \fSym\ss{25}
  520. \fSym\ae{26}
  521. \fSym\oe{27}
  522. \fSym\o{28}
  523. \fSym\AE{29}
  524. \fSym\OE{30}
  525. \fSym\O{31}
  526. \fCmd\l{\char32l}
  527. \fCmd\L{\leavevmode\setbox0\hbox{L}\hbox to\wd0{\hss\char32L}}
  528. \fCmd\textquotedblright{`\"}
  529. \fCmd\textdollar{{\ifdim\fontdimen\@ne\font>\z@\slshape\else\upshape\fi\$}}
  530. \fCmd\textquoteright{`\'}
  531. \fCmd\exclamdown{!`}
  532. \fCmd\questiondown{?`}
  533. \fSym\textquotedblleft{92}
  534. \fAcc\^{94}
  535. \fCmp\^i{\f@restore@enc\^\ptexi}
  536. \fAcc\dotaccent{95}
  537. \fCmpSym\dotaccent i{`\i}
  538. \fCmpSym\dotaccent\i{`\i}
  539. \fCmd\textquoteleft{`\`}
  540. \fSym\textendash{123}
  541. \fSym\textemdash{124}
  542. \fAcc\H{125}
  543. \fAcc\~{126}
  544. \fAcc\"{127}
  545. \fCmp\"i{\f@restore@enc\"\ptexi}
  546. \fCmd\pounds{{\ifdim\fontdimen\@ne\font>\z@\itshape\else
  547. \setfontshape{ui}\selectfont\fi\$}}
  548. \fCmd\euro\@euro
  549. \fCmdd\,{\@cedilla{24}{#1}}
  550. \fCmdd\udotaccent{\@udotaccent{#1}}
  551. \fCmdd\ubaraccent{\@ubaraccent{22}{#1}}
  552. \fCmd\ordf{\leavevmode\raise1ex\hbox{\scalefont{727}\underbar{a}}}
  553. \fCmd\ordm{\leavevmode\raise1ex\hbox{\scalefont{727}\underbar{o}}}
  554. \fCmd\ij{\nobreak\hskip\z@skip i\kern-0.02em j\nobreak\hskip\z@skip}
  555. \fCmd\IJ{\nobreak\hskip\z@skip I\kern-0.02em J\nobreak\hskip\z@skip}
  556. \fCmd\textonesuperior{$^{\hbox{\scalefont{727}1}}$}
  557. \fCmd\texttwosuperior{$^{\hbox{\scalefont{727}2}}$}
  558. \fCmd\textthreesuperior{$^{\hbox{\scalefont{727}3}}$}
  559. \fCmd\textonequarter{$\hbox{\scalefont{727}1}\over\hbox{\scalefont{727}4}$}
  560. \fCmd\textonehalf{$\hbox{\scalefont{727}1}\over\hbox{\scalefont{727}2}$}
  561. \fCmd\textthreequarters{$\hbox{\scalefont{727}3}\over\hbox{\scalefont{727}4}$}
  562. % End of OT1.
  563. %
  564. % OML.
  565. \fenc@begin{OML}
  566. \fSym\textless{`\<}
  567. \fSym\textgreater{`\>}
  568. %\fSym\star{63}% FIXME this requires redefining \point.
  569. \fAcc\tieaccent{127}
  570. % End of OML.
  571. %
  572. % OMS.
  573. \fenc@begin{OMS}
  574. \fSym\minus0
  575. \fSym\textperiodcentered1
  576. \fSym\textmultiply2
  577. \fSym\texttimes2
  578. \fSym\textdivide4
  579. \fSym\textdiv4
  580. \fSym\textplusminus6
  581. \fSym\textpm6
  582. \fSym\bullet{15}
  583. \fCmd\textdegree{$^{\hbox{\char14}}$}%
  584. % FIXME @result, @expansion, @print, @equiv?
  585. \fSym\{{102}
  586. \fSym\}{103}
  587. \fSym\textbackslash{110}% FIXME name.
  588. \fSym\textsection{120}
  589. \fSym\textdagger{121}
  590. \fSym\textdaggerdbl{122}
  591. \fSym\textparagraph{123}
  592. \fSym\textbigcircle{13}
  593. \def\oms@textcircled#1{{\ooalign{%
  594. \hfil\raise.32ex\hbox{\f@restore@enc\scalefont{600}#1}\hfil\crcr
  595. \raise.35ex\hbox{\scalefont{780}\textbigcircle}}}}%
  596. \fCmdd\textcircled{\oms@textcircled{#1}}
  597. \fCmd\textregistered{\oms@textcircled{R}}
  598. \fCmd\copyright{\oms@textcircled{\kern-.05em C}}
  599. % End of OMS.
  600. %
  601. % Common glyphs of the T* encodings.
  602. \def\t@oenc@common{%
  603. \fAcc\`0
  604. \fAcc\'1
  605. \fAcc\^2
  606. \fAcc\~3
  607. \fAcc\"4
  608. \fAcc\H5
  609. \fAcc\ringaccent6
  610. \fAcc\v7
  611. \fAcc\u8
  612. \fAcc\=9
  613. \fAcc\dotaccent{10}
  614. \fCmpSym\dotaccent i{`\i}
  615. \fCmpSym\dotaccent\i{`\i}
  616. \fCmdd\,{\@cedilla{11}{##1}}
  617. \fCmdd\k{{\ooalign{\relax\f@restore@enc ##1\crcr\hidewidth\char12}}}
  618. \fCmdd\ogonekcentered{{\ooalign{\relax\f@restore@enc ##1\crcr\hidewidth\char12\hidewidth}}}
  619. \fCmp\k o{\f@restore@enc\ogonekcentered o}
  620. \fCmp\k O{\f@restore@enc\ogonekcentered O}
  621. \fSym\textquotedblleft{16}
  622. \fSym\textquotedblright{17}
  623. \fSym\textendash{21}
  624. \fSym\textemdash{22}
  625. \fCmd\textperthousand{\%\char 24 }
  626. \fCmd\textpertenthousand{\%\char 24\char 24 }
  627. \fSym\ptexi{25}
  628. \fSym\j{26}
  629. \fSym\textvisiblespace{32}
  630. \fCmd\textquotedbl{`\"}
  631. \fCmd\textdollar{`\$}
  632. \fSym\textquoteright{`\'}
  633. \fSym\textless{`\<}
  634. \fSym\textgreater{`\>}
  635. \fSym\textbackslash{92}% FIXME name.
  636. \fSym\textquoteleft{`\`}
  637. \fSym\{{123}
  638. \fSym\}{125}
  639. \fCmdd\udotaccent{\@udotaccent{##1}}
  640. \fCmdd\ubaraccent{\@ubaraccent{9}{##1}}
  641. }%
  642. % End of common glyphs of the T* encodings.
  643. %
  644. % T1.
  645. \fenc@begin{T1}
  646. \t@oenc@common % The common glyphs.
  647. \fSym\textquotesinglbase{13}% FIXME LaTeX calls it `\quotesinglbase'.
  648. \fSym\textguilsinglleft{14}% FIXME LaTeX calls it `\guilsinglleft'.
  649. \fSym\textguilsinglright{15}% FIXME LaTeX calls it `\guilsinglright'.
  650. \fSym\textquotedblbase{18}% FIXME LaTeX calls it `\quotedblbase'.
  651. \fSym\textguillemotleft{19}% FIXME LaTeX calls it `\guillemotleft'.
  652. \fSym\textguillemotright{20}% FIXME LaTeX calls it `\guillemotright'.
  653. \fCmpSym\u A{128}
  654. \fCmpSym\k A{129}
  655. \fCmpSym\'C{130}
  656. \fCmpSym\v C{131}
  657. \fCmpSym\v D{132}
  658. \fCmpSym\v E{133}
  659. \fCmpSym\k E{134}
  660. \fCmpSym\u G{135}
  661. \fCmpSym\'L{136}
  662. \fCmpSym\v L{137}
  663. \fSym\L{138}
  664. \fCmpSym\'N{139}
  665. \fCmpSym\v N{140}
  666. \fSym\NG{141}
  667. \fCmpSym\H O{142}
  668. \fCmpSym\'R{143}
  669. \fCmpSym\v R{144}
  670. \fCmpSym\'S{145}
  671. \fCmpSym\v S{146}
  672. \fCmpSym\,S{147}
  673. \fCmpSym\v T{148}
  674. \fCmpSym\,T{149}
  675. \fCmpSym\H U{150}
  676. \fCmpSym\ringaccent U{151}
  677. \fCmpSym\"Y{152}
  678. \fCmpSym\'Z{153}
  679. \fCmpSym\v Z{154}
  680. \fCmpSym\dotaccent Z{155}
  681. \fSym\IJ{156}
  682. \fCmpSym\dotaccent I{157}
  683. \fSym\dj{158}% FIXME AGL calls it dcroat.
  684. \fSym\textsection{159}
  685. \fCmpSym\u a{160}
  686. \fCmpSym\k a{161}
  687. \fCmpSym\'c{162}
  688. \fCmpSym\v c{163}
  689. \fCmpSym\v d{164}
  690. \fCmpSym\v e{165}
  691. \fCmpSym\k e{166}
  692. \fCmpSym\u g{167}
  693. \fCmpSym\'l{168}
  694. \fCmpSym\v l{169}
  695. \fSym\l{170}
  696. \fCmpSym\'n{171}
  697. \fCmpSym\v n{172}
  698. \fSym\ng{173}
  699. \fCmpSym\H o{174}
  700. \fCmpSym\'r{175}
  701. \fCmpSym\v r{176}
  702. \fCmpSym\'s{177}
  703. \fCmpSym\v s{178}
  704. \fCmpSym\,s{179}
  705. \fCmpSym\v t{180}
  706. \fCmpSym\,t{181}
  707. \fCmpSym\H u{182}
  708. \fCmpSym\ringaccent u{183}
  709. \fCmpSym\"y{184}
  710. \fCmpSym\'z{185}
  711. \fCmpSym\v z{186}
  712. \fCmpSym\dotaccent z{187}
  713. \fSym\ij{188}
  714. \fSym\exclamdown{189}
  715. \fSym\questiondown{190}
  716. \fSym\pounds{191}
  717. \fCmpSym\`A{192}
  718. \fCmpSym\'A{193}
  719. \fCmpSym\^A{194}
  720. \fCmpSym\~A{195}
  721. \fCmpSym\"A{196}
  722. \fCmpSym\ringaccent A{197}
  723. \fSym\AE{198}
  724. \fCmpSym\,C{199}
  725. \fCmpSym\`E{200}
  726. \fCmpSym\'E{201}
  727. \fCmpSym\^E{202}
  728. \fCmpSym\"E{203}
  729. \fCmpSym\`I{204}
  730. \fCmpSym\'I{205}
  731. \fCmpSym\^I{206}
  732. \fCmpSym\"I{207}
  733. \fSym\DH{208}% FIXME AGL calls it eth.
  734. \fSym\DJ{208}% FIXME AGL calls it dcroat.
  735. \fCmpSym\~N{209}
  736. \fCmpSym\`O{210}
  737. \fCmpSym\'O{211}
  738. \fCmpSym\^O{212}
  739. \fCmpSym\~O{213}
  740. \fCmpSym\"O{214}
  741. \fSym\OE{215}
  742. \fSym\O{216}
  743. \fCmpSym\`U{217}
  744. \fCmpSym\'U{218}
  745. \fCmpSym\^U{219}
  746. \fCmpSym\"U{220}
  747. \fCmpSym\'Y{221}
  748. \fSym\TH{222}% FIXME AGL calls it thorn.
  749. \fSym\SS{223}
  750. \fCmpSym\`a{224}
  751. \fCmpSym\'a{225}
  752. \fCmpSym\^a{226}
  753. \fCmpSym\~a{227}
  754. \fCmpSym\"a{228}
  755. \fCmpSym\ringaccent a{229}
  756. \fSym\ae{230}
  757. \fCmpSym\,c{231}
  758. \fCmpSym\`e{232}
  759. \fCmpSym\'e{233}
  760. \fCmpSym\^e{234}
  761. \fCmpSym\"e{235}
  762. \fCmpSym\`i{236}
  763. \fCmpSym\'i{237}
  764. \fCmpSym\^i{238}
  765. \fCmpSym\"i{239}
  766. \fSym\dh{240}% FIXME AGL calls it eth.
  767. \fCmpSym\~n{241}
  768. \fCmpSym\`o{242}
  769. \fCmpSym\'o{243}
  770. \fCmpSym\^o{244}
  771. \fCmpSym\~o{245}
  772. \fCmpSym\"o{246}
  773. \fSym\oe{247}
  774. \fSym\o{248}
  775. \fCmpSym\`u{249}
  776. \fCmpSym\'u{250}
  777. \fCmpSym\^u{251}
  778. \fCmpSym\"u{252}
  779. \fCmpSym\'y{253}
  780. \fSym\th{254}% FIXME AGL calls it thorn.
  781. \fSym\ss{255}
  782. % End of T1.
  783. %
  784. % T2A.
  785. \fenc@begin{T2A}
  786. \t@oenc@common % The common glyphs.
  787. \fSym\CYRpalochka{13}
  788. \fAcc\f{18}
  789. \fAcc\C{19}
  790. \fAcc\U{20}
  791. \fSym\textnumero{157}
  792. \fSym\textsection{158}
  793. \fSym\textquotedblbase{189}% FIXME LaTeX calls this \quotedblbase.
  794. \fSym\textguillemotleft{190}% FIXME LaTeX calls it `\guillemotleft'.
  795. \fSym\textguillemotright{191}% FIXME LaTeX calls it `\guillemotright'.
  796. \fSym\CYRA{192}
  797. \fSym\cyra{224}
  798. \fSym\CYRB{193}
  799. \fSym\cyrb{225}
  800. \fSym\CYRV{194}
  801. \fSym\cyrv{226}
  802. \fSym\CYRG{195}
  803. \fSym\cyrg{227}
  804. \fSym\CYRD{196}
  805. \fSym\cyrd{228}
  806. \fSym\CYRE{197}
  807. \fSym\cyre{229}
  808. \fSym\CYRZH{198}
  809. \fSym\cyrzh{230}
  810. \fSym\CYRZ{199}
  811. \fSym\cyrz{231}
  812. \fSym\CYRI{200}
  813. \fSym\cyri{232}
  814. \fSym\CYRISHRT{201}
  815. \fSym\cyrishrt{233}
  816. \fSym\CYRK{202}
  817. \fSym\cyrk{234}
  818. \fSym\CYRL{203}
  819. \fSym\cyrl{235}
  820. \fSym\CYRM{204}
  821. \fSym\cyrm{236}
  822. \fSym\CYRN{205}
  823. \fSym\cyrn{237}
  824. \fSym\CYRO{206}
  825. \fSym\cyro{238}
  826. \fSym\CYRP{207}
  827. \fSym\cyrp{239}
  828. \fSym\CYRR{208}
  829. \fSym\cyrr{240}
  830. \fSym\CYRS{209}
  831. \fSym\cyrs{241}
  832. \fSym\CYRT{210}
  833. \fSym\cyrt{242}
  834. \fSym\CYRU{211}
  835. \fSym\cyru{243}
  836. \fSym\CYRF{212}
  837. \fSym\cyrf{244}
  838. \fSym\CYRH{213}
  839. \fSym\cyrh{245}
  840. \fSym\CYRC{214}
  841. \fSym\cyrc{246}
  842. \fSym\CYRCH{215}
  843. \fSym\cyrch{247}
  844. \fSym\CYRSH{216}
  845. \fSym\cyrsh{248}
  846. \fSym\CYRSHCH{217}
  847. \fSym\cyrshch{249}
  848. \fSym\CYRHRDSN{218}
  849. \fSym\cyrhrdsn{250}
  850. \fSym\CYRERY{219}
  851. \fSym\cyrery{251}
  852. \fSym\CYRSFTSN{220}
  853. \fSym\cyrsftsn{252}
  854. \fSym\CYREREV{221}
  855. \fSym\cyrerev{253}
  856. \fSym\CYRYU{222}
  857. \fSym\cyryu{254}
  858. \fSym\CYRYA{223}
  859. \fSym\cyrya{255}
  860. \fSym\CYRGUP{128}
  861. \fSym\cyrgup{160}
  862. \fSym\CYRGHCRS{129}
  863. \fSym\cyrghcrs{161}
  864. \fSym\CYRDJE{130}
  865. \fSym\cyrdje{162}
  866. \fSym\CYRTSHE{131}
  867. \fSym\cyrtshe{163}
  868. \fSym\CYRSHHA{132}
  869. \fSym\cyrshha{164}
  870. \fSym\CYRZHDSC{133}
  871. \fSym\cyrzhdsc{165}
  872. \fSym\CYRZDSC{134}
  873. \fSym\cyrzdsc{166}
  874. \fSym\CYRLJE{135}
  875. \fSym\cyrlje{167}
  876. \fSym\CYRYI{136}
  877. \fSym\cyryi{168}
  878. \fSym\CYRKDSC{137}
  879. \fSym\cyrkdsc{169}
  880. \fSym\CYRKBEAK{138}
  881. \fSym\cyrkbeak{170}
  882. \fSym\CYRKVCRS{139}
  883. \fSym\cyrkvcrs{171}
  884. \fSym\CYRAE{140}
  885. \fSym\cyrae{172}
  886. \fSym\CYRNDSC{141}
  887. \fSym\cyrndsc{173}
  888. \fSym\CYRNG{142}
  889. \fSym\cyrng{174}
  890. \fSym\CYRDZE{143}
  891. \fSym\cyrdze{175}
  892. \fSym\CYROTLD{144}
  893. \fSym\cyrotld{176}
  894. \fSym\CYRSDSC{145}
  895. \fSym\cyrsdsc{177}
  896. \fSym\CYRUSHRT{146}
  897. \fSym\cyrushrt{178}
  898. \fSym\CYRY{147}
  899. \fSym\cyry{179}
  900. \fSym\CYRYHCRS{148}
  901. \fSym\cyryhcrs{180}
  902. \fSym\CYRHDSC{149}
  903. \fSym\cyrhdsc{181}
  904. \fSym\CYRDZHE{150}
  905. \fSym\cyrdzhe{182}
  906. \fSym\CYRCHVCRS{151}
  907. \fSym\cyrchvcrs{183}
  908. \fSym\CYRCHRDSC{152}
  909. \fSym\cyrchrdsc{184}
  910. \fSym\CYRIE{153}
  911. \fSym\cyrie{185}
  912. \fSym\CYRSCHWA{154}
  913. \fSym\cyrschwa{186}
  914. \fSym\CYRNJE{155}
  915. \fSym\cyrnje{187}
  916. \fSym\CYRYO{156}
  917. \fSym\cyryo{188}
  918. \fSym\CYRII{73}
  919. \fSym\cyrii{105}
  920. \fSym\CYRJE{74}
  921. \fSym\cyrje{106}
  922. \fSym\CYRQ{81}
  923. \fSym\cyrq{113}
  924. \fSym\CYRW{87}
  925. \fSym\cyrw{119}
  926. \fCmpSym\"\CYRE{156}
  927. \fCmpSym\"\cyre{188}
  928. \fCmpSym\U\CYRI{201}
  929. \fCmpSym\U\cyri{233}
  930. \fCmpSym\"\CYRII{136}
  931. \fCmpSym\"\cyrii{168}
  932. \fCmpSym\,\CYRZ{134}
  933. \fCmpSym\,\cyrz{166}
  934. \fCmpSym\k\CYRS{145}
  935. \fCmpSym\k\cyrs{177}
  936. \fCmpSym\U\CYRU{146}
  937. \fCmpSym\U\cyru{178}
  938. % End of T2A.
  939. %
  940. % TS1.
  941. \fenc@begin{TS1}
  942. \fAcc\tieaccent{26}
  943. \fCmd\textdollar{`\$}
  944. \fSym\textfractionsolidus{47}
  945. \fSym\minus{61}
  946. \fSym\textbigcircle{79}
  947. \fCmdd\textcircled{{\ooalign{\hfil\raise.34ex%
  948. \hbox{\f@restore@enc\scalefont{560}#1}\hfil\crcr\hbox{\textbigcircle}}}}
  949. %\fSym\star{98}% FIXME this requires redefining \point.
  950. \fSym\textdagger{132}
  951. \fSym\textdaggerdbl{133}
  952. \fSym\textperthousand{135}
  953. \fSym\bullet{136}
  954. \fSym\texttrademark{151}
  955. \fSym\textpertenthousand{152}
  956. \fSym\textnumero{155}
  957. \fSym\textcent{162}
  958. \fSym\pounds{163}
  959. \fSym\textcurrency{164}
  960. \fSym\textyen{165}
  961. \fSym\textbrokenbar{166}
  962. \fSym\textsection{167}
  963. \fSym\copyright{169}
  964. \fSym\ordf{170}
  965. \fSym\textlnot{172}% FIXME What about \lnot?
  966. \fSym\textregistered{174}
  967. \fSym\textdegree{176}
  968. \fSym\textplusminus{177}
  969. \fSym\textpm{177}
  970. \fSym\texttwosuperior{178}
  971. \fSym\textthreesuperior{179}
  972. \fSym\textmu{181}
  973. \fSym\textparagraph{182}
  974. \fSym\textperiodcentered{183}
  975. \fSym\textonesuperior{185}
  976. \fSym\ordm{186}
  977. \fSym\textonequarter{188}
  978. \fSym\textonehalf{189}
  979. \fSym\textthreequarters{190}
  980. \fSym\euro{191}
  981. \fSym\textmultiply{214}
  982. \fSym\texttimes{214}
  983. \fSym\textdivide{246}
  984. \fSym\textdiv{246}
  985. % End of TS1.
  986. %
  987. % Free the memory.
  988. \let\t@oenc@common\undefined
  989. %
  990. \endinput