Skip to content
Advertisement

Console.log custom fonts in google chrome

I’ve been making game which is played in the browsers console, and I’m interested of the possibility of using custom fonts. I’m working with chrome and don’t really care about compatibility with other browsers. I know that console.log() can be styled with CSS, but I haven’t had any success with trying to get it to work with custom fonts.

My css looks like this:

JavaScript

and my Js looks like this:

JavaScript

I’ve allso tried using ”:

JavaScript

Both are in the same html file in their respective tags (no external css or js files) css on the top and js on the bottom.

Thanks in advance! 🙂

Advertisement

Answer

As far as I know you can use a font called “system-ui” to change the text’s font. You can’t use custom fonts, though.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement