-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db : Reload initiated over and over because an existing font is not found #283
Comments
Do you really have a font called |
Yes, it is the "variable" version of the Cinzel font. See https://github.com/NDISCOVER/Cinzel/tree/master/fonts/variable. Unfortunately, the variable Cinzel font is not differentiated in name from the non variable one, only in the filename, so, having both installed (because not all software is compatible with variable fonts), I need to refer to the variable one by filename. The weird aspect is that luaotfload seems to find the font in the end, but needs to "reload" every time, apparently making the compilation slower. Actually, it is unclear to me if this is an innocuous diagnostic (i.e., the compilation of the LaTeX document would be slower anyway because the variable font needs more time to load) or corresponds to some actions that while ultimately successful are carried out in an incorrect or not so efficient way. |
You need \newfontface { \institutionfont } {Cinzel[wght].ttf}
[ Scale = 1.076, FakeStretch = 1.038,
RawFeature = { +axis = { wght = 428 } } ] Note the lack of spaces in the font filename. luaotfload treats the name verbatim. If you include spaces, it seems to look for I would use something like \newfontface {\institutionfont} {Cinzel[wght].ttf} [Weight=428,Scale=1.076,FakeStretch=1.038] It's not actually recreating the database each time. It's probably checking it. Playing with this I ended up generating fatal errors which never went away and cleared the cache out. Compiling after that takes much longer. I think the bug here is in the reporting of the error in the filename requested. It should report searching for the untrimmed name (if that is what it does) and finally using the trimmed one, with a message which makes it clear how to correct the source. |
Interesting observation. Is there any font name ever that has spaces on the outside? I doubt it and if not I think it might be best if fontspec would trim the outer spaces when processing the arguments to |
My code is actually expl3, so the space should be removed before the filename gets to luaotfload, I believe. |
@callegar in that case (as always) it would have helped to have a complete minimal example that shows your problem, not just a description with a code fragment. That way people can easily reproduce or can state with confidence that they can't reproduce. |
The message is confusing since it does actually use the trimmed name, but it searches in the wrong place.
The reason that it still ends up working is that we end up falling back to just trying to load the font as a filename is the font name lookup fails, which finally succeeds. From The actual issue needs to be resolved on |
I can't reproduce this in an \ExplSyntaxOn` block. |
For what it's worth, I just stumbled across this same error with Atkinson Hyperlegible having a space within the font name, which led to a bunch of formatting code getting output into the pdf document and a bunch of errors about rebuilding the luaotfload database. (I'm using the awesome-cv template). I needed to change the name to "AtkinsonHyperlegible" in the .cls file, and then the error went away along with the garbage output. |
Thanks for your solution! Anyway, I think the solution you've proposed is a good temporary solution. |
@ExecutorElassus @veevang If you are getting errors as a result of spaces within filenames, I think that should be reported separately because (1) it is certainly not due to a problem identifying the extension (which was the problem here) and (2) it would be a regression. However, I don't know if it would be a problem here or in But you need to report the problem properly i.e. with an example which enables people to reproduce the error. |
I’m seeing the same…
… on every single run. Another person reported on SE that this is because they specified the font by filename (with the My environment is Debian bullseye’s packaged TL. |
which luaotfload version do you use? (you can find the version of the fontloader at the begin of the log-file). |
|
well that is way to old. We have 2024 and a current fontloader has the date |
Thanks, not helpful. |
Adding one of these…
… etc. (depending on where the fonts in the filesystem are) to all font specifications fixes this as well. |
The point is that this is not a bug which can be fixed by the developers of Options:
(3) may be a reasonable option, if it is an option at all, but only if you can find a reliable and trustworthy source of packages. Otherwise, I would recommend (4) or (6) unless you are frustrated by your current Linux distro for independent reasons. 1This is an entirely standard upstream response, by the way: if you report a problem with the Linux kernel, your report will be closed if it can't be reproduced on a kernel which is both current and untainted - a far more stringent criterion than a current TeX install, in fact, since you may well be using a tainted kernel by default and may even be unable to run an untainted one. |
I have a LaTeX (in fact lualatex) file with the following snippet
Compiling the file I get, over and over,
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "Cinzel[wght].ttf" not found.
However, the font is there and
luaotfont-tool -u -vvvv
shows it being found...The text was updated successfully, but these errors were encountered: