Font request for Plugin Writers: MS Shell Dlg

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
ono
Junior Member
Junior Member
Posts: 52
Joined: 2003-12-22, 11:37 UTC
Location: Zurich Area, Switzerland

Font request for Plugin Writers: MS Shell Dlg

Post by *ono »

Hello,

I would like to ask all of the actual or upcoming plugin writers to update their GUIs to use MS Shell Dlg along with DS_FIXEDSYS (or DS_SHELLFONT) windows style bits instead of MS Sans Serif.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_4qcn.asp

Beware that MS Shell Dlg is NOT a font face name but a font mapping existing on any Windows system which is by default MS Sans Serif for all < Win2000 systems, but on Win2k or prior it's by default Tahoma so Serif is not valid anymore for them.
Moreover.. depending on currently chosen font in GUI settings (skin) it could be any other font.

I'm aware that this is mostly caused by bad design of old Delphi releases and MS Dev Studios that put MS Sans Serif on newly created dialog boxes. However new MS Devs .NET & Delphis put MS Shell Dlg.

BTW. Also small request for Mr.Ghisler -> It would be also nice also that TC could use MS Shell Dlg system default instead of MS Sans Serif if the font is not set. Also this "bug" exists in TC installer using Serif.

You can retrieve real font face name mapped to MS Shell Dlg using key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\FontSubstitutes

* changed after discussion

Regards,
Last edited by ono on 2005-08-25, 11:31 UTC, edited 3 times in total.
TC Personal license #99581
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Oh , YEEEEEEESS !

Post by *Clo »

2ono
:D Hello !
¤ I agree one thousand times ! Thank you very much to point out this issue which causes many annoyances in the translations, as well for plugins, as for TC itself !
¤ Just an additional small trick : under Win 9x, it's simple to change the font-substitute in <win.ini> for "MS Shell Dlg". Needs to reboot the PC, though…
¤ Further, there are benefits for the programmers too in using a complete font, like I pointed out there a loooong while ago ;)

:mrgreen: Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

BTW. Also small request for Mr.Ghisler -> It would be also nice also that TC could use MS Shell Dlg system default instead of MS Sans Serif if the font is not set. Also this "bug" exists in TC installer using Serif.
TC now uses "Microsoft Sans Serif" where supported, because this font supports many more characters also from other code pages than "MS Sans Serif".
Author of Total Commander
https://www.ghisler.com
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

More flexible

Post by *Clo »

2ghisler(Author)
TC now uses "Microsoft Sans Serif"…
:) Good evening !
- Alas, this font doesn't exist under Win9x… Hence, the ono's solution seems more flexible and universal…
- I don't know if setting a substitute in <win.ini> could work ?

:mrgreen: m.f.G.
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Clo

That's why I wrote:
where supported
Author of Total Commander
https://www.ghisler.com
ono
Junior Member
Junior Member
Posts: 52
Joined: 2003-12-22, 11:37 UTC
Location: Zurich Area, Switzerland

Post by *ono »

But why then not use MS Shell Dlg where possible ??? As it is always mapped to system font (current locale best one), also it should be valid also for plenty codepages.
Moreover (compering to MS Shell Dlg mapped to Tahoma on W2k & prior) the MS Sans Serif is not vector font, so it is not working with ClearType and antialiasing ... finally looking crappy on LCD screens. And again MS Sans Serif IS NOT system font on Win2k or newer Windows systems.

So IMO the MS Shell Dlg is only one valid in any case. And such plugins like Imagine or TCBurner should switch to MS Shell Dlg :)

BTW. Overall it's now mostly the Delphi programmers tendency to use this MS Sans Serif :evil:, because recent MS dev tools use Shell Dlg font.

Regards,
TC Personal license #99581
nyam
Member
Member
Posts: 175
Joined: 2003-06-09, 11:55 UTC
Location: Seoul, Korea
Contact:

Post by *nyam »

2ono

Good sugestion.
But I had a problem.
ono wrote: Moreover.. depending on currently chosen font in GUI settings (skin) it could be any other font.
I changed the dialog font at desktop setting in Windows 2000.
But MS Shell Dlg remains as 'MS Sans Serif'.

And the dialogs created with 'MS Shell Dlg' are always 'MS Sans Serif'.
ono
Junior Member
Junior Member
Posts: 52
Joined: 2003-12-22, 11:37 UTC
Location: Zurich Area, Switzerland

Post by *ono »

Aha.... you're right... Sorry I ommited very important DS_SHELLFONT flag :(

Take a look at MSDN documentation:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_4qcn.asp

So it seems that you're also obliged to specify DS_SHELLFONT style for your dialog boxes along with "MS Shell Dlg". This style bit will be only recognized by Win2k or prior systems and then mapped to "MS Shell Dlg 2" ! Which in this case is "Tahoma", so the font you see in all the W2k interface. If not on > W2k "MS Shell Dlg" will be mapped to "Microsoft Sans Serif" which in this case is not the one we want ! (Even it's TT font)
Sice Win9x is not recognizing those style bits they will use this "MS Sans Serif" mapping and it goes OK.

I must confess this is really crappy solution from M$.
For the dialog templates it's not so bad.
But what should be then fine solution for the TC main interface when there're no dialog fonts set ?? Use "MS Shell Dlg" mapped font on Win9x & NT and "MS Shell Dlg 2" one on Win2k >= .
I'm really confused now :evil:
nyam wrote:I changed the dialog font at desktop setting in Windows 2000.
IMO those settings are just for the Message Boxes.. rest of interface is sticked to "MS Shell Dlg" or "MS Shell Dlg 2" and those ones makes system font.

Moreover it seems that there's no build-in mechanism to change font for the Windows UI elements like it's on KDE or GNOME, since "MS Shell Dlg 1 & 2" affects only those apps using this mapping and it affects all system (so it cannot be variable for selected user).

Well I start to hate Windows UI design :?

Regards,
TC Personal license #99581
Post Reply