Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Try to install the Noto Sans CJK font #20851

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

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

jkseppan
Copy link
Member

@jkseppan jkseppan commented Aug 17, 2021

On Linux and Mac. Add a font_manager test that loads the font and uses it. This could be useful in testing the multi-font support (#20740 etc).

I couldn't get the font installed on Windows. There is a Chocolatey installer that installs all of the Noto fonts, which takes a really long time to run.

PR Summary

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@jkseppan jkseppan force-pushed the wqy-zenhei-install branch 7 times, most recently from 66965e0 to fd2d801 Compare August 18, 2021 15:56
@QuLogic
Copy link
Member

QuLogic commented Aug 18, 2021

Zen Hei seems packaged for Ubuntu, but in Universe, Not sure if we need to do something special to allow installing it.

@jkseppan jkseppan force-pushed the wqy-zenhei-install branch from fd2d801 to cb0af05 Compare August 19, 2021 18:15
@jkseppan jkseppan changed the title Try to install WenQuanYi Zen Hei font Try to install Google Noto Sans fonts Aug 19, 2021
@jkseppan
Copy link
Member Author

The SourceForge download of Zen Hei sometimes fails, so this was probably not a good idea. Google's Noto fonts seem to be better packaged in various systems, so perhaps something like Noto Sans CJK SC could be more useful.

For context: some of the new font changes by @aitikgupta crash on my computer (an M1 Mac) but not on his (I believe Linux on x86), so I would like to add a more cross-platform test with a CJK font and see if we can replicate the crash in CI.

@jkseppan jkseppan force-pushed the wqy-zenhei-install branch 2 times, most recently from c04d923 to a71185c Compare August 20, 2021 08:31
On Linux and Mac. Add a font_manager test that loads the font and
uses it. This could be useful in testing the multi-font support
(matplotlib#20740 etc).

I couldn't get the font installed on Windows. There is a Chocolatey
installer that installs all of the Noto fonts, which takes a really
long time to run.
@jkseppan jkseppan force-pushed the wqy-zenhei-install branch from 10558de to bf38aa9 Compare August 20, 2021 09:19
@jkseppan
Copy link
Member Author

I'm giving up on Windows - the Chocolatey package installs all of the Noto fonts and takes half an hour to do it, and my PowerShell skills are not enough to install just one.

@jkseppan jkseppan changed the title Try to install Google Noto Sans fonts Try to install the Noto Sans CJK font Aug 20, 2021
@jkseppan jkseppan marked this pull request as ready for review August 20, 2021 10:17
@jkseppan jkseppan requested a review from aitikgupta August 21, 2021 11:49
Copy link
Contributor

@aitikgupta aitikgupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be a good validation for testing the font fallback.

If we do keep this, do we also need to keep installing ZenHei for CI (on Linux) as well?
Noto CJK could potentially replace it right? (I'll do a local installation to test out the actual difference between number of glyphs)

@anntzer anntzer merged commit 47077d1 into matplotlib:master Aug 30, 2021
@QuLogic QuLogic added this to the v3.6.0 milestone Aug 31, 2021
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.

4 participants