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

Text wrapping causes multi-line text to jiggle #99

Open
Robadob opened this issue Aug 17, 2022 · 0 comments
Open

Text wrapping causes multi-line text to jiggle #99

Robadob opened this issue Aug 17, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Robadob
Copy link
Member

Robadob commented Aug 17, 2022

Need to take a look at the text placement algorithm (again).

I have been noticing that in certain circumstances, where there are multiple lines of (left aligned?) text (e.g. the Debug menu), if a line is regularly updating, the following line may jiggle left and right (e.g. two agent types listed in Debug menu, and the upper one has a changing population count). It would appear that Freetype may be tweaking the size of a character, based on the proceeding word (or there's some more naïve bug in the algorithm).

It would be logical that kerning is to blame, so may need to rekern characters after wrap?

FT_Get_Kerning(font, previous, glyphs[i].index, FT_KERNING_DEFAULT, &delta);

@Robadob Robadob added the bug Something isn't working label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant