Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
}
share|improve this question
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. –  Jubobs Mar 2 at 13:35
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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