Unable to Change Font in Editor/Reader Views Regardless of Theme

What I’m Trying to Do

Greetings! I’ve been having the most damnable time trying to change the fonts that Obsidian uses.

I prefer different typefaces depending on the vault I’m using. I like to experiment with fonts after creating a new vault (I’ve been a font nut ever since the days of old-school WordPerfect in the early '90s—in my opinion the world’s greatest word processor/office suite of all time).

So naturally I use the Appearance tab of the Settings dialog box, which in recent versions has provided several awesome options for configuring the Interface, Text and Code fonts, the UI scale, font size, theme and others.

Until recently (I’m not sure of the exact date or circumstances) each option worked perfectly well regardless of the theme I was using or the Style Settings options for different themes (few themes have actual options to change the font’s face, at least in my experience).

Things I have tried

At first I thought perhaps it was an issue with the specific theme I was using, the outstanding “Blue Topaz”. So I tried switching themes, but although I tried over ten different themes and dozens of different fonts (even different font formats—TTF, OTF, WOFF, etc.), neither the interface nor text nor even code fonts changed from the default boring sans serif typeface Obsidian ships with.

Then I decided maybe it was an issue with the vault I was using. So I decided to try changing the font with other vaults. No cigar. I even made a brand new vault and used the default Obsidian theme, but no joy there either.

Finally, frustratingly “grasping at straws” (despite my opinion of that loathsome metaphor :stuck_out_tongue_winking_eye:), I was struck by the fact I had only tried to change the font while using the Live Preview editor mode.

But, alas, switching among various modes does nothing to assuage the situation either. It is irrelevant whether I use source mode, live preview editor mode, reading mode or mode-that-remains-nameless mode. /sigh

I also tried, as a last resort before foisting my problem on my fellow “Obscitizens”, to alter the UI scale and font size, the latter by means of both Ctrl+Mouse Wheel and explicitly on the Settings dialog, with no change to the font.


P.S. After much thought and a good night’s sleep, I decided to reinstall Obsidian and even delete the various configuration files under ~/AppData and my vaults’ .obsidian folders. Needless to say, this also failed tor produce a change in typeface for any of the font settings. :sob:

Conclusion

In summation, I can only assume that one or both of three cases is true of my issue. Either:

  1. I have been cursed by the Markdown “Powers That Be”.
  2. Despite my best efforts (including a thorough search of the Help documentation online and these excellent forums) I failed to see a simple explanation for this malady of style.

or

  1. There is an actual bug/glitch/issue with Obsidian itself.

The final case is obviously the least likely of the three, but due to Occam’s Razor and the “Sherlock Holmes” principle it could admittedly be thus.

So thanks in advance to any who spend time reading this and/or trying to solve the issue. I have seen two similar issues on the forums, but they were different enough to warrant a new post, sadly. Any help is greatly appreciated, and I wish you all a good day/night and good fortune! :slightly_smiling_face:

  • Seän “frostbyte” S.

It’s odd that none of the Settings > Appearance > Font adjustments you made in a new vault don’t work. Have your tried in the Sandbox vault? Have a look at the debug help.

The fonts can also be easily changed with CSS →

/*- source+live preview mode font -*/
.markdown-source-view.mod-cm6 .cm-scroller {
  font-family: 'Comic Sans MS'; 
  color: var(--color-orange);
  font-size: 22px;
}

/*- reading mode font -*/
.markdown-preview-view, .cm-scroller {
  font-family: 'Times New Roman'; 
  color: var(--color-yellow);
  font-size: 22px;
} 

Here’s how to use CSS snippets if you haven’t before:

It also might be a good idea to check in Font Book (mac) that the fonts show up and that other apps can use them, etc.

1 Like

Thank you for your kind help. I will attempt to use CSS snippets. I didn’t think of that, actually. No it doesn’t happen in sandbox vault, I noticed after you asked.

I don’t know what the problem is with the vaults I have, but I’m going to go through all the settings files and JSON files to see if I can figure it out. Until then, CSS will help. Appreciate it greatly! If I find the problem and a fix I’ll post it here. Otherwise I’ll mark your answer as the solution. Thanks again! :slight_smile:

The font settings, active CSS snippets, and a few more settings are saved in the .obsidian/appearance.json file. You could try moving this file out of your vault and restarting Obsidian (keep the original, etc) to reset things and see how it goes.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.