How to add and change fonts in reveal.js?

Luzan Baral picture Luzan Baral · Nov 10, 2014 · Viewed 14.9k times · Source

I'm working with reveal.js for my next presentation, I want to change the default fonts used for headings.

How can I add and change fonts in reveal.js?

Answer

Aatish Sai picture Aatish Sai · Nov 10, 2014

You can do it be modifying the css file of the current theme you are using.

The theme file is located in the folder /css/theme/[yourtheme].css

Once you open the css file for your theme you can see the section for header like below

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  margin: 0 0 20px 0;
  color: #eee8d5;
  font-family: "League Gothic", Impact, sans-serif;
  line-height: 0.9em;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: none; }

Now you can modify any attribute of you header.