@@ -425,7 +425,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
425
425
if ( e . compactView || e . focusIndicator || e . insertToolbarPosition || e . cellToolbarLocation || e . dragAndDropEnabled || e . fontSize || e . markupFontSize || e . insertToolbarAlignment ) {
426
426
this . _styleElement ?. remove ( ) ;
427
427
this . _createLayoutStyles ( ) ;
428
- this . _webview ?. updateOptions ( this . notebookOptions . computeWebviewOptions ( ) ) ;
428
+ this . _webview ?. updateOptions ( {
429
+ ...this . notebookOptions . computeWebviewOptions ( ) ,
430
+ fontFamily : this . _generateFontFamily ( )
431
+ } ) ;
429
432
}
430
433
431
434
if ( this . _dimension && this . _isVisible ) {
@@ -616,6 +619,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
616
619
DOM . append ( parent , this . _overflowContainer ) ;
617
620
}
618
621
622
+ private _generateFontFamily ( ) {
623
+ return this . _fontInfo ?. fontFamily ?? `"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace` ;
624
+ }
625
+
619
626
private _createLayoutStyles ( ) : void {
620
627
this . _styleElement = DOM . createStyleSheet ( this . _body ) ;
621
628
const {
@@ -647,7 +654,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
647
654
this . _generateFontInfo ( ) ;
648
655
}
649
656
650
- const fontFamily = this . _fontInfo ?. fontFamily ?? `"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace` ;
657
+ const fontFamily = this . _generateFontFamily ( ) ;
651
658
652
659
styleSheets . push ( `
653
660
:root {
@@ -1098,7 +1105,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
1098
1105
|| oldBottomToolbarDimensions . bottomToolbarHeight !== newBottomToolbarDimensions . bottomToolbarHeight ) {
1099
1106
this . _styleElement ?. remove ( ) ;
1100
1107
this . _createLayoutStyles ( ) ;
1101
- this . _webview ?. updateOptions ( this . notebookOptions . computeWebviewOptions ( ) ) ;
1108
+ this . _webview ?. updateOptions ( {
1109
+ ...this . notebookOptions . computeWebviewOptions ( ) ,
1110
+ fontFamily : this . _generateFontFamily ( )
1111
+ } ) ;
1102
1112
}
1103
1113
type WorkbenchNotebookOpenClassification = {
1104
1114
scheme : { classification : 'SystemMetaData' ; purpose : 'FeatureInsight' } ;
@@ -1348,7 +1358,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
1348
1358
didDragMarkupCell : that . _didDragMarkupCell . bind ( that ) ,
1349
1359
didDropMarkupCell : that . _didDropMarkupCell . bind ( that ) ,
1350
1360
didEndDragMarkupCell : that . _didEndDragMarkupCell . bind ( that )
1351
- } , id , resource , this . _notebookOptions . computeWebviewOptions ( ) , this . notebookRendererMessaging . getScoped ( this . _uuid ) ) ;
1361
+ } , id , resource , {
1362
+ ...this . _notebookOptions . computeWebviewOptions ( ) ,
1363
+ fontFamily : this . _generateFontFamily ( )
1364
+ } , this . notebookRendererMessaging . getScoped ( this . _uuid ) ) ;
1352
1365
1353
1366
this . _webview . element . style . width = '100%' ;
1354
1367
0 commit comments