Adding multiple typeface fonts

How do I add multiple custom fonts to Anki to use at the same time?

Anki will use any fonts you have installed on your device. But if you use multiple devices or unusual fonts, you’ll want to install them in your collection – Styling & HTML - Anki Docs .

I am trying to get the Usage Label to be on the same line as the Part of Speech, but when setting the font and size for the fields it automatically adds a line break, is there a way to have them be on the same line and still use different fonts and sizes?

That’s not because of the font itself, but because you are using a <div> tag which by default has a display: block property, meaning it is intended to be displayed as a separate vertically-separated entity.

The simplest solution for you would be to just use <span> tag instead (for both part of speech and usage label fields).


If you plan on building on that template further, however, it’s worth format it properly first. In that case I would suggest to leave only the following code on the front side:

<div class="word">
  {{Word}}
</div>

<div class="PoS">
  {{Part of Speech}}
  <span class="label">
    {{Usage Label}}
  </span>
</div>

to keep the content structure and styling separate. And move the respective styles to the Styling tab:

.word {
  font-family: "myfontb";
  font-size: 27px;
}

.PoS {
  font-family: "myfonti";
  font-size: 20px;
}

.label {
  font-family: "myfont";
  font-size: 18px;
}