MiniRepl: consume font settings

This commit is contained in:
Felix Roos 2023-05-28 12:42:15 +02:00
parent 9971867e2f
commit d2dffe3186
3 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,7 @@ export function MiniRepl({
onPaint, onPaint,
canvasHeight = 200, canvasHeight = 200,
fontSize = 18, fontSize = 18,
fontFamily,
hideHeader = false, hideHeader = false,
theme, theme,
keybindings, keybindings,
@ -156,6 +157,7 @@ export function MiniRepl({
onChange={setCode} onChange={setCode}
onViewChanged={setView} onViewChanged={setView}
theme={theme} theme={theme}
fontFamily={fontFamily}
fontSize={fontSize} fontSize={fontSize}
keybindings={keybindings} keybindings={keybindings}
/> />

View File

@ -7,3 +7,7 @@
border: 1px solid var(--lineHighlight); border: 1px solid var(--lineHighlight);
padding: 2px; padding: 2px;
} }
.cm-scroller {
font-family: inherit !important;
}

View File

@ -60,6 +60,8 @@ export function MiniRepl({
theme={themes[theme]} theme={themes[theme]}
hideHeader={hideHeader} hideHeader={hideHeader}
keybindings={keybindings} keybindings={keybindings}
fontFamily={fontFamily}
fontSize={fontSize}
onPaint={ onPaint={
claviature claviature
? (ctx, time, haps, drawTime) => { ? (ctx, time, haps, drawTime) => {