Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Add support for (some) colour fonts#30725
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
QuLogic wants to merge15 commits intomatplotlib:text-overhaulChoose a base branch fromQuLogic:colour-font
base:text-overhaul
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+61,557 −25,739
Open
Changes fromall commits
Commits
Show all changes
15 commits Select commitHold shift + click to select a range
9597991 ft2font: Add a wrapper around layouting for vector usage
QuLogicbd17cd4 Use libraqm for text in vector outputs
QuLogic22e5b3d Update test images for previous libraqm-vector changes
QuLogicb0a13fa Drop the FT2Font intermediate buffer
anntzer1028eaa Expose face index when loading fonts
QuLogic83b0144 Parse data from all fonts within a collection
QuLogica9abc29 Implement loading of any font in a collection
QuLogic41cab00 pdf/ps: Support any font in a collection
QuLogic78398f4 pgf: Support any font in a collection
QuLogicce91ead DOC: Add what's new note for TTC loading
QuLogic6521ddc Update test images for previous changes
QuLogicc3d6950 Merge branch '30059/ft-direct-render' into libraqm-full
QuLogic4c802b9 Merge branch 'ttc-loading' into libraqm-full
QuLogic219d974 Merge branch 'libraqm-vector' into libraqm-full
QuLogic617cb43 Handle colour fonts
QuLogicFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletionsci/mypy-stubtest-allowlist.txt
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
18 changes: 18 additions & 0 deletionsdoc/release/next_whats_new/ttc_fonts.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| Support for loading TrueType Collection fonts | ||
| --------------------------------------------- | ||
| TrueType Collection fonts (commonly found as files with a ``.ttc`` extension) are now | ||
| supported. Namely, Matplotlib will include these file extensions in its scan for system | ||
| fonts, and will add all sub-fonts to its list of available fonts (i.e., the list from | ||
| `~.font_manager.get_font_names`). | ||
| From most high-level API, this means you should be able to specify the name of any | ||
| sub-font in a collection just as you would any other font. Note that at this time, there | ||
| is no way to specify the entire collection with any sort of automated selection of the | ||
| internal sub-fonts. | ||
| In the low-level API, to ensure backwards-compatibility while facilitating this new | ||
| support, a `.FontPath` instance (comprised of a font path and a sub-font index, with | ||
| behaviour similar to a `str`) may be passed to the font management API in place of a | ||
| simple `os.PathLike` path. Any font management API that previously returned a string path | ||
| now returns a `.FontPath` instance instead. |
44 changes: 12 additions & 32 deletionslib/matplotlib/_text_helpers.py
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
28 changes: 20 additions & 8 deletionslib/matplotlib/backends/_backend_pdf_ps.py
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
125 changes: 81 additions & 44 deletionslib/matplotlib/backends/backend_agg.py
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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.