1

I'm using \ttfamily but it renders listing with the Times New Roman. What am I doing wrong? I'm getting a warning message:

Font shape T2A/fi4/bx/n' undefined(Font) usingT2A/fi4/m/n' instead on input line 322. Font shape T2A/fi4/bx/n' undefined(Font) usingT2A/fi4/m/n' instead`.

\lstset{
    commentstyle = \color{gray},
    extendedchars=\true,
    basicstyle=\footnotesize\ttfamily,
    columns=fixed,
    inputencoding=utf8x,
    language = php,
    keepspaces=true,
    keywordstyle = \bfseries,
    morekeywords={function, return, new}
}
  • 2
    Seems like it’s a fontenc problem … Please add a minimal working example (MWE) that illustrates your problem. – Tobi Jun 12 '12 at 12:07
  • 4
    The Inconsolata font is not available in the T2A encoding for Russian (and other languages using the cyrillic script). As far as I can tell, the only available monospaced font is the cyrillic version of cmtt. – egreg Jun 12 '12 at 12:14
  • Please consider accepting your own answer, so that your question be removed from the "unanswered" pile. – jub0bs Mar 2 '14 at 13:35
1

As @egreg said

The Inconsolata font is not available in the T2A encoding for Russian (and other languages using the cyrillic script). As far as I can tell, the only available monospaced font is the cyrillic version of cmtt.

So I wrote

\renewcommand{\ttdefault}{cmtt}

And now it works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.