Unfortunately the next question in the series ASCII text set in Greek script when using \usepackage[greek]{babel} / Missing characters in output due to `\renewcommand{\familydefault}{\sfdefault}`
When we have a MWE like:
\documentclass[twoside]{book}
\usepackage{fontspec}
\usepackage[greek]{babel}
\setmainfont{Libertinus Sans}
\begin{document}
00027 printf({"{}JUST A PRINT STATEMENT\(\backslash\)n"{}}); \par
00027 printf({"{}Just a print statement\(\backslash\)n"{}}); \par
00028 printf({"{}Λίστα Δοκιμαστικών\(\backslash\)n"{}}); \par
\normalfont\ttfamily%
{00027 printf({"{}JUST A PRINT STATEMENT\(\backslash\)n"{}});}\par
{00027 printf({"{}Just a print statement\(\backslash\)n"{}});}\par
{00028 printf({"{}Λίστα Δοκιμαστικών\(\backslash\)n"{}});}\par
\normalfont%
\normalsize%
\end{document}
The output is like:
we see that in the Momospaced part a number of Greek characters are missing, how to fix this?
Edit
I used the advice from @Mico to use \setmonofont{Noto Mono}[Scale=MatchLowercase]
(I actually copied his entire code), but got a strange output:
\setmonofont{<font>}
with a font that supports Greek.\setmonofont{Libertinus Mono}
just beneath\setmainfont{Libertinus Sans}
I get all square boxes with a question mark in it (so character not found) in the last monospaced line. Any suggestion for a font / how I should improve my code?Libertinus Mono
doesn't feature the required greek letters.Missing character: There is no Λ in font Libertinus Mono Regular/OT:script=latn ;language=dflt;!
for a number of characters, but no clue from my side. Any suggestions for a Monospaced font with Greek characters?Noto Mono
, but there have got to be other suitable monospaced fonts out there as well.