fonts

What is this?

The fonts are like minecraft uses characters, with the resourcepack you can replace 😀 by some specific texture in your resourcepack that does not exceed 256x, an example would be this

Beginning

To find unicodes use this

📦resource_pack.zip
  └── 📁assets
       └── 📁minecraft
           ├── 📁font
           │    ├── 📑default.json //the one who uses minecraft for chatting mainly
           │    └── 📑another.json
           └── 📁textures
                └── 📁custom
                     └── 📁emojis
                          └── 🎨smile.png
{
    "providers": [
        {
            "file": "minecraft:custom/emojis/smile",
            "height": 10,
            "ascent": 8,
            "type": "bitmap",
            "chars": [
                "😀"
            ]
        }
    ]
}

Parameter
Description

type

The font type, in this case, is bit-map for image-based chars.

file

the texture route, in this case “file” will refer to assets/minecraft/textures/custom/emojis/smile.png

ascent

Vertical displacement of the char

height

The height of each character in pixels

chars

An array of characters to be used to split or use an entire texture.

The ascent should not be greater than the height, try to use multiples of 16x to make them and if you want to make textures greater than 256x divide it in several fonts.

Example of several fonts added

{
   "providers":[
      {
         "file":"minecraft:custom/gui/circle",
         "chars":["惐"],
         "ascent": 13,
         "height": 256,
         "type":"bitmap"
      },
      {
         "file":"minecraft:custom/emojis/angry",
         "chars":["😡"],
         "ascent": 8,
         "height": 10,
         "type":"bitmap"
      }
   ]
}

Gui Example

{
   "providers":[
      {
         "file":"custom/gui/shop_gui",
         "chars":["惎"],
         "ascent": 13,
         "height": 256,
         "type":"bitmap"
      }
   ]
}

Last updated