aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-04-03 10:21:20 +0100
committerMichael Williamson <mike@zwobble.org>2017-04-03 10:21:20 +0100
commitea7996086d5f67913f4a96ce0173593e936d03b8 (patch)
tree1bd2ce1c899022d5adb390adf38a4a938b8a8bfd /mammoth/docx
parent3bb202f320d0fc548bbe569f3d6abdfc0698773e (diff)
Read explicit font for runs
Diffstat (limited to 'mammoth/docx')
-rw-r--r--mammoth/docx/body_xml.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py
index 64f83d6..76510ef 100644
--- a/mammoth/docx/body_xml.py
+++ b/mammoth/docx/body_xml.py
@@ -73,6 +73,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f
vertical_alignment = properties \
.find_child_or_null("w:vertAlign") \
.attributes.get("w:val")
+ font = properties.find_child_or_null("w:rFonts").attributes.get("w:ascii")
is_bold = read_boolean_element(properties.find_child("w:b"))
is_italic = read_boolean_element(properties.find_child("w:i"))
@@ -98,6 +99,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f
is_underline=is_underline,
is_strikethrough=is_strikethrough,
vertical_alignment=vertical_alignment,
+ font=font,
))
def _read_run_style(properties):