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
fira-code: don't use variable font #123220
Conversation
It doesn't work well with LaTeX because the filename is wrong.
It looks to me the real issue lies in luaotfload. luaotfload isn't properly matching the font family name, so it is falling back to finding the font by filename instead. ❯ luaotfload-tool --find 'Fira Code' --fuzzy
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "Fira Code" not found.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : Cannot find "Fira Code" in index.
luaotfload | resolve : Looking for close matches, this may take a while ...
luaotfload | query : Distance from "firacode": 5
Fira Code Light
file-icons luaotfload is mistakenly thinking that "Fira Code Light" is the family name, so the following works: \usepackage{fontspec}
\setmainfont{Fira Code Light} |
I'd prefer keeping the variable font unless it causes more problems because it's more customizable while being smaller in size. The non-variable ttfs are 1.8 MB combined while the variable one is only 260 KB. |
That's a stark difference indeed.
Do you have an idea how to fix that? As a workaround, can we maybe change the filename from |
For a complete fix, I believe this would have to be reported upstream at latex3/luaotfload. We could rename the file for Fira Code, but fixing it upstream would solve the problem for other fonts that may suffer from the same issue. I'm not familiar with Lua but from a cursory look, it seems that luaotfload rolls its own parser for font files so any fixes would probably have to be made there. |
I marked this as stale due to inactivity. → More info |
I think installing |
What about the solution proposed by #196087, keeping them both? The fira-code variable font also makes |
Dear @dotlambda, The original issue this PR has been created for is fixed. Is this PR still relevant? If not, can you please close it? Thanks! |
I can confirm that the issue that I had is fixed on nixpkgs master. |
Could you please fix the merge conflict ? |
Note: I'm confirming that for my usecase, this PR was not needed. |
Oh, ok. @dotlambda Are you ok to close this PR ? |
Sorry for necrobumping the pull request, but I can reproduce the issue on master again. \documentclass{article}
\usepackage{fontspec}\setmonofont{Fira Code}
\begin{document}
Let's test the “programming ligatres” \verb|hello <> === ok nein|.
\end{document} nix shell 'nixpkgs/master#texlive.combined.scheme-full'
latexmk -pdf -xelatex test.tex Fails with:
|
Motivation for this change
fixes #118891
Also, Arch Linux's ttf package installs the same files.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)