Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for decorated font glyphs #11

Open
ardunaline opened this issue Apr 15, 2024 · 2 comments
Open

Add support for decorated font glyphs #11

ardunaline opened this issue Apr 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ardunaline
Copy link

Right now, you can use font.translate to get text of any size, position, and color. My idea is to also be able to get decorated text, such as bold/italic/etc. Protocol lib could even be used to achieve animated text.

@Brikster Brikster added the enhancement New feature or request label Apr 15, 2024
@Brikster
Copy link
Owner

That's a good idea, but I have to solve the problem with characters' width calculation for decorated text. I take the width from the font texture for plain text, but for decorated text I need to use some unknown coefficient. I don't think that there's a trivial solution.

@ardunaline
Copy link
Author

ardunaline commented Apr 15, 2024

I'm pretty sure there is an alternative font entirely for bold minecraftia
https://fonts2u.com/minecraft-bold.font

idk about italic tho, but surely underline is also possible!

On second research, this bold font doesn't exist in ascii.png
It looks like what the game does is just duplicate the pixels by 1 pixel to the right
image
so it would be just 1 pixel longer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants