From 465094800482cfb2fc3ad933582b624135ecc1e3 Mon Sep 17 00:00:00 2001 From: rogrosso Date: Thu, 20 Jul 2023 16:12:37 +0200 Subject: [PATCH] Fix bugs Include the font-family to compute word size in the word cloud algorith. --- infovis/text/wordcloud.js | 1 + 1 file changed, 1 insertion(+) diff --git a/infovis/text/wordcloud.js b/infovis/text/wordcloud.js index 672cc30..f7bcc63 100644 --- a/infovis/text/wordcloud.js +++ b/infovis/text/wordcloud.js @@ -99,6 +99,7 @@ function draw(text) { .attr('x', 100) .attr('y',110) .attr('font-size', d => d.height ) + .attr('font-family', d => d.fontFalimily) .text(d => d.word) .each( function(d) { d.width = this.getComputedTextLength() }) .remove()