fontspec
fontspec copied to clipboard
Renderer=HarfBuzz is XeTeX.
I'd like to run a document (tugboat article) with both xelatex and lualatex. With LuaLaTeX, Renderer=HarfBuzz is required to use hb, as in:
\newfontfamily\devanagarifont[Script=Devanagari,Renderer=HarfBuzz]
{NotoSerifDevanagari-Regular.ttf}
when run with xelatex, this generates a warning:
Package fontspec Warning: Ignored LuaTeX-only feature:
(fontspec) 'Renderer=Full/Basic/Node/Base/HarfBuzz'.
Ok, it's just a warning, but still, it's rather irritating. XeTeX is already rendering with HarfBuzz. So it would be nice if this particular setting would be silently accepted, instead of complained about. I know it's probably not simple though :(. Fine if you want to call it "wontfix" : ), just thought i'd suggest it. thanks.
You can write
\usepackage{iftex}
\ifluahbtex
\defaultfontfeatures{ Renderer=HarfBuzz, Scale=MatchLowercase, Ligatures=TeX }
\else
\defaultfontfeatures{ Scale=MatchLowercase, Ligatures=TeX }
\fi
Or
\usepackage{iftex}
\ifluahbtex
\defaultfontfeatures[NotoSerifDevanagari]{Renderer=HarfBuzz}
\fi
\newfontfamily\devanagarifont{NotoSerifDevanagari}[
Scale = MatchUppercase,
Script = Devanagari,
UprightFont = *-Regular,
BoldFont = *-Bold,
Extension = .ttf ]
Yes, thanks. I know. The point of my message is that with xetex, since the renderer is always harfbuzz, it would be nice to silently accept that setting instead of warning about Renderer=harfbuzz. Then no conditional in the source is needed to avoid warnings when harfbuzz is desired for both engines.
However, I have my doubts that Will is ever going to have time to think about this, at least for the next N years while the kids gets older. And that's ok :).
It’s a good suggestion. I usually just live with the warning, but it’s better not to have spurious warnings.