Skip to content

Commit bb328f1

Browse files
committed
Use the font size and family for Monaco
1 parent 9352eeb commit bb328f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/frontend/editor/MonacoEditorCore.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,14 @@ const MonacoEditorCore: React.FC<CommonEditorProps> = (props) => {
5555
return;
5656
}
5757

58+
const nodeStyle = window.getComputedStyle(node);
59+
5860
const editor = monaco.editor.create(node, {
5961
language: 'rust',
6062
value: initialCode.current,
6163
theme: initialTheme.current,
64+
fontSize: parseInt(nodeStyle.fontSize, 10),
65+
fontFamily: nodeStyle.fontFamily,
6266
automaticLayout: true,
6367
'semanticHighlighting.enabled': true,
6468
});

0 commit comments

Comments
 (0)