Closed Evpok closed 10 years ago
This is weird. It works flawlessly in Plain like so:
\ifdefined \directlua
\input luaotfload.sty
\fi
\font \mainfont = "file:FreeSans-DifferentName.otf" at 42pt
\mainfont
foo bar baz
\bye
But the equivalent fontspec code fails. I’ll investigate this, thanks for the report!
OK, I got it. Fontspec uses Xetex-style syntax when defining fonts, so the error escaped my tests … New test files:
If you want to fix your luaotfload.lua manually, use this patch
--- /tmp/luaotfload.lua 2014-01-02 17:25:00.540952669 +0100
+++ luaotfload.lua 2014-01-02 17:26:57.327614277 +0100
@@ -340,13 +340,14 @@
name)
file_resolver (specification)
else
- local suffix = filesuffix (name)
- if formats[suffix] then
- specification.forced = suffix
- specification.name = file.removesuffix(name)
- else
- specification.name = name
- end
+ local suffix = filesuffix (name)
+ if formats[suffix] then
+ specification.forced = suffix
+ specification.name = file.removesuffix(name)
+ specification.forcedname = name
+ else
+ specification.name = name
+ end
end
end
otherwise you’re going to have to wait for the next release to reach CTAN.
Thanks for your reactivity :)
Since the last update, I am unable to load non-system fonts. Here is an example with fontspec, I have the following
paper.tex
and aebg.orf
file in the same directory, the font file worked with the older versions of luaotfloadIt fails with
I have been able to reproduce this behaviour (including the
bad argument
error) with pure luaotfload code, using\font\ebgar="[./ebg.otf]"
instead of\setmainfont
.