UI Custom fonts: Via CSS @font-face & async font loading from a cdn?

Will it be possible to use the CSS at-rule @font-face to define font-families, especially in conjunction to loading a font from an external source like a cdn?

Also the possibilities of the CSS attribute font-display could be nice, this controls when a font displayed/downloaded. With font-display: swap the browser won’t wait til the font download is finished, instead it will display the normal font and swap it with the desired font as soon as its loaded.

This could decrease the “critical rendering path” / time to join.

To be honest, I don’t think this will be implemented. It would probably be nice, but why rely on a third-party if you can just ship the fonts with your gamemode? It’s not like web where every millisecond matters - after all you are downloading a whole game, and waiting max a few seconds to download the fonts while downloading the gamemode is better than opening an UI and waiting for the fonts to download.

2 Likes

Just include the fonts with your game.

7 Likes