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

Function text_size

experiments/human_eval/draw_model_eval_numberline.py:79–81  ·  view source on GitHub ↗
(draw: ImageDraw.ImageDraw, text: str, fnt: ImageFont.FreeTypeFont)

Source from the content-addressed store, hash-verified

77
78
79def text_size(draw: ImageDraw.ImageDraw, text: str, fnt: ImageFont.FreeTypeFont) -> tuple[int, int]:
80 box = draw.textbbox((0, 0), text, font=fnt)
81 return box[2] - box[0], box[3] - box[1]
82
83
84def draw_text_center(

Callers 1

draw_text_centerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected