Skip to content
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

Fallback to known font dir paths if none were loaded via fontconfig #71

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

MoSal
Copy link
Contributor

@MoSal MoSal commented Sep 4, 2024

In cases where parsing fontconfig conf files may fail, or no font dirs
would be loaded for some other reason, it could be useful to fallback
to the non-fontconfig mechanism of trying to load from some fixed
known font dir paths.

A case where a distribution botched fontconfig conf files with an
upgrade was seen in pop-os/cosmic-term#323. And while Nix users in
particular may not have benefited from this change. I think
the scenario is plausible enough to occur via distribution or user
error.

The benefit of things probably working, at least partially, with and
without fontconfig's help is a big plus IMHO.

@RazrFalcon
Copy link
Owner

Honestly, I would rather remove fontconfig support altogether. People should stop using fontdb on Linux.
All other OSes work just fine and 99% of the issues come from Linux. Honestly, I just don't care at this point.

src/lib.rs Show resolved Hide resolved
@MoSal MoSal force-pushed the fontconfig_fallback branch from 2be2f3c to ea9956c Compare September 4, 2024 08:08
@RazrFalcon
Copy link
Owner

Fails to build.

 In cases where parsing fontconfig conf files may fail, or no font dirs
 would be loaded for some other reason, it could be useful to fallback
 to the non-fontconfig mechanism of trying to load from some fixed
 known font dir paths.

 A case where a distribution botched fontconfig conf files with an
 upgrade was seen in pop-os/cosmic-term#323. And while Nix users in
 particular may not have benefited from this change. I think
 the scenario is plausible enough to occur via distribution or user
 error.

 The benefit of things probably working, at least partially, with and
 without fontconfig's help is a big plus IMHO.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
@MoSal MoSal force-pushed the fontconfig_fallback branch from ea9956c to e8aed04 Compare September 4, 2024 08:28
@MoSal
Copy link
Contributor Author

MoSal commented Sep 4, 2024

Fails to build.

Apologies. My bad.

@RazrFalcon RazrFalcon merged commit 9a92147 into RazrFalcon:master Sep 4, 2024
4 checks passed
@RazrFalcon
Copy link
Owner

Thanks!

@MoSal
Copy link
Contributor Author

MoSal commented Sep 8, 2024

A version bump would be appreciated.

@RazrFalcon
Copy link
Owner

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants