From 1b020158c5ea6b46aa166f1cb9d3146c340b92bc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 12 Mar 2015 14:10:46 +0530 Subject: [PATCH] DOCX Input: Fix incorrect bold font weight being used for heading styles even if the style definition does not specify bold. Fixes #1430831 [Private bug](https://bugs.launchpad.net/calibre/+bug/1430831) --- src/calibre/ebooks/docx/styles.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/docx/styles.py b/src/calibre/ebooks/docx/styles.py index 49922f4332..edaaf73162 100644 --- a/src/calibre/ebooks/docx/styles.py +++ b/src/calibre/ebooks/docx/styles.py @@ -448,6 +448,8 @@ class Styles(object): /* In word all paragraphs have zero margins unless explicitly specified in a style */ p, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0 } + /* In word headings only have bold font if explicitly specified */ + h1, h2, h3, h4, h5, h6 { font-weight: normal } /* Setting padding-left to zero breaks rendering of lists, so we only set the other values to zero and leave padding-left for the user-agent */ ul, ol { margin: 0; padding-top: 0; padding-bottom: 0; padding-right: 0 }