MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / load_font

Function load_font

experiments/human_eval/draw_llm_token_cost_bar.py:55–59  ·  view source on GitHub ↗
(path: str, size: int)

Source from the content-addressed store, hash-verified

53
54
55def load_font(path: str, size: int) -> ImageFont.FreeTypeFont:
56 try:
57 return ImageFont.truetype(path, size)
58 except OSError:
59 return ImageFont.truetype(r"C:\Windows\Fonts\arial.ttf", size)
60
61
62F_MODEL = load_font(BOLD, 24)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected