Hello everyone, I have a question regarding changing the font in Obsidian Publish. I use the “Inter” font in the application, along with a CSS to change the weight of the titles. I applied the same CSS for weight in Publish, but I also used one to change the font.
The issue is that when I change the font in Obsidian Publish, it no longer adjusts the weight. Does anyone know how to resolve this?
--h1-size: 1.7em !important;
--h2-size: 1.55em !important;
--h3-size: 1.4em !important;
--h4-size: 1.2em !important;
--h5-size: 1.15em !important;
--h6-size: 1.125em !important;
--h1-weight: 700 !important;
--h2-weight: 650 !important;
--h3-weight: 650 !important;
--h4-weight: 600 !important;
--h5-weight: 600 !important;
--h6-weight: 600 !important;
--font-text-theme: 'Inter' !important;
Another question is how do I put this line break that appears after H2 (Obsidian Publish) in a CSS?
Font weights don’t have
n50 values AFAIK, so you’ll want to pick
700 in your CSS.
Also, you may need to import the font and its weights to get it working properly. The links in here may be of some help:
I reached out on Obsidian’s Discord server and got my problem solved there.
The following articles were instrumental in figuring out what I need to do:
You should not use
!important inside variables, it’s not necessary and can cause some unexpected effects.
Thank you for the help, I figured it out!
--font-family: 'Inter', sans-serif;
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.