How to set a different font for headings?

Hi,

how do I style headings’ font differently from paragraphs?

I looked in the docs, but I can’t find a solution. “font“ does not seem to be a valid key in heading styles.

EDIT: Damn, this was one of those cases in which you had to go public on a forum and find the solution a minute afterwards yourself…

#show heading.where(
  level: 2
): it => text(
  font: "Atma",
  size: 20pt,
  weight: "regular",
  style: "normal",
  it.body,
)

This is solved.

#show heading.where(
  level: 2
): it => text(
  font: "Atma",
  size: 20pt,
  weight: "regular",
  style: "normal",
  it.body,
)
1 Like

It would be nice if you share your solution, so others can benefit from your work. :slight_smile:

They have shared the solution, see the “Edit” and the code block in the initial post.

2 Likes