-
Notifications
You must be signed in to change notification settings - Fork 20
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
Coin icon covering text #108
Comments
Unfortunately I don't think this issue is a great concern for us, given that ModernUI explicitly causes it - please report it to them instead. This is also more likely to lead to a solution, as they will be much more familiar with the modifications they make to text rendering code, whereas we would need to first reverse-engineer their implementation I'll leave this issue open for now until we hear from them, but we won't be actively looking into it Cheers |
This is a common problem, your code assumes incorrect text layout: Lines 53 to 56 in a5b5078
Modern UI has a Complex Text Layout Engine, the width of space characters depends on FreeType scaler and TrueType designer, and it's context-aware. Thus, you may write a helper method kinda like this, if you want to provide reliable indentation: // in yarn namespace
static String indentation(TextRenderer tr, int indent) {
var str = " ";
while (tr.getWidth(str) < indent) str += " ";
return str;
} Notably, you shouldn't measure a single space character and do division. Firstly, |
Fixed as of 0.2.12 for 1.20.1 and 1.20.2 |
When using numismatic with modernui the coin icon partially covers the number,
The text was updated successfully, but these errors were encountered: