this post was submitted on 21 Jul 2023
4 points (100.0% liked)

ObsidianMD

4052 readers
1 users here now

Unofficial Lemmy community for https://obsidian.md

founded 1 year ago
MODERATORS
 

I want to use a monospace font for editing and a sans-serif for reading -- is this possible? I can only see a single "Text font" parameter in the settings and can't find plugins that can set different fonts.

top 5 comments
sorted by: hot top controversial new old
[–] dowath@kbin.social 4 points 1 year ago (1 children)

You can also do this with any theme if you setup a CSS Snippet:

// This is the one that works for me
.markdown-source-view.mod-cm6 .cm-scroller {
    font-family: monospace;
}

// You may also want to do this one
.markdown-source-view {
    font-family: monospace;
}

Then reading view will use whatever font you've configured in the settings.

[–] berryjam@lemmy.world 1 points 1 year ago

Thanks much! This is elegant and easy.

[–] EpiphanicSynchronicity@pkm.social 3 points 1 year ago (1 children)

@berryjam I’ve tried to sign up for Lemmy twice and it’s failed both times. Please tell them they can use different fonts for live preview and for reading mode with the Minimal theme and the Minimal Theme Settings plugin.

[–] berryjam@lemmy.world 1 points 1 year ago (1 children)

Thanks, I will check out that theme!!

@berryjam Just FYI, in addition to the Minimal Theme Settings plugin, you’ll also want the Style Settings plugin to get all the customization options.