From 7399d99c98f6e021fdba99666660ad2a380a160f Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Wed, 27 May 2015 11:25:06 -0400 Subject: [PATCH] Allow SVGs in HTML output (#7441) This is only a specific part of #7441. Patch from Julien Rioux. --- src/insets/InsetGraphics.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 7e18ec67c2..25726690f8 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -119,8 +119,14 @@ string findTargetFormat(string const & format, OutputParams const & runparams) } // for HTML, we leave the known formats and otherwise convert to png if (runparams.flavor == OutputParams::HTML) { + Format const * const f = formats.getFormat(format); + // Convert vector graphics to svg + if (f && f->vectorFormat() && theConverters().isReachable(format, "svg")) + return "svg"; + // Leave the known formats alone if (format == "jpg" || format == "png" || format == "gif") return format; + // Convert everything else to png return "png"; } // If it's postscript, we always do eps. -- 2.39.2