-
-
Notifications
You must be signed in to change notification settings - Fork 8.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
QuLogic
wants to merge
10
commits into
matplotlib:text-overhaul
Choose a base branch
from
QuLogic: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.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b0a13fa
Drop the FT2Font intermediate buffer
anntzer daae68a
Expose face index when loading fonts
QuLogic b839f87
Parse data from all fonts within a collection
QuLogic 6d2ae67
Implement loading of any font in a collection
QuLogic ea80bbb
pdf/ps: Support any font in a collection
QuLogic e991790
pgf: Support any font in a collection
QuLogic 9c20b0c
DOC: Add what's new note for TTC loading
QuLogic b2aa1f2
Update test images for previous changes
QuLogic 4df0c5b
Merge branch '30059/ft-direct-render' into libraqm-full
QuLogic c1299cf
Handle colour fonts
QuLogic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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. |
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
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
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
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
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
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.
Oops, something went wrong.
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.
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 don't know if we really support big-endian archs, but at least backend_tkcairo uses
(2, 1, 0, 3) if sys.byteorder == "little" else (1, 2, 3, 0).