Shapers included in the TeX Live builds of LuaHBTeX
Marcel Fabian Krüger
tex at 2krueger.de
Fri Aug 2 19:22:50 CEST 2024
Hi,
On Thu, Aug 01, 2024 at 07:39:44PM GMT, Bruno Voisin via tex-live wrote:
> Hello,
>
> Is there a simple way to list the HarfBuzz shapers included in the TeX Live builds of LuaHBTeX?
>
> The fontspec doc lists 4 HarfBuzz renderers:
>
> Renderer = Harfbuzz -> corresponds to mode=harf in luaotfload
> Renderer = OpenType -> corresponds to mode=harf;shaper=ot
> Renderer = Graphite -> corresponds to mode=harf;shaper=graphite2
> Renderer = AAT -> corresponds to mode=harf;shaper=coretext_aat
>
> On the Mac, using no explicit shaper or using shaper=ot does work. Trying either shaper=graphite2 or shaper=coretext_aat, I get
>
> luaotfload | harf : Shaper failed.
>
> Does this mean these two shapers aren't included? Must they be installed separately?
>
> On the TL source repo there's a
>
> https://tug.org/svn/texlive/trunk/Build/source/libs/graphite2/
>
> so I was expecting the Graphite shaper to be included. Or is it just not included in Mac builds?
As the error help text says, there are two possible reasons for
`Shaper failed`: The shaper is not included or the shaper does not
support the font.
For `coretext_aat` the shaper is not included. `coretext_aat` has been
removed from HarfBuzz more than 5 years ago, so there is nothing to
install.
The `graphite2` shaper should usually be included in TeX Live builds (I
didn't check Mac, but it would be odd if it would be missing there) but
you still need a Graphite2 font. Unless your font is Graphite enabled
the shaper will fail.
Beside that: You should almost never explicitly set the shaper. The
default (fontspec option `Renderer = HarfBuzz`) will automatically
use graphite2 if it's supported by the font and otherwise use `ot`.
The `ot` shaper also implements AAT and will automatically use AAT
feature when used with an appropriate font.
>
> I tried to figure out a way to list the built-in shapers.
>
Create a file get_shapers.lua with content
```
print("Shapers: " .. table.concat({luaharfbuzz.shapers()}, ', '))
```
and then run `lualatex get_shapers.lua`.
On Linux this shows `Shapers: graphite2, ot, fallback`
Best,
Marcel
More information about the tex-live
mailing list.