Font family not working

It drives me crazy the fact that I cannot change the font family. I select Inter (or other font family) as my font family and there are no changes, I can’t change the Arial font family.

I also tried Inter with the CSS method with the @import from Google Font. NOT WORKING! How do I actually change the font family?

Much appreciated.

Obligatory silly question. Did you reload the page?

Can you select any text of your forum (like a post contents) and see what font-family is set to, using your browser dev tools ?

1 Like

Please try clearing the cache or performing a hard refresh of the browser; it will most likely work.

I did all of that. I cannot get rid of Arial.

Thanks @MihirR I did that, I do it all the time. Still Arial everywhere…

To check why it’s not working, you can add this to your Edit HTML/CSS and see if the new font appears:

body {
  font-family: 'Times New Roman', serif !important; 
}

h1 {
  font-family: 'Courier New', monospace !important;
}

That’s weird.

What does it look like when using safe mode (the safe mode should keep the custom font)?

Is there any error in the js console or network tab?

I tried this yesterday and It works only for H1.

OMG… :man_facepalming:

It’s a fresh Discourse install. I’m trying do figure this issue.

Yeah, it’s for h1. If you want it for everything, you can use this:

* {
  font-family: 'Times New Roman', serif !important; 
}

Not working. As you can see above it seems that there are some http problem, I have no idea why since everything else is https.

You may want to diagnose why the font is served over http instead of https.

Is your Discourse a standard install?

1 Like
* {
  font-family: 'Inter', sans-serif !important; 
} 

See, if the H1 works, this should definitely work too.

You can try running: ./launcher rebuild app

Also, are you using any themes? (I assume not, since you mentioned it’s a fresh install, so it’s free of themes and plugins.)

However, I tested some fonts, and they work well on my end, so it’s not an issue on Discourse’s side.

By any chance, are you using a reverse proxy?

Hello :wave:

If so, the force_https site setting is automatically enabled. This is a hidden site setting that you can change in the rails console. It might not be enabled somehow :thinking:

Give it a try :slightly_smiling_face:

cd /var/discourse
./launcher enter app
rails c
SiteSetting.force_https=true
exit

4 Likes

I’m new to Discourse, installed it via Docker / Github. I have no idea what Standard means.

Yes, I use reverse proxy because I have Fastpanel. Fastpanel and Discourse use the same ports, so I had to use reverse proxy.

1 Like

Oh my god! It worked!!!
Thank you so much, you saved me!!

Much appreciated @Don !!!

1 Like