# How to fix undeclared fonts?

I've wasted several days in attempts to setup the cyrillic Times New Roman in my document. I will be happy to use XeLaTeX, but the class disser I need does not support it (even when I removed the hardcoded hypertex driver, the hyperref configuration was totally broken after XeLaTeX).

Now I try to use the following configuration

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english, russian]{babel}
\usepackage[babel=true]{microtype}

\usepackage{newtxtext}  % Times for numbers in math mode

\usepackage{newtxmath}  % Times in math mode

\usepackage{pscyr}  % Cyrillic Times New Roman for text, not in CTAN
\renewcommand\rmdefault{ftm}

\begin{document}

Привет

1234567890

$1234567890$

\end{document}


and I get annoying warnings

Font shape T2A/ntxtlf/m/n' undefined(Font) using T2A/cmr/m/n' instead
Font shape T1/ftm/m/n' undefined(Font) using T1/cmr/m/n' instead
Some font shapes were not available, defaults substituted.


If I remove at least one of these blocks, I will get this ugly Computer Modern in some place.

I have the following questions:

1. Why does it even need the T1 encoding?? I have no text that uses it.
2. Why does it searches for T2A/ntxtlf if I explicitly set the ftm font?
3. Where will I see the cmr font?
4. How to avoid this warnings?
• We need links to help you: at least to know where pscyr is to be found and preferably where disser.cls can be found, too. (But the latter is less essential as we can just stick to the MWE.) – cfr Feb 25 '17 at 16:47
• Do \usepackage{tempora} instead of \usepackage{newtxtext}. Remove \usepackage{pscyr} and also the \renewcommand{\rmdefault}{ftm}. – egreg Feb 25 '17 at 16:56
• pscyr, disser. But these packages are fully OK. The problec is caused by newtx. If I change it to mathptmx, the warnings will disappear – Himura Feb 25 '17 at 16:59
• What is you distribution? I've just downloaded pscyrand installed it fairly easily, albeit I don't speak Russian. – Bernard Feb 25 '17 at 17:35
• again, pscyr is totally OK. There's no problems with it. newtx package causes these warnings. I use MikTeX on Windows – Himura Feb 26 '17 at 20:11

The more recent TeX distributions provide a Times-like font that supports the Cyrillic and Greek alphabets, loaded through the package tempora.

\documentclass{disser}
\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage[english, russian]{babel}
\usepackage[babel=true]{microtype}

\usepackage{tempora}  % Times for numbers in math mode
\usepackage{newtxmath}  % Times in math mode

\begin{document}

Привет

1234567890

$1234567890$

\end{document}


• Wow, that's really a good news. Thank you, I didn't know – Himura Feb 25 '17 at 17:02
• @Himura Thanks to Michael Sharpe! His job with fonts in invaluable. – egreg Feb 25 '17 at 17:09
• I stil have warnings (( Font shape 'T1/cmss/m/n' in size <10.5> not available(Font) size <10.95> substituted, Font shape 'T1/cmtt/m/n' in size <10.5> not available(Font) size <10.95> substituted, Size substitutions with differences(Font) up to 0.45pt have occurred. – Himura Feb 25 '17 at 17:36
• @Himura Add \RequirePackage{fix-cm} before \documentclass – egreg Feb 25 '17 at 17:40
• It works. But I need to search what this line does... Thank you – Himura Feb 25 '17 at 17:43
1. T1 is required by newtxtext.sty:

\RequirePackage[T1]{fontenc}


You have requested english as a secondary language. T1 will be used for English, with American hyphenation patterns. It may also be used for some letters in maths, but I did not check to see if this is the case or not. OT1 is default, but newtxmath.sty may substitute T1, as some packages do.

1. When a font encoding is configured, a default fall back font is configured for that specific encoding. This is different from setting \rmdefault because you that family might not support the relevant encoding. This sets the font which is fallen back to for that specific encoding, if all else fails.

cmr is not ugly. I agree that it does not work well with Times clones, but that is not at all the same thing.

• OK, now I see I need T1. I didn't know it serves latin letters. But in my document English is not in cmr, but in Times. Does it substitude as it says? – Himura Feb 25 '17 at 17:40
• @Himura Probably not, but I'm not sure. Some definitions are deferred, so it might substitute but then that substitute gets overridden later, before you typeset anything. Just remove the \renewcommand - it isn't going to do you any good and just confuses things. You can tell what fonts are loaded by looking at the console/log to see if something is later loaded to replace it. newtxtext.sty depends on redefining \rmdefault, for that aspect of its typesetting, except when Babel is used, when it does something else. So probably the something else is effective here. – cfr Feb 25 '17 at 20:35