summaryrefslogtreecommitdiffstats
path: root/documentation/conf.py
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2021-10-06 14:17:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-08 22:01:24 +0100
commit858a9af30f6fba9e04765c7101438126b0e24fa7 (patch)
tree9d784d1e89fb01c62fb6456ca82c9200a37ef889 /documentation/conf.py
parentbca3caeaeafc3c9c412ef33b1a9a3ef99b04baf1 (diff)
downloadpoky-858a9af30f6fba9e04765c7101438126b0e24fa7.tar.gz
conf.py: use PNG first in EPUB output
SVG directly included in EPUB output has multiple issues, in particular font size and alignment ones (tested on two EPUB readers). Instead, using PNG, generated from SVG when available as the primary format for images. GIF and JPEG are fine too. (From yocto-docs rev: ff3876ca4910cf61bc25bfeb07e65ad6f6a93b48) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Quentin Schulz <foss@0leil.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/conf.py')
-rw-r--r--documentation/conf.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/documentation/conf.py b/documentation/conf.py
index 8e15fdc869..25ff290ae2 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -139,3 +139,7 @@ latex_elements = {
139 'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', 139 'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
140 'preamble': '\setcounter{tocdepth}{2}', 140 'preamble': '\setcounter{tocdepth}{2}',
141} 141}
142
143# Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG
144from sphinx.builders.epub3 import Epub3Builder
145Epub3Builder.supported_image_types = ['image/png', 'image/gif', 'image/jpeg']