# How to replace CM fonts with ones compatible with XeTeX (in amsppt.sty)?

I would like to try to patch amsppt.sty AMSTeX style file to make it usable with XeTeX and non-Latin languages (Cyrillic). It looks like i need to replace the following CM fonts or font families with Unicode aware ones : cmcsc10, cmti7, cmr8, cmr6, cmmi8, cmmi6, cmsy8, cmsy6, cmbx8, cmbx6, cmti8, cmsl8, cmtt8, cmcsc10, cmex10, cmex10, cmmibfam, cmmib, cmbsyfam, cmbsy, cmcsc8, cmex8, cmex7.

Whis ones can i use instead, and where can i get them?

Another part of this question is how to use new fonts in amsppt.sty. The lines where the fonts are selected look like this:

\font@\sevenit=cmti7 \relax

• Did you try cm-unicode? – Bernard Jun 24 '15 at 7:40
• I tried, assuming that cmcsc10 would be called cmuncsc10, cmti7 would be called cmunti7, etc., but such fonts do not exist in cm-unicode or are named differently. – Alexey Jun 24 '15 at 8:17
• Cm-unicode has no more font files per size, e.g. you have a cmunti.otf file only. As for cmcsc, I don't know if it has been converted (its only version 0.7). For now it seems small caps are obtained by scaling uppercase letters. Why don't you use the Latin Modern fonts, which are very close to Computer Modern, and are much more complete? They're the default for XeLaTeX. – Bernard Jun 24 '15 at 8:47
• It was suggested to me to use cm-unicode in an answer to my question. I will try to see how to use Latin Modern. I hope i will find the ones that contain Cyrillics. – Alexey Jun 24 '15 at 9:38
• Could you tell me, please, how Latin Modern fonts with Cyrillics are called, and which package they are in? – Alexey Jun 24 '15 at 9:46

I prepared a file amspptfont.tex with the following contents

\chardef\atfontcatcode=\catcode\@
\catcode@=11

% the plain fonts
\font@\tenrm="[cmunrm]" at 10pt
\font@\sevenrm="[cmunrm]" at 7pt
\font@\fiverm="[cmunrm]" at 5pt

\font@\tenbf="[cmunbx]" at 10pt
\font@\sevenbf="[cmunbx]" at 7pt
\font@\fivebf="[cmunbx]" at 5pt

\font@\tentt="[cmuntt]" at 10pt

\font@\tensl="[cmunsl]" at 10pt

\font@\tenit="[cmunti]" at 10pt

% the amsppt fonts
\font@\tensmc="[cmunrm]:+smcp" at 10pt \relax
\font@\sevenit="[cmunti]" \relax
\font@\eightrm="[cmunrm]" at 8pt \relax
\font@\sixrm="[cmunrm]" at 6pt \relax
\font@\eightbf="[cmunbx]" at 8pt \relax
\font@\sixbf="[cmunbx]" at 6pt \relax
\font@\eightit="[cmunti]" at 8pt \relax
\font@\eightsl="[cmunsl]" at 8pt \relax
\font@\eighttt="[cmuntt]" at 8pt \relax
\font@\eightsmc="[cmunrm]:+smcp" at 8pt \relax

\catcode@=\atfontcatcode


Then the following test file

\input amstex
\documentstyle{amsppt}
\input amspptfont

\document

Добро пожаловать в русский Викисловарь — многофункциональный многоязычный словарь и тезаурус,
в обсуждении и пополнении которого может участвовать каждый.

\proclaim{Proposition 2.5} Let $S_1,\dots,S_m$ be the components
of a $J$-holomorphic cusp-curve $S$ and suppose that each
component $S_i$ is \rom(a multiple covering of\rom) a regular
curve and that Assumption \rom{(1.4a)} is satisfied. \dots
\endproclaim

\define\test#1{%
{\tt\string#1}{#1 Test of the font}\par
}

\test\tenrm
\test\sevenrm
\test\fiverm

\test\tenbf
\test\sevenbf
\test\fivebf

\test\tentt

\test\tensl

\test\tenit

\test\tensmc
\test\sevenit
\test\eightrm
\test\sixrm
\test\eightbf
\test\sixbf
\test\eightit
\test\eightsl
\test\eighttt
\test\eightsmc

\enddocument


produces the following output

I didn't even try math symbol fonts, which would require very extensive work with Latin Modern Math.

• Thanks, i will see if this example can help me to move on. Спасибо :). – Alexey Jun 24 '15 at 21:40
• You may add \uselanguage{russian} somewhere in your example to enable hyphenation. – Alexey Jun 25 '15 at 7:09
• If you add $\bar A$ to your example, there will be an error. It seems to be this bug, discussed also here. – Alexey Jun 25 '15 at 7:15
• @Alexey Sorry, but it seems that the bug is still there. On the other hand, if I add \input luaotfload.sty at the beginning and run luatex, there's no error, but no bar accent either. :-( – egreg Jun 25 '15 at 8:53
• By the way, what does \font@ mean? Why is it not \font`? – Alexey Jun 25 '15 at 15:58