Skip to content

Commit

Permalink
use textMetrics.emHeightDescent
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Oct 21, 2024
1 parent 00ae72c commit 8f0a177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/server/frontend/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
];
}

Expand Down

0 comments on commit 8f0a177

Please sign in to comment.