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

[BUG]: Variable-width fonts wrap at wrong location #3698

Closed
davidstone opened this issue May 20, 2022 · 1 comment · Fixed by #3790
Closed

[BUG]: Variable-width fonts wrap at wrong location #3698

davidstone opened this issue May 20, 2022 · 1 comment · Fixed by #3790
Assignees
Labels

Comments

@davidstone
Copy link

Describe the bug

If you set the font to a variable-width / proportional font instead of a fixed-width / monospace font, word wrapping occurs as though the font were a fixed-width font.

Note that VS Code had the same bug:

The conclusion was that they added a setting to make word wrapping work properly with variable-width fonts -- "editor.wrappingStrategy": "advanced".

Steps to reproduce

  1. Visit godbolt.org
  2. Go to Settings -> Editor -> Desired Font Family in editors
  3. Change font to Verdana
  4. Check Enable Word Wrapping
  5. Write a long line in the source editor (all 'l' will wrap too early, all 'W' will wrap too late and add horizontal scroll)

Expected behavior

Word wrapping should be based on actual character length, not number of characters

Reproduction link

Not applicable

Screenshots

image

Operating System

No response

Browser version

No response

@jeremy-rifkin
Copy link
Member

Thank you for the detailed bug report!

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

Successfully merging a pull request may close this issue.

2 participants