Merge pull request #5012 from Tyriar/tyriar/208102

Only scale when over 50% of following cell
This commit is contained in:
Daniel Imms
2024-03-19 09:03:36 -07:00
committed by GitHub
+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