Supporting other languages

Adding support for other languages in tooltips

Requires version 1.6+

Setup

  1. Download legacy.zip

  1. Go into plugins/Tooltips/.data/schemas

  2. Move all the contents of legacy.zip into the schemas folder

What we just did, was add ALL possible unicodes into our schemas. This includes all CJK characters and many other missing unicodes from the default game. The problem with adding everything, is that the resource packs size has just grown to 5mb+!

Why has the size grown so much? Because each line in Tooltips has to use a separate font to control the vertical height at which it is shown. Each line has to contain every single unicode from the ones we just added. Plus there are a lot of textures for these characters to be shown, which also takes a lot of space.

But there is a solution! Your tooltips most of the time do not need ALL the possible characters, which means that we can remove the redundant ones and reduce our resource pack size.

Removing extra fonts

First, determine which languages you need. This could be for example just Chinese, Japanese or Korean. Next go here. As you can see, it's a giant sheet which contains all the unicodes. If you zoom in, on the left you can see the index.

Find the start and ending index of the characters you want to be included. For the above image for example, to include accented and cyrillic characters you would need indexes starting at 01 and ending at 05.

After you have the range, go into your legacy-fonts.yml which should be located by now in plugins/Tooltips/.data/schemas. In there, you can see lots of providers that have names

Inside it, select and remove all providers that are not within your needed indexes. For example if we use the above indexes 01 and 05, I would just need to remove all providers under unicode_page_05.

After that's done, clear the cache and your Tooltips plugin should be able to support other fonts!

Important!

With some languages, there may be issues in the tooltips width (text is offset). In order to fix that, follow the Manual width guide.

Last updated