You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.
This is related to the closed pull request #323 but perhaps with slightly different motivation.
If luaotfload is called from tex via \RequirePackage{luaotfload} or similar then the usual latex mechanisms mean it is safe to do twice, with the second being a no-op.
If you initialise directly from lua the sequence is
require('luaotfload-main')
local _void = luaotfload.main ()
But if you do that twice, the require mechanism only loads the package the first time but main() dies the second time with
Module luatexbase Error: Unable to create callback `luaotfload.patch_font':
(luatexbase) callback type disallowed as name on input line 49
Would it be possible for luaotfload.main () to check an internal flag and see that luaotfload is already initialised and if so silently do nothing?
The motivation here is that we are considering (finally:-) to make lualatex and xelatex default to Unicode encoding which means in lualatex case adding something to \everyjob to load luaotfload.
I'd hoped to just use lua rather than load a latex package at that point but this issue probably prevents that as having done so, any document using
\usepackage{luaotfload}
dies with the above error.
Can work around that, but it seemed worth putting in a feature request....
The text was updated successfully, but these errors were encountered:
davidcarlisle
changed the title
calling luaoatfload.main() twice
calling luaotfload.main() twice
Dec 6, 2016
This is related to the closed pull request #323 but perhaps with slightly different motivation.
If luaotfload is called from tex via
\RequirePackage{luaotfload}
or similar then the usual latex mechanisms mean it is safe to do twice, with the second being a no-op.If you initialise directly from lua the sequence is
But if you do that twice, the
require
mechanism only loads the package the first time butmain()
dies the second time withWould it be possible for
luaotfload.main ()
to check an internal flag and see thatluaotfload
is already initialised and if so silently do nothing?The motivation here is that we are considering (finally:-) to make lualatex and xelatex default to Unicode encoding which means in lualatex case adding something to \everyjob to load luaotfload.
I'd hoped to just use lua rather than load a latex package at that point but this issue probably prevents that as having done so, any document using
\usepackage{luaotfload}
dies with the above error.
Can work around that, but it seemed worth putting in a feature request....
The text was updated successfully, but these errors were encountered: