File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
addons/xterm-addon-webgl/src/atlas Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -440,7 +440,7 @@ export class WebglCharAtlas implements IDisposable {
440440 this . _tmpCtx . save ( ) ;
441441 const lineWidth = Math . max ( 1 , Math . floor ( this . _config . fontSize * window . devicePixelRatio / 15 ) ) ;
442442 // When the line width is odd, draw at a 0.5 position
443- const yOffset = ( lineWidth % 2 === 1 ? 0.5 : 0 ) + window . devicePixelRatio ;
443+ const yOffset = lineWidth % 2 === 1 ? 0.5 : 0 ;
444444 this . _tmpCtx . lineWidth = lineWidth ;
445445
446446 // Underline color
@@ -527,8 +527,9 @@ export class WebglCharAtlas implements IDisposable {
527527 this . _tmpCtx . restore ( ) ;
528528
529529 // Draw stroke in the background color for non custom characters in order to give an outline
530- // between the text and the underline
531- if ( ! customGlyph ) {
530+ // between the text and the underline. Only do this when font size is >= 12 as the underline
531+ // looks odd when the font size is too small
532+ if ( ! customGlyph && this . _config . fontSize >= 12 ) {
532533 // This only works when transparency is disabled because it's not clear how to clear stroked
533534 // text
534535 if ( ! this . _config . allowTransparency && chars !== ' ' ) {
You can’t perform that action at this time.
0 commit comments