From 9f8a89804e5797e0c6490c1bc3be239cfaf24c80 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Tue, 8 Oct 2024 10:19:59 +0200 Subject: [PATCH] Ensure font size at least 1px --- modules/base/latex.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/base/latex.mjs b/modules/base/latex.mjs index 29ece1276..f22a23615 100644 --- a/modules/base/latex.mjs +++ b/modules/base/latex.mjs @@ -578,8 +578,7 @@ function parseLatex(node, arg, label, curr) { elem.attr('fill', curr.color || arg.color || null); // set font size directly to element to avoid complex control - if (curr.fsize) - elem.attr('font-size', Math.round(curr.fsize)); + elem.attr('font-size', Math.max(1, Math.round(curr.fsize))); if (curr.font?.isSymbol) { elem.text(replaceSymbols(s, curr.font.isSymbol));