From 8f0a177306b0ba188c6d0b9264ef7b964f093243 Mon Sep 17 00:00:00 2001 From: cxxxr Date: Mon, 21 Oct 2024 21:35:07 +0900 Subject: [PATCH] use textMetrics.emHeightDescent --- frontends/server/frontend/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/server/frontend/editor.js b/frontends/server/frontend/editor.js index 0020b065d..68cff2c91 100644 --- a/frontends/server/frontend/editor.js +++ b/frontends/server/frontend/editor.js @@ -31,7 +31,7 @@ function computeFontSize(font) { return [ Math.floor(textMetrics.width), - Math.round(textMetrics.fontBoundingBoxAscent + textOffsetY + 0 /*(textMetrics.emHeightDescent || 0)*/) + Math.round(textMetrics.fontBoundingBoxAscent + textOffsetY + (textMetrics.emHeightDescent || 0)), ]; }