I’m using a specific font VictorMono Nerd Font, which has many font weights like thin, thin italic, medium oblique, etc. The issue is that, for italics, obsidian used to use by default Medium Italic instead of Medium Oblique. This difference is important, because Italics weight in this font are handwritten, while the obliques are script. After updating to 1.4.16, obsidian is using the oblique font weight instead of the italic weight for formatting italics.
Things I have tried
I have tried creating a css custom snippet, but I’m not sure how to specify the specific font weight, instead of just the family font. So far I have this, which hasn’t worked at all.
/* of italics in Preview all notes in a vault */
em {
font-family: "VictorMono Nerd Font Medium Italic", sans-serif;
}
I also looked up this obsidian snippets documentation regarding on how to format fonts, but I haven’t found anything specific about overriding to a specific font weight.
I put the colors and /* bold */ section in there to see what was happening for myself; you can of course remove or comment out those parts.
For the handwritten italics, the Victor Mono Medium, I only see two font weights: 100 → 500 and 600 → 900. I’d have to fire up Font Forge to have a closer look, but I suspect there’s only two weights for that style. The Victor Mono seems fine with 100 → 900. On Windows now, but will check later on mac.
Thank you this worked really well! I tested the mac solution because that’s what I have, but I think if someone has Windows, the first answer will work for them.
@Lilith_97 Glad it worked out! For next time, or for anyone else stumbling in here, on the mac, the PostScript Name is generally what you want to declare in the CSS.