]> acesimba.cloud Git - codebuddy-web.git/commitdiff
fix(terminal): xterm lineHeight 1.0 导致字形顶部被裁切
authorCodebuddy <codebuddy@localhost>
Thu, 13 Aug 2026 05:30:20 +0000 (13:30 +0800)
committerCodebuddy <codebuddy@localhost>
Thu, 13 Aug 2026 05:30:20 +0000 (13:30 +0800)
- new Terminal 选项补充 lineHeight: 1.3(原未设置,默认 1.0)
- 单元格高度由 20px 增至约 26px,中文等字形顶部不再被裁
- 仅前端改动,刷新浏览器即生效,保留 body 滚动锁定

frontend/index.html

index c2537f83b7413f0be09ca06f110fb2839c5d1d12..0b16c3cb144aa6fc2f4ac082cbc737fe037c01b5 100644 (file)
@@ -797,7 +797,7 @@ body { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: 100%; over
   function initTerminal() {
     if (term) return;
     term = new Terminal({
-      cursorBlink: true, fontSize: 20,
+      cursorBlink: true, fontSize: 20, lineHeight: 1.3,
       fontFamily: "'Cascadia Code', 'Fira Code', 'JetBrains Mono', Menlo, Monaco, 'Courier New', monospace",
       theme: {
         background: '#1a1a2e', foreground: '#e0e0e0', cursor: '#4ecca3', cursorAccent: '#1a1a2e',