Consider this MWE:
\documentclass{article}
\usepackage{fontspec}
\directlua{luaotfload.add_fallback("noto_fallback",
{
"NotoSerif:mode=base;color=FF8800;",
})}
\setmainfont{Source Serif Pro}
[RawFeature={fallback=noto_fallback;color=A0A0A0}]
\setsansfont{Source Sans Pro}
\begin{document}
\section*{Some Polytonic Greek}
\setlength\parindent{0pt}
\setlength\parskip{1.5ex}
Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι,
ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς
λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ
τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿
εἰς τοῦτο προήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ
πρότερον κακῶς σκέψασθαι δέον.
\sffamily
As you can see, \emph{Source Serif Pro} (grey) contains some, but not
all required glyphs, which are then pulled from my fallback
font \emph{Noto Serif} (orange). I'd like all Greek characters to be
taken from Noto Serif (i.e., be orange in this example.)
\end{document}
My text is mainly in English (German, actually, but this doesn't matter), but requires some interspersed Polytonic Greek. I have a font which could
handle all my Greek needs specified as a fallback:
How can I get LuaLaTeX
to pull all Greek glyphs from that font,
for consistency's sake?
babel
, e.g., some lua code to remove Greek from Source Serif Pro, or substitute it with or map to Noto Serif Greek?\usepackage[greek,english]{babel} \babelprovide[import, onchar = fonts ids]{greek} \babelfont[greek]{rm}[Colour=orange]{Noto Serif} \setmainfont{Source Serif Pro}
automatically catches the glyphs, but not punctuation (,
,.
), so not 100%.\selectlanguage{greek}
switches, so not automatic.