Open thejupitergroup opened 4 weeks ago
Hello @thejupitergroup :)
Make sure the font you've created is a real monospace font. Next, in the Monaco Editor options, modify letterSpacing or turn off fontLigatures to correct the alignment of the cursor:
If the issue persists, switch to a reliable monospace font like "Consolas."
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
The Playground Link
Monaco Editor Playground Code
JS:
HTML:
CSS:
Reproduction Steps
We were loading a custom font a code editor we wanted to create. When we entered the URL and changed the font in the CSS file, the cursor would be gradually misplaced in the Monaco editor, both in the playground and on our website.
Actual (Problematic) Behavior
When the custom font gets loaded, as the user moves right in a line (or farther away from the left size of the editor) their cursor would start to become misaligned. It is the worst on desktop (Win11) but also happens a bit on mobile. We have tried a few other fonts and the text cursor still does the same thing.
Expected Behavior
The cursor should stay aligned with the text, no matter what font.
Additional Context
No response