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 02573f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontends/server/frontend/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}

</style>
<script type="module" crossorigin src="/assets/index-BqmNs24i.js"></script>
<script type="module" crossorigin src="/assets/index-DkE9_tVc.js"></script>
</head>
<body>
<div id='lem-editor'></div>
Expand Down
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 02573f6

Please sign in to comment.