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

RFC for strategy on font management #5043

Open
imagico opened this issue Nov 11, 2024 · 2 comments
Open

RFC for strategy on font management #5043

imagico opened this issue Nov 11, 2024 · 2 comments

Comments

@imagico
Copy link
Collaborator

imagico commented Nov 11, 2024

Since #4606 we have been including a script to download the fonts we use and this way implicitly tell style users they can rely on that taking care of the fonts. Unfortunately, upstream sources of fonts are volatile and require maintainance of the download locations as well as font file naming (#5013, #4956). Our current font download script design is not very good for managing that.

This is a proposal how a more sustainable approach could look like. This is not meant to rule out smaller changes to the existing setup to fix acute issues but to provide a discussion basis for a more long term strategy how to develop this further.

Proposal

The main ideas are:

  • separating the font data from the script functionality
  • doing the scripting in python (to match our other scripts)
  • storing the data on fonts and their download locations in a YAML file (equally matching our approach in other cases)
  • having fallback locations for downloading fonts in case the primary location becomes unavailable. Fallbacks could contain older versions of the fonts if necessary. This would substantially increase reliability of the download process.
  • having the script download the fonts as well as generating fonts.mss (where the order of entries is crucial - see Use local copy of fonts #4606) - this way we would have a single location where to make changes to the fonts rather than two (fonts.mss and get-fonts.sh) in different languages.
  • having the script by default update existing font files, but overwriting them only after a successful download.

This is just a rough sketch of how this could look like, the details would need to be worked out of course. Discussion of those as well as of the proposal is welcome.

@dch0ph
Copy link
Contributor

dch0ph commented Nov 13, 2024

Looks a very sensible overall strategy to me.

Am I right in thinking that #4893 would address the acute problem in the meantime?

@imagico
Copy link
Collaborator Author

imagico commented Nov 13, 2024

Am I right in thinking that #4893 would address the acute problem in the meantime?

That probably depends on what you identify as the acute problem.

But yes, sourcing the emoji font from archive.org is probably a reasonably stable solution. #4893 mainly needs a thorough review.

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

No branches or pull requests

2 participants