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

Function get_font_style

utils/src/utils.py:44–55  ·  view source on GitHub ↗
(font: dict)

Source from the content-addressed store, hash-verified

42
43
44def get_font_style(font: dict):
45 font = SimpleNamespace(**font)
46 styles = []
47 if font.size:
48 styles.append(f"font-size: {font.size}pt")
49 if font.color:
50 styles.append(f"color: #{font.color}")
51 if font.bold:
52 styles.append("font-weight: bold")
53 if font.italic:
54 styles.append("font-style: italic")
55 return "; ".join(styles)
56
57
58def runs_merge(paragraph: _Paragraph):

Callers 2

to_htmlMethod · 0.90
get_inline_styleMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected