[Dev-luatex] require doesn't get recorded
Hans Hagen
j.hagen at xs4all.nl
Thu Nov 7 16:20:19 CET 2019
On 11/7/2019 3:57 PM, Linas Stonys wrote:
> Hi All,
> I'm using dirty trick to write documents used .otf files to .fls by
> adding code to ...\tex\latex\fontspec\fontspec.cfg
>
> \bgroup
> \catcode`\ 10 %
>
> \gdef\opentype at write@to at fls{%
> \directlua{
> local fontdata = fonts.hashes.identifiers
> local done = {}
> for id, fdata in pairs(fontdata) do
> if fdata.filename and not done[fdata.filename] then
> tex.sprint("\string\\IfFileExists{".. fdata.filename
> .."}{}{}")
> done[fdata.filename] = ''
> end
> end
> }}
>
> \egroup
> \AtEndDocument{\opentype at write@to at fls}
>
> Then example:
> \documentclass{article}
> \usepackage{fontspec}
>
> \begin{document}
> \fontfamily{ptm}\selectfont a
> \end{document}
>
> Maybe this could be solved directly in luatex engine that all the input
> would be written to .fls?
i have no clue what that code is for but if it's a trick to get
something recorded, you can probably use
fio.recordfilename(fdata.filename)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
More information about the dev-luatex
mailing list