From fad6003660d7c7dd18693e6c1e18869c8c8072c6 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sat, 30 Jun 2018 22:15:55 +0800 Subject: [PATCH] export: fix rendering issue of non-ASCII chars in Graphviz We use SVG format for Graphviz when exporting to PDF to avoid specifying proper font. --- src/utils/vutils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/vutils.cpp b/src/utils/vutils.cpp index 5e67631f..3f4ab846 100644 --- a/src/utils/vutils.cpp +++ b/src/utils/vutils.cpp @@ -764,7 +764,10 @@ QString VUtils::generateHtmlTemplate(const QString &p_template, if (g_config->getEnableGraphviz()) { extraFile += "\n"; - QString format = p_isPDF ? "png" : "svg"; + // If we use png, we need to specify proper font in the dot command to render + // non-ASCII chars properly. + // Hence we use svg format in both cases. + QString format = p_isPDF ? "svg" : "svg"; extraFile += QString("\n").arg(format); }