How to change the monospace font

I don’t like the font used for mono-space (within single backticks) in the community theme I am using (red graphite) because of the way ‘1’ is represented. Everything else about it is great, btw.

how do I do this?

image

Hi @mano,

You can edit the obsidian.css file in the root of your Vault.

Each Vault has a different css file, and every time you select a new theme, this file is replaced.

I use Sublime Text with a few add-ons for previewing color codes, and picking new colors.

I think this is the section that needs changed to replace the monospace font:

.markdown-source-view { 
    font-family: 'roboto mono', monospace; 
    color: white;
}

If you screw up the template, just change the theme back to Red Graphite to get the original file back. And once you have the edited version the way you want, be sure to make a backup so you don’t lose it next time the theme is changed! :wink:

1 Like

Thank you for the detailed information about how to change the css file. I should have mentioned that I wanted to know where in the css file I should make the changes :man_facepalming:

I specifically wanted to change the monospace font used inbetween backticks (inline code).

I ended up adding the font-family code that you suggested here:

It works as I intend. Thank you for your help.

1 Like