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 behaviour has regressed #84

Open
xenomote opened this issue Mar 20, 2024 · 2 comments
Open

Text behaviour has regressed #84

xenomote opened this issue Mar 20, 2024 · 2 comments

Comments

@xenomote
Copy link

When running the typewriter example I noticed that the behaviour of the ext/text/Text type has regressed from the original pixel repository. It from looking at the git blame it seems most that this introduced by the changes @roipoussiere made here:

pixel/ext/text/text.go

Lines 261 to 262 in 2298e16

offset := txt.Orig.Sub(txt.Bounds().Max.Add(txt.Bounds().AnchorPos(txt.anchor.Opposite())))
txt.mat = pixel.IM.Moved(offset).Chained(txt.mat)

Because of this regression it is no longer possible to accurately position text by setting the txt.Dot vector to the desired position

@bhperry
Copy link
Contributor

bhperry commented Aug 29, 2024

Thank you for the report. I do see the issue you're describing, the typewriter seems to slowly drift away from the text the more you type.

Reverting this change does seem to fix the typewriter, but it's not yet clear to me what that was addressing in the first place.

@bhperry
Copy link
Contributor

bhperry commented Aug 29, 2024

Original PR for reference: faiface/pixel#252

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

No branches or pull requests

2 participants