How to change font?

I am trying to change the font and I searched forums. Everyone advises to change it in obsidian.css but I can’t find it anywhere. Can you show me the exact location of that file? (Windows 10)

Here’s what I do:

  • Open Obsidian’s Options menu

  • Select “Appearance” tab

  • Under CSS Snippets, select “Open snippets folder” icon

  • Create a blank text file in that folder with the suffix “.css” (“My Font.css”, for example)

  • Type the following 4 lines (switch “Times New Roman” to any font you wish) (use regular single quotes, not the fancy quotes this forum software corrects it to):

    {
    font-family: 'Times New Roman', serif !important;
    }
  • Save the file

  • Back in Obsidian, click the “Reload snippets” icon

  • Now you can activate your font setting (snippet) for any theme!

3 Likes

Thank you that worked.

That didn’t work for me. Any other ideas please?

Is it possible to use different fonts in the view mode vs. editor mode in a similar way?

I know there are designs themes like “minimal” but they come with other disadvantages…
Usually good typography design rules are asking for serif-fonts in view (read) mode.

So I’d like to have the following results after applying the changes…

  • editor-mode fonts:
  1. Textbody: sans serif font of my choice + size adjustable
  2. Sourcecode: sans serif font of my choice + size adjustable
  • preview-mode fonts:
  1. Textbody: serif font of my choice + size adjustable
  2. Sourcecode: sans serif font of my choice + size adjustable

This helps to:

  • recognize immediately in which mode your openend document is - edit or view…
  • makes longer documents better readable in preview mode (typo rules!)
  • allows you to safe screenspace in editor mode by modifying the Fontsize and fonttype

Thx for your help