Could you explain why this is necessary. I thought the new default font would be used only if there is no existing font settings or font-dependent settings like tab settings.the tab widths would get unpredictable. Segoe UI 9 gives similar widths as Microsoft Sans Serif, 8.
-[8.5b4] Reverting to old default font
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The problem is that I need to use some kind of default tab widths for new installations, and for the case that the user hasn't saved the font. They are stored as multiples of the font's average character width.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Average text width of the system font (and other fonts) can be obtained by using GetTextMetrics function - see tmAveCharWidth member of TEXTMETRIC structure.
So TC could use system font, unless it's too wide.
So TC could use system font, unless it's too wide.
I don't get it. When I test TC with different fonts, by starting it with ini containing only:
it has no problem setting correct column widths, no matter how crazy font I use. In this case "correct" means that the contents (extensions, dates, ...) fits correctly. Sometimes not all columns fit in panel, when the font is too big/wide, but if there isn't enough space, then there simply isn't enough space, period.
Where exactly is the difference between this (any custom font) and system font? It's just the matter of where TC gets it from.
When I run this simple program below (binary and source included), it shows me Tahoma for Classic theme, Courier Sans MS when I select it as system font, Segoe UI for standard Aero, or for some third-party Aero theme the name of its font (some strange one I never heard before). It's what TC needs (size is there too), or am I missing something?
Code: Select all
[AllResolutions]
FontSize=<size>
FontName=<name>
Where exactly is the difference between this (any custom font) and system font? It's just the matter of where TC gets it from.
When I run this simple program below (binary and source included), it shows me Tahoma for Classic theme, Courier Sans MS when I select it as system font, Segoe UI for standard Aero, or for some third-party Aero theme the name of its font (some strange one I never heard before). It's what TC needs (size is there too), or am I missing something?
Code: Select all
MIME-Version: 1.0
Content-Type: application/octet-stream; name="sysfont.7z"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="sysfont.7z"
N3q8ryccAANJmyC8ewMAAAAAAAAjAAAAAAAAABuWF5zgAdgBTl0AEZkIpoKZuMWHIx0UR9T27rMG
6qNBU0V4NlAdeKeBw9XMAxHb7PHz2xmhMJqlFbmHQ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