OBS Browser Source Custom CSS does not change Font Type

Hi, i'm using the browser source to read my remote bot's text files for latest follower and host. that works ok. to change font, size and add shadow, i did put in a custom CSS.

Here it is:
Code:
body { background-color: rgba(0, 0, 0, 0); max-width:600px; text-align: center; margin: 0px auto; font-family: Ultra Toukon Densetsu; font-size: 28px; color: #9acd32; text-shadow: -4px -4px 0 #000, 4px -4px 0 #000, -4px 4px 0 #000, 4px 4px 0 #000; overflow: hidden; }

Font size and shadows still work, Font does not. it seems the font-family tag is ignored since i tried other fonts like Arial and Courier New to see if anything changes. It didnt.

it worked before the update. font is installed.

This is the Log File https://obsproject.com/logs/rHTSSBYsSss2Lom3

Thanks in advance
 

lofihap

Member
Do you have issues with the font as just a text (GDI) source without CSS?

If the custom fonts aren't working on reboot as a "text" source, they may not work in the custom CSS.
OBS doesn't like custom fonts after reboot if they are not installed properly. Could be part of the issue.

I put together a quick 2 minute video on how to install fonts so they work after reboot, - you can try that and see if it resolves the issue.
2 minute quick fix - OBS custom fonts work after reboot 2021
 

b3ck

New Member
@retropixelshow

I know you've probably already figured this out but since this never really got a answer, you could use something like this in the Custom CSS box in the broswer source Properties window in OBS Studio:


CSS:
body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; }

@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@800&display=swap');

* {
    font-family: 'League Spartan', sans-serif !important;
    -webkit-filter: drop-shadow( 0px 0px 1px rgba(0, 0, 0, .5));
    filter: drop-shadow( 0px 0px 1px rgba(0, 0, 0, .5));
}
 
Top