-
-
Notifications
You must be signed in to change notification settings - Fork 77
Fix incorrect calc width in WrapTextSegment #997
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
base: dev
Are you sure you want to change the base?
Conversation
|
Could you please share some more comparison screenshots of other wrapped text in Blish HUD (and perhaps in a module or two)? I want to make sure this doesn't look weird with anything existing. |
|
While this seems to fix the issue well enough, I think it does make sense to implement a custom
|
|
@KirillSerogodsky Thank you for this! I do think that this is an important thing for us to address. I was looking into this as well and I think @Flyga-M is right about a custom MeasureString method. I did some testing with a custom extension that utilizes XAdvance instead of visual bounds. I think it also eliminates the built-up errors mentioned in #998. Would you be open to letting me push a commit to your branch with these changes (I still want your name on the PR). And thanks @Flyga-M for the detailed breakdown in #998! I'm especially excited because, in my testing, it fixed numerous alignment issues with our textbox controls! In fact, the textbox controls currently have some built-in alignment offsets to try to compensate for the previous errors and now those offsets can be removed once this is implemented! 😄 |



























MeasureString incorrectly calculates space width.
GameService.Content.DefaultFont16.MeasureString(" ").Width= 3there's no problem with
GameService.Content.DefaultFont16.MeasureString("_").Width= 21Discussion Reference
No
Is this a breaking change?
No