Skip to content

Commit 12a4c74

Browse files
committed
Workaround low underscore in fonts by adjusting line height
Part of microsoft#211933
1 parent 65c9ed2 commit 12a4c74

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/vs/workbench/contrib/terminal/common/terminal.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { Event } from 'vs/base/common/event';
77
import { IDisposable } from 'vs/base/common/lifecycle';
88
import { MarshalledId } from 'vs/base/common/marshallingIds';
9-
import { IProcessEnvironment, OperatingSystem } from 'vs/base/common/platform';
9+
import { IProcessEnvironment, isLinux, OperatingSystem } from 'vs/base/common/platform';
1010
import Severity from 'vs/base/common/severity';
1111
import { ThemeIcon } from 'vs/base/common/themables';
1212
import { URI } from 'vs/base/common/uri';
@@ -33,7 +33,12 @@ export const TERMINAL_CONFIG_SECTION = 'terminal.integrated';
3333

3434
export const DEFAULT_LETTER_SPACING = 0;
3535
export const MINIMUM_LETTER_SPACING = -5;
36-
export const DEFAULT_LINE_HEIGHT = 1;
36+
// HACK: On Linux it's common for fonts to include an underline that is rendered lower than the
37+
// bottom of the cell which causes it to be cut off due to `overflow:hidden` in the DOM renderer.
38+
// See:
39+
// - https://github.com/microsoft/vscode/issues/211933
40+
// - https://github.com/xtermjs/xterm.js/issues/4067
41+
export const DEFAULT_LINE_HEIGHT = isLinux ? 1.1 : 1;
3742

3843
export const MINIMUM_FONT_WEIGHT = 1;
3944
export const MAXIMUM_FONT_WEIGHT = 1000;

0 commit comments

Comments
 (0)