Using the `font` setting in books breaks text links & is not applied everywhere
DaFuqs opened this issue · 3 comments
I guess those are two separate issues, but since they are closely related I put them in a single report.
For my book I chose to use the builtin minecraft:uniform
font, instead of the default one in Modonomicon, by setting the font
property in the book.json
.
While this worked for the most part, it also broke a few things.
Having a fix for 1.20.1 would be great. <3
I can help with the backport, of course.
Describe the bugs
- When using a custom font, links are not rendered where they should be
- Bullet points and numbered lists do not have the set font applied
To Reproduce
Steps to reproduce the behavior:
1.Modify an existing book by adding "font": "minecraft:uniform"
to the book.json
3. Launch the game
4. Open the guidebook ingame
5. Hover over various links in the books. Notice the links are all there, but are offset somewhere else compared to where the text is actually rendered
6. View a list that uses bullet points / numbered lists. Notice the set font is not applied
Expected behaviors
- The font being applied everywhere
- The links showing up at the matching spot for the font
Screenshots
The link overlay is not always rendered where it should be | The bullet points still use the default font |
---|---|
System (please complete the following information):
- Modonomicon Version: 1.73.0
- OS: Windows
- Minecraft Version: 1.20.1
Thanks for reporting!
The link offset might be tricky to fix (at first glance) because I am using some vanilla functionality for that, but maybe I can add some sort of "translation" code (or maybe I made some assumptions that do not hold true for all fonts, I don't remember the implementation details).
I'll try to look at that on the weekend
Tunrs out the link hover detection was broken on all fonts because scale was taken into account in the wrong way. Fix for both incoming!