Windows 11: wrong look of ExtraLight font in some UI places

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Windows 11: wrong look of ExtraLight font in some UI places

Post by *Slavic »

There are two fonts in Windows 11 which can have ExtraLight style: Cascadia Code and Cascadia Mono. These fonts are new, they are supposed to be used in programming UI instead of "classic" monospaced fonts like Courier New or Consolas. Microsoft added an option to choose the ExtraLight style for these fonts in the Font selection dialog.

However, TC cannot now correctly reproduce this style (all other more weighted styles like Light, SemiLight etc are shown well). I tested this font for file list because using the monospaced font here may have some advantages.

How to reproduce:
1. Go to Configuration, Font, File list font, press Change font to show the Font selection dialog.
2. Select the font Cascadia Code and style ExtraLight (first in the style list), size like you wish (10 for example), OK.
3. You may notice that the example below the section shows this font incorrectly: for example, ExtraLight 10 is shown much more thick approximately as SemiLight 11, unlike the sample in the Font selection dialog.
4. Press Apply in the Configuration dialog. The file list in TC panels is now shown using Cascadia Code ExtraLight 10 as selected, but the line below the list (with directory info) is shown with much bolder version of this font.
5. Return to the Font selection dialog and change to Cascadia Code, Light, 10. OK, Apply. Now the selected font style is shown correctly.

I suppose that it's not entirely Windows 11 bug because at least the File list can use the ExtraLight style properly. Maybe the code fragments which show the text lines in different parts of TC UI have some small, but critical difference.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Windows 11: wrong look of ExtraLight font in some UI places

Post by *ghisler(Author) »

Total Commander currently only supports two font styles: normal and bold. Bold is indicated by ",b" after selecting a font. There are some fonts where normal, bold etc. are stored in separate font files named differently. Here TC indicates that it wants to get the "normal" variant. This usually works fine, but seems to fail with this specific font.
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Windows 11: wrong look of ExtraLight font in some UI places

Post by *Slavic »

I performed some additional researches of the situation with Cascadia font family. I suppose that this font will be used more extensively in the near future in programming environments, so it would be reasonable to take it into account. Development page on GitHub: https://github.com/microsoft/cascadia-code

It is included in Windows 11 with the new Terminal app. Interestingly, it is not listed in the "traditional" place as Control Panel, Fonts, but can be seen in Settings, Personalisation, Fonts. Location in Windows 11:
C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe\

Regular and Italic styles use different files; inside a single file the different weights (from ExtraLight to Bold) are the built-in properties, so the font listed in UI as Cascasia Code SemiLight is in fact the Cascadia Code with weight 350 (slightly lower that regular 400). Windows 11 correctly converts the font names internally. ExtraLight is an unusually thin style with weight 200, apparently such low value was never used in Windows before. This may be a possible source of problem; but it should be investigated separately.

I tried to switch TC UI to Cascadia entirely (in 3 places), using size 10 for tests. It looks properly from Light to Bold; there may be some problems with auto-configuration of columns width in the file list like Date column (not enough wide), which can be easily fixed manually. However, attempt to use ExtraLight style failed in all UI parts except the File list.
TC correctly stores this font in configuration wincmd.ini:

Code: Select all

FontSize=10
FontName=Cascadia Code ExtraLight
FontSizeWindow=10
FontNameWindow=Cascadia Code ExtraLight
FontWeight=200
FontWeightWindow=200
FontNameDialog=Cascadia Code ExtraLight
FontSizeDialog=10
...
FontWeightDialog=200
(the properties are not strictly grouped, but it shouldn't be a problem)
So, I can conclude that while the TC function which shows the file list can use this style correctly, all other functions (maybe a single one) used in other UI parts do fail. Some internal tests and/or debugging may help to get to the root of this.

Unfortunately, the situation with Lister is significantly worse.
Lister uses different internal approach to fonts, it stores them in old style (b=bold, i=italic) and uses the size in pixels instead of points. As a result, the regular Cascasia Code 10 is listed as Cascasia Code, -13, D96; Cascasia Code SemiLight 10 as Cascasia Code SemiLight, -13, D96 etc. Similarly to TC, Lister can correctly show the styles from Light to Bold (including all Italic variants, which TC does not support) and failed to show the ExtraLight style.

But the main problem is, while Lister can store the selected style in configuration and use it later, it is unable to show the saved font and style in the Font selection dialog. Only the Regular, Italic, Bold and Bold Italic styles are recalled properly, any other style results in empty font name and one of the standard font styles.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Windows 11: wrong look of ExtraLight font in some UI places

Post by *ghisler(Author) »

Total Commander 10.5 beta now supports ExtraLight fonts like Cascasia Code ExtraLight, please test it!
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Windows 11: wrong look of ExtraLight font in some UI places

Post by *Slavic »

On Windows 11 builds 22000.652, Cascasia Code ExtraLight from 8 to 18 points looks well in font selection UI and main UI. Thanks!
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Windows 11: wrong look of ExtraLight font in some UI places

Post by *ghisler(Author) »

Thanks for testing! Supporting this was a lot of work, and there may still be locations where it doesn't look right. Please let me know if you find such a location.
Author of Total Commander
https://www.ghisler.com
Post Reply