MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / _parse_font_size

Function _parse_font_size

utils/pptx_utils.py:1235–1244  ·  view source on GitHub ↗

Internal helper to convert a numeric font size (e.g., 12) to a python-pptx Pt object. If it's already a Pt, return as-is.

(font_size)

Source from the content-addressed store, hash-verified

1233 return px * 0.75
1234
1235def _parse_font_size(font_size):
1236 """
1237 Internal helper to convert a numeric font size (e.g., 12)
1238 to a python-pptx Pt object. If it's already a Pt, return as-is.
1239 """
1240 if font_size is None:
1241 return None
1242 if isinstance(font_size, (int, float)):
1243 return Pt(font_size)
1244 return font_size # Assume user provided a Pt object already
1245
1246def _parse_alignment(alignment):
1247 """

Callers 3

add_textboxFunction · 0.70
edit_textboxFunction · 0.70
set_text_styleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected