Commit 567b8ac
committed
Add FontManager.addfont to register fonts at specific paths.
The naming (without underscore) is similar to findfont.
I chose to provide an API adding a single path rather than also wrap
findSystemFonts given that the later is basically just a recursive glob
(``Path(...).glob("**/*.ttf")``).
addfont has no deduplication logic but I think that's fine (really
ttflist should be ttfset, but that's a bigger API change).
findSystemFonts already assumes that the font extension gives the font
type so assuming the same in addfont seems fine.1 parent b34c605 commit 567b8ac
File tree
2 files changed
+53
-5
lines changed- doc/api/next_api_changes
- lib/matplotlib
2 files changed
+53
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
| 506 | + | |
506 | 507 | | |
507 | 508 | | |
508 | 509 | | |
| |||
967 | 968 | | |
968 | 969 | | |
969 | 970 | | |
970 | | - | |
971 | | - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
972 | 977 | | |
973 | | - | |
974 | | - | |
975 | | - | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
976 | 1019 | | |
977 | 1020 | | |
978 | 1021 | | |
| |||
0 commit comments