Repository navigation
Support table specifications in luaotfload.define_font - #342
gucci-on-fleek wants to merge 2 commits into
Conversation
|
Looks like the CI is currently pinned at TL24: luaotfload/.github/workflows/main.yaml Line 56 in f0d45e3 Do you want me to change the new test to only use |
|
For me it seems |
Correct. Well, the luaotfload/src/luaotfload-auxiliary.lua Line 57 in 74f1152 part is needed because otherwise LuaTeX segfaults, but otherwise this PR makes
It would still work with every string specification (which is presumably every specification before this patch), so it would still be useful in that case. It wouldn't do anything useful with a table argument, but that seems fine, because there aren't any backwards compatibility concerns here, so we can just require the table users to manually quote the name if needed. I think that what you're getting at is that I should just use |
The point of rewriting fontnames is that multiple places (microtype immediately comes to mind, I think it used to be even the kernel but that should be gone by now assume that the I don't see how this would be safe for any package unless they first ensure that no package depends on |
74f1152 to
8119a29
Compare
|
Hmm, ok, so it sounds like I completely misunderstood what |
The internal function
ltx_readexplicitly support supports a table specification:luaotfload/src/luaotfload-loaders.lua
Line 134 in f0d45e3
However, the
luaotfload.rewrite_fontnamecallback handler raises an error if you pass a table specification toluaotfload.define_font. All the other default callbacks work correctly with a table argument though, so you can currently work around the problem by runningluaotfload.aux.stop_rewrite_fontname()or by settingconfig.luaotfload.run.definer = "read", but the better solution would be to fixluaotfload.rewrite_fontnameto correctly handle this case.