Easy optimization for the fonts of your project

Brief description​

Taking advantage of new web technologies we can optimize the fonts of our game (or, at least, in most of them, the main font) so that it takes up less space (> 1MB to 0.016M😎 and loads much faster , showing exactly the same quality. The woff2 font format is wide supported in all browsers (https://caniuse.com/#search=woff2).

Legal requirement​

The license of the font must allow you to do this modification to the font. In the case of default game font I believe that this is the license, so we can do it.

These fonts are free software.
Unlimited permission is granted to use, copy, and distribute them, with or without modification, either commercially or noncommercially.
THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.
http://mplus-fonts.osdn.jp/about-en.html#license

Tutorial
For the default game font.​

You can change the default font TTF (1Mb ) to their WOFF2 western-optimized version (16Kb ).
  1. Put the attached file (woff2 extension) in the font directory
  2. Remove the previous font that has ttf extension.
  3. Change the gamefont.css first-part to (changes in bold).
CSS:
@font-face {
    font-family: GameFont;
    src: url("mplus-1m-regular.woff2") format('woff2');
}


You can do it yourselft with your own fonts custom game fonts using https://www.fontsquirrel.com/tools/webfont-generator to generate the woff2 files.

Extra​

For advanced stuff please refer to the Google deep explanation: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/webfont-optimization?hl=en
I assume it doesn't fix the "blurry" fonts problem? 😀
I was looking for this, it will be very useful.

Original thread: https://forums.rpgmakerweb.com/threads/easy-optimization-for-the-fonts-of-your-project.120106/