()
| 19 | |
| 20 | |
| 21 | def get_font_properties(): |
| 22 | # The original font is Calibri, if that is not installed, we fall back |
| 23 | # to Carlito, which is metrically equivalent. |
| 24 | if 'calibri' in matplotlib.font_manager.findfont('Calibri:bold').lower(): |
| 25 | return matplotlib.font_manager.FontProperties(family='Calibri', |
| 26 | weight='bold') |
| 27 | # Our website documentation uses Carlito because Calibri is proprietary. |
| 28 | if 'carlito' in matplotlib.font_manager.findfont('Carlito:bold').lower(): |
| 29 | print('Original font not found. Falling back to Carlito. ' |
| 30 | 'The logo text will not be in the correct font.') |
| 31 | return matplotlib.font_manager.FontProperties(family='Carlito', |
| 32 | weight='bold') |
| 33 | print('Original font not found. ' |
| 34 | 'The logo text will not be in the correct font.') |
| 35 | return None |
| 36 | |
| 37 | |
| 38 | def create_icon_axes(fig, ax_position, lw_bars, lw_grid, lw_border, rgrid): |
no test coverage detected
searching dependent graphs…