Skip to content

Creating your own fonts

felixmariotto edited this page Jul 26, 2020 · 14 revisions

Fonts used by three-mesh-ui are MSDF fonts.

It comes with two files :

  • one JSON, containing all the dimension information about the font
  • one PNG image, containing a picture of each glyph, that will be used for textures and postprocessing

To create these files with a custom font of yours, use this online tool.

If you want your font to contain all the characters supported by the Keyboard component layouts, use this charset :
azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN/\*-–+7894561230,;:!?.%$£€={}()[]&~"'#_|°@АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯяüÜöÖäÄñÑςερτυθιοπασδφγηξκλζχψωβνμΕΡΤΥΘΙΟΠΑΣΔΦΓΗΞΚΛΖΧΨΩΒΝΜåÅæÆøØ

As this charset is large however, with most fonts you will have to get a larger PNG size than 256x256 pixels.