@@ -93,7 +93,7 @@ export class AccessibilityManager extends Disposable {
9393 this . _accessiblityBuffer . ariaLabel = Strings . accessibilityBuffer ;
9494 this . _accessiblityBuffer . classList . add ( 'xterm-accessibility-buffer' ) ;
9595
96- // TODO : this is needed when content editable is false
96+ // HACK : this is needed when content editable is false
9797 this . _refreshAccessibilityBuffer ( ) ;
9898 this . _accessiblityBuffer . addEventListener ( 'focus' , ( ) => this . _refreshAccessibilityBuffer ( ) ) ;
9999 this . _terminal . element . insertAdjacentElement ( 'afterbegin' , this . _accessiblityBuffer ) ;
@@ -114,7 +114,7 @@ export class AccessibilityManager extends Disposable {
114114 this . _handleColorChange ( themeService . colors ) ;
115115 this . register ( themeService . onChangeColors ( e => this . _handleColorChange ( e ) ) ) ;
116116 this . _handleFontOptionChange ( optionsService . options ) ;
117- this . register ( optionsService . onMultipleOptionChange ( [ 'fontSize' , 'fontFamily' ] , ( ) => this . _handleFontOptionChange ( optionsService . options ) ) ) ;
117+ this . register ( optionsService . onMultipleOptionChange ( [ 'fontSize' , 'fontFamily' , 'letterSpacing' , 'lineHeight' ] , ( ) => this . _handleFontOptionChange ( optionsService . options ) ) ) ;
118118
119119 this . _screenDprMonitor = new ScreenDprMonitor ( window ) ;
120120 this . register ( this . _screenDprMonitor ) ;
@@ -325,7 +325,7 @@ export class AccessibilityManager extends Disposable {
325325 return ;
326326 }
327327
328- const { bufferElements, cursorElement } = this . _terminal . viewport . getBufferElements ( 0 ) ;
328+ const { bufferElements } = this . _terminal . viewport . getBufferElements ( 0 ) ;
329329 for ( const element of bufferElements ) {
330330 if ( element . textContent ) {
331331 element . textContent = element . textContent . replace ( new RegExp ( ' ' , 'g' ) , '\xA0' ) ;
@@ -346,5 +346,7 @@ export class AccessibilityManager extends Disposable {
346346 private _handleFontOptionChange ( options : Required < ITerminalOptions > ) : void {
347347 this . _accessiblityBuffer . style . fontFamily = options . fontFamily ;
348348 this . _accessiblityBuffer . style . fontSize = `${ options . fontSize } px` ;
349+ this . _accessiblityBuffer . style . lineHeight = `${ options . lineHeight * this . _renderService . dimensions . css . cell . height } px` ;
350+ this . _accessiblityBuffer . style . letterSpacing = `${ options . letterSpacing } px` ;
349351 }
350352}
0 commit comments