(cls, font_path, point_size)
| 298 | |
| 299 | @classmethod |
| 300 | def font(cls, font_path, point_size): |
| 301 | if (font_path, point_size) not in cls.fonts: |
| 302 | cls.fonts[(font_path, point_size)] = ImageFont.truetype(font_path, point_size) |
| 303 | return cls.fonts[(font_path, point_size)] |
| 304 | |
| 305 | |
| 306 | def _rendered_size(text, point_size, font_file): |