Commit eaf1641
committed
Make FontManager.defaultFont a property, to avoid hardcoding the prefix.
When serialized to json, FontManager stores paths that are relative to
mpl-data (i.e. fonts shipped by Matplotlib) to relative paths; this
ensures that the resulting fontList.json stays valid across multiple
venvs (as the venv prefix does not end up in the json file).
The same issue happens with defaultFont: currently, it includes
the venv prefix. Instead of adding more layers to the json
serialization/deserialization, just don't store it into fontList.json
but compute defaultFont dynamically instead.1 parent e08d7ba commit eaf1641
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
950 | | - | |
| 950 | + | |
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
| |||
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
978 | | - | |
979 | 978 | | |
980 | 979 | | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | 980 | | |
986 | 981 | | |
987 | 982 | | |
988 | 983 | | |
989 | 984 | | |
990 | | - | |
991 | 985 | | |
992 | 986 | | |
993 | 987 | | |
| |||
999 | 993 | | |
1000 | 994 | | |
1001 | 995 | | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | 1005 | | |
| |||
0 commit comments