when I switch the font to JetBrains Mono SemiBold, the default font size causes the cursor position to be abnormal. However, when I switch the font size to 13, 15, or other sizes, the cursor position returns to normal.
Additional note: After restarting my computer and reopening the software, the cursor position became abnormal again. Adjusting the font size resolved the issue.
Hey, this is a known issue with how the editor Monaco and VS Code measures character widths for monospaced fonts. Some font plus size combos cause subpixel rounding differences, so the cursor position shifts.
A couple of workarounds:
Use JetBrains Mono Regular instead of JetBrains Mono SemiBold. Regular is more likely to be detected correctly.
Use font size 13 or 15, like you already found.
Try adding this to settings.json: "editor.fontWeight": "600" instead of using SemiBold in the font name. Sometimes that helps.