Skip to content

Conversation

@A-CGray
Copy link
Member

@A-CGray A-CGray commented Feb 28, 2025

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

  • 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
  • I have added necessary documentation

@A-CGray A-CGray requested a review from a team as a code owner February 28, 2025 21:59
@A-CGray A-CGray requested a review from eirikurj February 28, 2025 21:59
@A-CGray A-CGray requested a review from eytanadler February 28, 2025 22:04
@A-CGray A-CGray mentioned this pull request Feb 28, 2025
13 tasks
marcomangano
marcomangano previously approved these changes Mar 2, 2025
@A-CGray A-CGray requested a review from hajdik March 10, 2025 15:40
@A-CGray
Copy link
Member Author

A-CGray commented Mar 14, 2025

@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.

@marcomangano
Copy link
Collaborator

marcomangano commented Mar 14, 2025

@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.

@A-CGray
Copy link
Member Author

A-CGray commented Mar 14, 2025

@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.

I'm still getting this

image

@eirikurj eirikurj merged commit 4f3b83e into main Mar 19, 2025
17 checks passed
@A-CGray A-CGray deleted the provideFonts branch March 19, 2025 13:59
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

Successfully merging this pull request may close these issues.

6 participants