From 90c316e0c8816ae8979af2bee07e6d434a747433 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Thu, 26 Oct 2023 00:04:19 +0200 Subject: [PATCH] wip remifont --- src/API.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/API.ts b/src/API.ts index 09cca89..00c2a19 100644 --- a/src/API.ts +++ b/src/API.ts @@ -1,3 +1,4 @@ +import { EditorView } from '@codemirror/view'; import { getAllScaleNotes, seededRandom } from "zifferjs"; import { MidiCCEvent, @@ -2027,4 +2028,25 @@ export class UserAPI { ...config, }; }; + + // ============================================================= + // Ralt144mi section + // ============================================================= + + raltfont = (mainFont: string, commentFont: string): void => { + this.app.view.dispatch({ + effects: this.app.fontSize.reconfigure( + EditorView.theme({ + "&": { fontFamily: mainFont }, + ".cm-gutters": { fontFamily: mainFont, }, + ".cm-content": { + fontFamily: mainFont, + }, + ".cm-comment": { + fontFamily: commentFont, + }, + }) + ), + }); + } }