Skip to content

Commit

Permalink
Ensure font size at least 1px
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Oct 8, 2024
1 parent be18d55 commit 9f8a898
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/base/latex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 9f8a898

Please sign in to comment.