You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most common complaint we get about niceplots is that our styles try to use fonts that aren't installed on people's computers by default. This leads to lots of warnings about missing fonts if the user doesn't install the fonts themselves, which can be scary for people new to python.
This PR adds the Prompt and computer modern fonts to niceplots as package data, the fonts are then added to the matplotlib font manager when niceplots is imported. This simultaneously fixes the issue we're having with our GitHub actions and means users no longer have to install the fonts themselves!
Both fonts are distributed with the SIL open font license so I don't think it's an issue to host them here in the repo.
Expected time until merged
Type of change
Bugfix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (non-backwards-compatible fix or feature)
Code style update (formatting, renaming)
Refactoring (no functional changes, no API changes)
Documentation update
Maintenance update
Other (please describe)
Testing
Checklist
I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
I have run unit and regression tests which pass locally with my changes
I have added new tests that prove my fix is effective or that my feature works
@eirikurj we need your review here because niceplots only accepts reviews from maintainers, which is now only me and you. Maybe we should change the rules so that non-maintainer's reviews are acceptable too.
@eirikurj we need your review here because niceplots only accepts reviews from maintainers, which is now only me and you. Maybe we should change the rules so that non-maintainer's reviews are acceptable too.
I should have fixed it, lab members have write permission now. Hannah's review is "green" now, but the merge still has to be done by a maintainer.
@eirikurj we need your review here because niceplots only accepts reviews from maintainers, which is now only me and you. Maybe we should change the rules so that non-maintainer's reviews are acceptable too.
I should have fixed it, lab members have write permission now. Hannah's review is "green" now, but the merge still has to be done by a maintainer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The most common complaint we get about niceplots is that our styles try to use fonts that aren't installed on people's computers by default. This leads to lots of warnings about missing fonts if the user doesn't install the fonts themselves, which can be scary for people new to python.
This PR adds the Prompt and computer modern fonts to niceplots as package data, the fonts are then added to the matplotlib font manager when niceplots is imported. This simultaneously fixes the issue we're having with our GitHub actions and means users no longer have to install the fonts themselves!
Both fonts are distributed with the SIL open font license so I don't think it's an issue to host them here in the repo.
Expected time until merged
Type of change
Testing
Checklist
flake8andblackto make sure the Python code adheres to PEP-8 and is consistently formattedfprettifyor C/C++ code withclang-formatas applicable