-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add support for CBDT and COLR fonts #4955
Conversation
Big-endian s390 is failing, but I'm not sure I can fix it without seeing the output image. |
This increases the size of the sdist by about 20% from 58M to 69M. Are all these fonts necessary, or can we still be confident in testing with existing fonts (I guess they're not CBDT or COLR), or just one of the smaller additions? |
The biggest chunk is the 9MB CBDT font
|
Here you go - generated with this commit forked from your branch. |
Ah, I had the right idea, but forgot Thanks for the help. |
I've stripped down the DejaVuSans-24-*.ttf fonts to ASCII and used an older version of NotoColorEmoji.ttf (5.1MB). Is this sufficient? |
Looks like we also need the setuptools workaround for 3.8 (like #4958) for Windows/GHA:
https://github.com/python-pillow/Pillow/pull/4955/checks?check_run_id=1239105264 |
#4958 already includes 3.8, this branch just needs to be rebased or merge master (I think re-running the checks should suffice) |
Tests/test_imagefont.py
Outdated
if parse_version(features.version_module("freetype2")) < parse_version( | ||
"2.10.0" | ||
): | ||
pytest.skip("Freetype 2.10.0 or newer required") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's quite a few Freetype version check and skips, let's put them into a helper, for example:
def skip_unless_freetype(required_version, message):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with the following to let the check be reusable for other features:
def skip_unless_feature_version(feature, version_required, reason=None):
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Removing |
Thank you! Please can you add release notes for this, plus for any of your other PRs since the last release? |
Yep, figured that out a few weeks after this PR (#5155).
Not automatically, see #4808. If you are fine with splitting up the text yourself, you can use the approach outlined here: #3346 (comment). |
Proper fix for #891, partial support for #3346
Changes proposed in this pull request:
FT_Convert_Bitmap
instead of a custom solutionApple SBIXand W3C SVG fonts are not yet supported by FreeType.Example:
NotoColorEmoji.ttf (CBDT):
seguiemj.ttf (COLR):