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}
}
3
  • 2
    Seems like it’s a fontenc problem … Please add a minimal working example (MWE) that illustrates your problem.
    – Tobi
    Commented Jun 12, 2012 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
    Commented Jun 12, 2012 at 12:14
  • Please consider accepting your own answer, so that your question be removed from the "unanswered" pile.
    – jub0bs
    Commented Mar 2, 2014 at 13:35

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .