diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-04-03 10:21:20 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-04-03 10:21:20 +0100 |
| commit | ea7996086d5f67913f4a96ce0173593e936d03b8 (patch) | |
| tree | 1bd2ce1c899022d5adb390adf38a4a938b8a8bfd /mammoth/documents.py | |
| parent | 3bb202f320d0fc548bbe569f3d6abdfc0698773e (diff) | |
Read explicit font for runs
Diffstat (limited to 'mammoth/documents.py')
| -rw-r--r-- | mammoth/documents.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py index 327380d..a8c3fb2 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -29,6 +29,7 @@ class Run(HasChildren): is_underline = cobble.field() is_strikethrough = cobble.field() vertical_alignment = cobble.field() + font = cobble.field() @cobble.data class Text(Element): @@ -84,12 +85,23 @@ def document(children, notes=None, comments=None): def paragraph(children, style_id=None, style_name=None, numbering=None): return Paragraph(children, style_id, style_name, numbering) -def run(children, style_id=None, style_name=None, is_bold=None, is_italic=None, is_underline=None, is_strikethrough=None, vertical_alignment=None): +def run( + children, + style_id=None, + style_name=None, + is_bold=None, + is_italic=None, + is_underline=None, + is_strikethrough=None, + vertical_alignment=None, + font=None, +): if vertical_alignment is None: vertical_alignment = VerticalAlignment.baseline return Run( children, style_id, style_name, bool(is_bold), bool(is_italic), bool(is_underline), bool(is_strikethrough), vertical_alignment, + font=font, ) class VerticalAlignment(object): |
