Text Editor: Default font not always applied

Advertisement

IaguCool
Joined:
Posts:
4

Text Editor: Default font not always applied

I'm using WinSCP 5.21.7, with the default font set in Settings -> Editors -> Internal editor (Consolas, 11 pt) with Default encoding set to UTF-8.
It's a monotype font, so I expected to see it across all Windows of the internal editor, but that's not the case.
When a file starts with certain characters, the editor changes to some other non-monotype font that makes it hard to read the file (a log file in my case).

I'm using characters from the Extended ASCII to make a header:


Once I change the first character to, let's say, "X", the font is correct:


Point to mention: while the incorrect font is showing, if I click the Settings icon in the editor and change the font size to anything else, then once I close the Settings window, the correct font will be applied, until I close and reopen the file.
Last edited by IaguCool on 2023-02-16 09:19; edited 1 time in total

Reply with quote

Advertisement

martin
Site Admin
martin avatar

I've tried it with your files. Both in local and remote panels. But I cannot reproduce the problem. What version of Windows are you using? What is your Windows UI language? Default Ansi code page? Your reginal settings? Keyboard language and layout?

Reply with quote

Advertisement

IaguCool
Joined:
Posts:
4

Interestingly, I can't reproduce that same issue either, although I didn't change anything.
Still broken but now regardless of first character:

Font set to Consolas, 12 pt
Default encoding set to UTF-8
Default background: Black

File opened:

Color changed to white via toolbar:

Color changed back to black via toolbar:

Clearly it doesn't render properly the first time.
Note: Changing the encoding back and forth from toolbar or settings doesn't make it show properly. Either changing color from toolbar/settings or font from setting do.

Windows version: Windows 10 Enterprise LTSC 21H2 (19044.2604)
Windows UI language: English (US)
Regional format: English (US)
Keyboard language and layout: English (US) QWERTY
UI scale: 100%
Resolution: 1920x1080 (native)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Thanks for all your tests.
It seems to be a (imo badly implemented) feature that helps displaying Asian scripts correctly:
Rich text box replaces default Monospaced font for Box-drawing characters with Variable-width font
I'm not sure what to do about it now. It would probably have to be configurable. Some (like you) want it off, but some would probably want it on. Not sure what the default should be, probably on, as it was until now – you are the first one to complain :)

Reply with quote

IaguCool
Joined:
Posts:
4

Having worked with C# for so long it's the first time I'm hearing about IMF_AUTOFONT.
Learning something new every day... thanks a lot for taking interest. Hope a toggle for that is planned, but not a dealbreaker in any sense otherwise.
As for "you are the first one to complain", well, I guess box-drawing is not so popular, idk. :D

Reply with quote

Advertisement

You can post new topics in this forum