(font: dict)
| 42 | |
| 43 | |
| 44 | def 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 | |
| 58 | def runs_merge(paragraph: _Paragraph): |
no outgoing calls
no test coverage detected