From 858a9af30f6fba9e04765c7101438126b0e24fa7 Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Wed, 6 Oct 2021 14:17:46 +0200 Subject: 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 Reviewed-by: Nicolas Dechesne Signed-off-by: Quentin Schulz Signed-off-by: Richard Purdie --- documentation/conf.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'documentation/conf.py') 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 = { 'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', 'preamble': '\setcounter{tocdepth}{2}', } + +# Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG +from sphinx.builders.epub3 import Epub3Builder +Epub3Builder.supported_image_types = ['image/png', 'image/gif', 'image/jpeg'] -- cgit v1.2.3-54-g00ecf