When using the listings package to display code together with mathdesign, it seems that a bitmap font is used. Here is an example:
\documentclass[12pt]{article}
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[charter]{mathdesign}
%\usepackage{lmodern}
\usepackage{listings}
\lstset{basicstyle=\ttfamily\footnotesize, frame=single, tabsize=4}
\begin{document}
Some text to describe my function
\lstinputlisting[language=Python]{script.py}
\end{document}
This file procuces an output where "Some text to describe my function" is displayed correctly (in Adobe Reader) while the code is pixelated. If I use the lmodern package instead, the code looks fine. It also works correctly when omitting the ttfamily setting in lstset.
Is it possible to display the code in vector format with my choice of fonts?