fontspec icon indicating copy to clipboard operation
fontspec copied to clipboard

Renderer=HarfBuzz is XeTeX.

Open kberry opened this issue 5 years ago • 3 comments

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.

kberry avatar Aug 30 '20 18:08 kberry

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 ]

Davislor avatar Dec 23 '20 20:12 Davislor

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 :).

kberry avatar Dec 23 '20 21:12 kberry

It’s a good suggestion. I usually just live with the warning, but it’s better not to have spurious warnings.

Davislor avatar Dec 23 '20 22:12 Davislor