Closed LoneDev6 closed 3 years ago
The whole thing is doable but would make the processing of HUDs and other stuff very heavy and potentially create a lot of garbage for the GC, create unnecessary CPU overhead and confuse a lot of admins.
I decided to make a global use_separate_custom_font_file: true
attribute in the config.yml of ItemsAdder which will avoid saving into default.json
and will save images into a new custom.json
file.
Please note that this has some downsides:
/e
autocomplete command, instead placeholders will be shown (screenshot)font
attributefont_images.command
, font_images.scoreboard-teams
, font_images.vault-prefix-suffix
https://itemsadder.devs.beer/plugin-usage/adding-content/advanced/font-images/alternative-font-file
I found another big compatibility issue. Minecraft doesn't support json components in language files, so we cannot retexture ESC menu and similar places if using a custom font. https://bugs.mojang.com/browse/MC-195666 I'm afraid I might have to rollback all the changes for this commit...
https://itemsadder.devs.beer/plugin-usage/adding-content/advanced/font-images/alternative-font-file
I found another big compatibility issue. Minecraft doesn't support json components in language files, so we cannot retexture ESC menu and similar places if using a custom font. https://bugs.mojang.com/browse/MC-195666 I'm afraid I might have to rollback all the changes for this commit...
Or you could offer two separate solutions. The old (current) system for things like GUI stuff and the font thing for chat and other places that support JSON and custom font. My initial idea was for those specific places, so that the unicode stuff could be utilized for other stuff (Have more available icon spaces for GUI and alike) while the custom font would be mainly utilized for stuff that mainly works on chat or JSON-based stuff anyway.
The amount of characters is not really a problem (at least for me) since ItemsAdder allows ~6608 characters to be added to the game, and I can even increase this amount.
My initial idea was for those specific places, so that the unicode stuff could be utilized for other stuff
Depends what you need to do, currently it's easier to manage the characters which have a custom font by directly creating the files manually: https://itemsadder.devs.beer/plugin-usage/adding-content/advanced/font-images/alternative-font-file
Hi :) could I still use this experimental feature? I could not find the configuration part of this option.
This was removed because of how resource intensive it was and had too many downsides. Read more here: https://itemsadder.devs.beer/old/deprecated/alternative-font-file#downsides-and-upsides
Got it, thanks for reply :)
Describe the solution you'd like
Use another font (1.16.5+) to display emojis to avoid having to use "Force Unicode: Off".
Introduce a new attribute for font_images
font_name
which will create a new font and will register the font_image in this font (basically will act as a group). The default value of this attribute would be (for example)custom
.Warning: test what happens if this feature is used on clients and on servers which are < 1.16.5.
Is your feature request related to a problem?
Having to use "Force Unicode: Off" to see emojis and other font_images.