0

I'm trying to use the "noto-sans" font found in the LaTeX Font Catalog, unfortunately each dash (-) produces a tombstone (▯) as output.

Here is an MWE:

%!TEX program = xelatex
\documentclass{article}

\usepackage{noto-mono} \usepackage{fontenc} \usepackage{listings}

\begin{document} \begin{lstlisting}[ language=C, basicstyle={\small\notomono} ] int main() { printf("----"); return 0; } \end{lstlisting} \end{document}

Output:

Broken output

  • change the definition of the hyphen https://tex.stackexchange.com/a/424193/2388 – Ulrike Fischer Apr 23 '21 at 08:17
  • @UlrikeFischer thank you very much, what is the cause of this behavior? Does it depend on some sort of font feature? – testa_a_posto Apr 23 '21 at 08:24
  • @testa_a_posto Putting in \tracinglostchars=2 and using system fonts instead shows that Noto Sans Mono font does not have the minus sign (U+2212; listings package maps hyphen (U+002D) to minus sign for \ttfamily), so it comes out tofu; but Noto Mono font does have the minus sign. The noto-mono package explicitly supports Noto Sans Mono. – Cicada Apr 23 '21 at 11:21

0 Answers0