If you do
gc.set_font(Font(family=SCRIPT, size=24))
in a backend that uses kiva.fonttools to find font files, then you get the following error:
/Users/cwebster/.edm/envs/edm/lib/python3.6/site-packages/kiva/fonttools/font_manager.py:294: UserWarning: findfont: Font family ['script'] not found. Falling back to sans-serif
% (query.get_family(), self.default_family)
This is because script is not listed in the options here:
|
font_family_aliases = { |
|
"serif", |
|
"sans-serif", |
|
"sans serif", |
|
"cursive", |
|
"fantasy", |
|
"monospace", |
|
"sans", |
|
"modern", |
|
} |
|
|
|
preferred_fonts = { |
|
"fantasy": [ |
|
"Comic Sans MS", |
|
"Chicago", |
|
"Charcoal", |
|
"ImpactWestern", |
|
"fantasy", |
|
], |
|
"cursive": [ |
|
"Apple Chancery", |
|
"Textile", |
|
"Zapf Chancery", |
|
"Sand", |
|
"cursive", |
|
], |
|
"monospace": [ |
|
"Bitstream Vera Sans Mono", |
|
"DejaVu Sans Mono", |
|
"Andale Mono", |
|
"Nimbus Mono L", |
|
"Courier New", |
|
"Courier", |
|
"Fixed", |
|
"Terminal", |
|
"monospace", |
|
], |
|
"serif": [ |
|
"Bitstream Vera Serif", |
|
"DejaVu Serif", |
|
"New Century Schoolbook", |
|
"Century Schoolbook L", |
|
"Utopia", |
|
"ITC Bookman", |
|
"Bookman", |
|
"Nimbus Roman No9 L", |
|
"Times New Roman", |
|
"Times", |
|
"Palatino", |
|
"Charter", |
|
"serif", |
|
], |
|
"sans-serif": [ |
|
"Bitstream Vera Sans", |
|
"DejaVu Sans", |
|
"Helvetica Neue", |
|
"Arial", |
|
"Verdana", |
|
"Helvetica", |
|
"Lucida Grande", |
|
"Geneva", |
|
"Lucid", |
|
"Avant Garde", |
|
"sans-serif", |
|
], |
|
} |
If you do
in a backend that uses
kiva.fonttoolsto find font files, then you get the following error:This is because
scriptis not listed in the options here:enable/kiva/fonttools/_constants.py
Lines 11 to 76 in 7079309