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

fix(caret): jumping in word tape mode and other issues (@NadAlaba) #5726

Merged
merged 23 commits into from
Aug 8, 2024

Conversation

NadAlaba
Copy link
Contributor

@NadAlaba NadAlaba commented Aug 4, 2024

Description

  1. In word tape mode, caret jumps forward if first letter of a word was typed before the tape finished scrolling back (In the gif below, the letter "c" in "come" was typed before the word finished scrolling back to center, so the caret jumped to the letter "e" before even the "o" was typed).
    This happens because the caret was referencing letters' positions while they were changing.
    tape
  2. When a full width caret is at a zero-width character (e.g, a diacritic), that has a preceding letter that is also zero-width, the caret's width gets set to the last letter's width (which might be wider than it should be like in the gif below).
    width
  3. In blind mode or hide extra letters in RTL languages, caret of extra letters is getting positioned at the last letter instead of at the space after last letter.
    extra
  4. In non-monospaced fonts, the caret at the space between words may be narrower or wider than the actual space (because it gets its width from the width of last letter).
    Now, space width is getting calculated, so that the caret don't depend on the letters' width.
    space

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Aug 4, 2024
@NadAlaba NadAlaba marked this pull request as draft August 6, 2024 11:41
@NadAlaba NadAlaba marked this pull request as ready for review August 6, 2024 12:33
@monkeytypegeorge monkeytypegeorge added the backend Server stuff label Aug 8, 2024
@monkeytypegeorge monkeytypegeorge removed the backend Server stuff label Aug 8, 2024
Copy link
Member

@Miodec Miodec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Miodec Miodec merged commit 657d305 into monkeytypegame:master Aug 8, 2024
10 checks passed
@NadAlaba NadAlaba deleted the fix-caret branch August 8, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend User interface or web stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants