Open art0007i opened 1 week ago
characters in a font can define how far away the next character should be. but text alignment ignores this
This sounds like it may be a duplicate of #204 if I'm understanding your issue correctly, @art0007i?
characters in a font can define how far away the next character should be. but text alignment ignores this
This sounds like it may be a duplicate of #204 if I'm understanding your issue correctly, @art0007i?
it's similar but not quite the same. #204 is about kerning - which determines the spacing between letters - being wrong, but it seems to be about a specific type of kerning not being processed correctly. This issue is about kerning of any kind being completely ignored in favor of character bounds when aligning text horizontally (and vertically when in Geometric alignment mode, but that's intended)
It might help to add some screenshots to this.
This is however a duplicate of #770, just that this issue describes the cause and not the symptom (as monospaced fonts just illustrate the issue more clearly and aren't the cause)
that issue also has screenshots explaining it, so I'll copy them here:
here's a pic. both sprites have the same advance but the bottom one doesnt care
it's not related to kerning at all
As far as I understand it advance width is kerning, just a very primitive type of kerning where characters are put in a row with the distance between them dictated by the prior character's advance width. This is the same issue as in #770 of alignment being done based on bounding box, since advance width does not contribute to the bounding box unless it's affecting another character's position
This doesn't look like a kerning issue to me. Advance isn't the same thing as kerning.
Kerning is specifically affecting particular types of characters, adjusting their relative position to each other, rather than using monotone advancement.
E.g. consider letters "VA" vs "VV". The V and A are closer together, because kerning modifies the advancement for that particular pair because of their shapes that fit together.
Describe the bug?
characters in a font can define how far away the next character should be. but text alignment ignores this
To Reproduce
spawn this in: resdb:///316e8b6978bafdf633d68e45e0b7f95345a55f6103c96b3111b1a9f951b739d6.brson the top half has an extra letter appended and there the advance is working correctly the bottom half is the same as the top but no extra letter and it ignores the advance completely
Expected behavior
the text renderer takes advance into account when aligning text
Screenshots
No response
Resonite Version Number
Beta 2024.9.6.1189
What Platforms does this occur on?
Windows
What headset if any do you use?
No response
Log Files
n/a
Additional Context
No response
Reporters
No response