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

Improve ImageFont.freetype support for XDG directories on Linux #8135

Merged
merged 12 commits into from
Jun 22, 2024

Conversation

mamg22
Copy link
Contributor

@mamg22 mamg22 commented Jun 12, 2024

Changes proposed in this pull request:

For ImageFont.freetype:

  • Add support for searching fonts in the user data directory indicated by XDG_DATA_HOME or its default, before searching in system-wide directories.
  • Update the default value for XDG_DATA_DIRS to include the directory for system-local fonts in /usr/local/share/fonts.

These changes allow searching for both user-installed fonts, and fonts that aren't managed by the system package manager, such as when Microsoft fonts are installed by mscorefonts-installer into /usr/local.

Reference: version 0.8 of the freedesktop base directory spec

mamg22 and others added 2 commits June 13, 2024 00:03
[ci skip]

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
mamg22 and others added 3 commits June 13, 2024 09:43
[ci skip]

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Tests/test_imagefont.py Outdated Show resolved Hide resolved
mamg22 and others added 3 commits June 15, 2024 19:48
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
The proposed changes don't match match with previous release notes'
meaning of "API Changes".
@radarhere radarhere changed the title Improve XDG directories support for ImageFont.freetype on Linux Improve ImageFont.freetype support for XDG directories on Linux Jun 16, 2024
@radarhere radarhere merged commit 1c8d270 into python-pillow:main Jun 22, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants