[luatex] "any font" in kpsewhich?

Taco Hoekwater taco at elvenkind.com
Sun Apr 4 08:52:51 CEST 2010


Patrick Gundlach wrote:
> 
> Which is documented in the manual. I wonder now how I could state
> "any font file" in kpse.find_file, since I don't know what kind of
> font the user asks for (could be type1 or opentype font in my case).

You can use lua to parse the extensiom of the requested file,
or, easier, the (new, since 0.51) kpse.lookup command which
behaves much more like kpsewhich:

\directlua{
  texio.write_nl(kpse.lookup("texgyreheros-bold.otf") or "not found!")
}
\end


More information about the luatex mailing list