Custom font resets to default after checking database

If I attempt to use the font I prefer to use with my Anki cards (gpbNusxuriregular [a font that wasnt pre-packaged with my system) usually, it works, but this time, and yesterday, it stopped. It completely just stopped using gpbNusxuriregular and instead uses the last known font, trying to avoid gpbNusxuriregular. Usually it’s… serif I think? How do I fix this?
(I use Garuda Linux)

Are you using the font on your card templates, or somewhere else (like the note editor)? Do you have the font properly installed in your Anki collection? Styling & HTML - Anki Manual

I’m using it in the note editor, and also…
even if I do install it “correctly” into the collection it still does the exact same thing as if I had done it how I usually do. Adding a extra character to them sometimes fixes them but sometimes it doesn’t.
Here’s one of the templates I use:

.card {

 font-family:gpbnusxuriregular;
 font-size: 25px;
 text-align: center;
 color: white;
 background-color: #151515;
}

img {
 width: auto;
 height: auto;
 max-height: 300px;
}

.typeGood { background: green; }
.typeBad { background: blue; }
.typeMissed { background: red; }
#typeans { font-family:sans-serif; !important;}



.mobile .card {
 font-family:sans-serif;
 font-size: 3em;
 text-align: center;
 color: #5e5e5e; 
 background-color: #ebe8e8;
}

.center {
    margin: auto;
    width: 60%;
    border: 0px solid lightgray;
    padding: 0px;
    text-align: center;
    font-size: 1.0em;
}

.mobile .center {
    margin: auto;
    width: 95%;
    border: 0px solid lightgray;
    padding: 0px;
    text-align: center;
    font-size: 1.0em;
}

#answer {
    margin: auto;
    width: 60%;
    border: 0px solid lightgray;
    padding: 0px;
    text-align: center;
    font-size: 1em;
}

.mobile #answer {
    margin: auto;
    width: 95%;
    border: 0px solid lightgray;
    padding: 0px;
    text-align: center;
    font-size: 1em;
}

#div1{
    margin: auto;
    width: 70%;
    border: 1px solid rgb(64, 64, 64);
    padding: 10px;
    text-align: left;
    font-size: 1.0em; 
    border-radius:5px;
}

.mobile #div1{
    margin: auto;
    width: 95%;
    border: 3px solid lightgray;
    padding: 10px;
    text-align: left;
    font-size: 1.0em; 
    border-radius:10px;
}


#button{
    margin: auto;
    width: 5%;
    border: 1px solid rgb(97, 97, 97);
    padding: 10px;
    text-align: center;
    font-size: 1em; 
    color: white;
    font-family: gpbNusxuriRegular;
    border-radius:5px;
}

.mobile #button{
    margin: auto;
    width: 25%;
    border: 3px solid lightgray;
    padding: 10px;
    text-align: center;
    font-size: 1em; 
    color: gray;
}

I faced this issue once and solved it by adding @font-face which I see you don’t use.

Example:

@font-face {
  font-family: "Karla"; 
  src: url('_Karla.ttf');
 
}

(The src here has the file name and you ofc already know the font-family/ btw u can give a shorter name in font-family if u didnt notice)

You should take a look at the page I linked, because what you have there wouldn’t install the font in your collection. You’re simply referring to a font that your system needs to provide.

Well. I now look like a complete idiot because even though the font was installed before, apparently, it just disappeared into thin air somehow. I just made a forum post and somehow managed to forget to check if the font was actually still installed.
Dunno why I would because it wouldn’t make much sense for it to be just gone for no reason. Oops. :man_facepalming:

1 Like

I’m glad you figured that out. Don’t worry about it!

Just to be clear, installing the font on your system and installing the font in your Anki collection are different things. But installing it on your system will suffice, as long as you don’t want the font to show up on any other devices you sync with.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.