(path: str, size: int)
| 51 | |
| 52 | |
| 53 | def load_font(path: str, size: int) -> ImageFont.FreeTypeFont: |
| 54 | try: |
| 55 | return ImageFont.truetype(path, size) |
| 56 | except OSError: |
| 57 | return ImageFont.truetype(r"C:\Windows\Fonts\arial.ttf", size) |
| 58 | |
| 59 | |
| 60 | F_MODEL = load_font(BOLD, 24) |
no outgoing calls
no test coverage detected