Only scale when over 50% of following cell

See microsoft/vscode#208102
This commit is contained in:
Daniel Imms
2024-03-19 08:56:13 -07:00
parent 9ec9dca5f8
commit f8ae7edaa0
+2 -2
View File
@@ -48,9 +48,9 @@ export function allowRescaling(codepoint: number | undefined, width: number, gly
return (
// Is single cell width
width === 1 &&
// Glyph exceeds cell bounds, add 25% to avoid hurting readability by rescaling glyphs that
// Glyph exceeds cell bounds, add 50% to avoid hurting readability by rescaling glyphs that
// barely overlap
glyphSizeX > deviceCellWidth * 1.25 &&
glyphSizeX > Math.ceil(deviceCellWidth * 1.5) &&
// Never rescale emoji
codepoint !== undefined && !isEmoji(codepoint) &&
// Never rescale powerline or nerd fonts