(font_size=None, font_path=None)
| 91 | |
| 92 | |
| 93 | def _create_font_object(font_size=None, font_path=None): |
| 94 | |
| 95 | if font_size is None and font_path is None: |
| 96 | return DEFAULT_FONT_OBJECT |
| 97 | else: |
| 98 | return ImageFont.truetype( |
| 99 | font_path or DEFAULT_FONT_PATH, font_size or DEFAULT_FONT_SIZE |
| 100 | ) |
| 101 | |
| 102 | |
| 103 | def _create_new_canvas(canvas, arrangement, text_background_color): |