Using specific fonts in title/body text

Hi, I’m very new to using TW. I want to use 2 specific fonts. One font for the titles of tiddlers and subheadings, and another for everything else. I’m thinking Spectral SC and Libre Baskerville which are both Google fonts. I don’t need a font stack, my TW is only ever going to be accessed by me.

From what I understand I need to create a stylesheet which I have successfully done for other elements but I can’t figure out how to change the fonts. I have tried following the instructions on google-fonts.tiddlyhost.com but I don’t think I’m writing the stylesheet correctly. I’ve tried:

.tc-title {
font-family: “Spectral SC”, serif;
}

.tc-tiddler-frame .tc-title {
font-family: “Spectral SC”, serif;
}

.h2 {
font-family: “Spectral SC”, serif;
}

…etc. and nothing changes. Sorry for the dumb question.

Hi @Robin_45383, welcome to the group.

First… there are NO dumb questions!

Now, on to your question…

Your CSS looks OK. The .tc-title rule should be sufficient. Make sure you’ve tagged your stylesheet tiddler with $:/tags/Stylesheet. This is important, as it tells the TWCore that your tiddler contains CSS that needs to be applied.

In TiddlyWiki, tags serve two purposes:

  • They can be used to add user-defined “keywords” to tiddlers to make them easier to find or group together
  • There are also pre-defined “system tags” (like $:/tags/Stylesheet) that give special behaviors to tiddlers. See https://tiddlywiki.com/#SystemTags for a list of these pre-defined tag values.

enjoy,
-e