# How to change the monospace font

**URL:** <https://forum.obsidian.md/t/how-to-change-the-monospace-font/5438>\
**Category:** Basement\
**Tags:** custom-css\
**Created:** [September 9, 2020, 2:47am UTC](https://forum.obsidian.md/t/how-to-change-the-monospace-font/5438 "2020-09-09T02:47:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mano](https://forum.obsidian.md/user_avatar/forum.obsidian.md/mano/32/3891_2.png) [@mano](https://forum.obsidian.md/u/mano)\
**Post date:** [September 9, 2020, 2:47am UTC](https://forum.obsidian.md/t/how-to-change-the-monospace-font/5438/1 "2020-09-09T02:47:03Z")

</div>

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](https://forum.obsidian.md/uploads/default/original/2X/d/de59be7d2110af95b2cec00a6699dd71ea791ad4.png)

---

<div class="post-metadata">

**Author:** ![GreenFlux](https://forum.obsidian.md/user_avatar/forum.obsidian.md/greenflux/32/3787_2.png) [@GreenFlux](https://forum.obsidian.md/u/GreenFlux)\
**Post date:** [September 9, 2020, 12:04pm UTC](https://forum.obsidian.md/t/how-to-change-the-monospace-font/5438/2 "2020-09-09T12:04:19Z")

</div>

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.

 ![Screen Shot 2020-09-09 at 7.59.26 AM](https://forum.obsidian.md/uploads/default/original/2X/5/526999b1f3ab246157c26e7aebf554abb6d36c42.jpeg)

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

```auto
.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! 😉

---

<div class="post-metadata">

**Author:** ![mano](https://forum.obsidian.md/user_avatar/forum.obsidian.md/mano/32/3891_2.png) [@mano](https://forum.obsidian.md/u/mano)\
**Post date:** [September 10, 2020, 5:23am UTC](https://forum.obsidian.md/t/how-to-change-the-monospace-font/5438/3 "2020-09-10T05:23:57Z")

</div>

> [@GreenFlux](#):
>
> `font-family: 'roboto mono', monospace; `

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 🤦‍♂️

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:

 ![image](https://forum.obsidian.md/uploads/default/original/2X/d/d1341fb7f827c0c86f7eedeed0b4a4524c7a890e.png)

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

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [April 1, 2023, 1:49pm UTC](https://forum.obsidian.md/t/how-to-change-the-monospace-font/5438/4 "2023-04-01T13:49:56Z")

</div>

Closed on April 1, 2023, 1:49pm UTC


