Notepads icon indicating copy to clipboard operation
Notepads copied to clipboard

[Bug] Space width in Fantasque Sans Mono incorrect

Open sawyersteven opened this issue 3 years ago • 2 comments

Describe the bug Using Fantasque Sans Mono font found here: https://github.com/belluzj/fantasque-sans

When pressing Enter to go to a new automatically-indented line, the indent is made of skinny space characters and the indent is wrong. The number of spaces is correct (4 in my case), but the indent isn't. The character used is the normal U+0020 character, so it must be something in the rendering of an auto-indented line.

I use this font in VSCode and it doesn't have this problem, nor do I have this problem with Courier in Notepads, so I'm assuming there is something keeping Fantasque and Notepads from agreeing with each other.

To Reproduce Set your font to Fantasque Sans Mono (size doesn't seem to matter). Type a line of text indented however much you like. Press enter to go to the next line.

Expected behavior Not any of the things I said above.

Screenshots https://imgur.com/a/RyRlD10

As you can see in the status bar, 4 characters are selected but the line is not indented 4 full character widths.

Desktop (please complete the following information):

  • OS: Windows 11 10.0.22000 Build 22000
  • Version 1.4.6.0

sawyersteven avatar Feb 01 '22 20:02 sawyersteven

Can confirm this is happening with Source Code Pro and any other "custom" monotype font as far as I could test aswell. The only fonts that are working ok for me are Consolas and Courier. I haven't checked the source code yet, but may it be that when we press Enter the two (or four) spaces that Notepads automatically adds at the begining of the new line are being formatted with Consolas or Courier font instead of using the configured one?

lucas-labs avatar Feb 02 '22 07:02 lucas-labs

This is a known issue, and it comes with the original winrt rich eidt control. I have tried to fix it but no luck yet...

0x7c13 avatar Apr 09 '22 00:04 0x7c13