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 white space detection #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JasperSurmont
Copy link

I noticed the white space detection was applying too little. This was happening because:

  • We want to add a space whenever the x position (left) of the current symbol is greater than the end x position (right) of the previous symbol
  • The cx variable contains the width of the previous symbol
  • The x variable contains the x position + the width of the previous symbol
  • In the if check, we add an additional cx to x, which basically means we are adding the width twice.

I removed this double check.

@JasperSurmont
Copy link
Author

Pinging @deluan as a reminder 😄 let me know if something is wrong in my thought process here.

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

Successfully merging this pull request may close these issues.

None yet

1 participant