KodeZwerg 54 Posted May 9, 2021 Good day everone! I did opened this https://quality.embarcadero.com/browse/RSP-33937 to have Segoe UI (Windows Vista+) as Default Font instead of Tahoma (Windows XP) Stay healthy! 1 Share this post Link to post
Lajos Juhász 293 Posted May 9, 2021 52 minutes ago, KodeZwerg said: Good day everone! I did opened this https://quality.embarcadero.com/browse/RSP-33937 to have Segoe UI (Windows Vista+) as Default Font instead of Tahoma (Windows XP) Stay healthy! Did you filled a bug report also with Microsoft? Delphi uses HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes\MS Shell Dlg 2 on my Windows 10 that's still Tahoma. 1 Share this post Link to post
KodeZwerg 54 Posted May 9, 2021 You can read what Microsoft write in this link. Quote Win32 or WinForms / Windows Vista or later = Use the appropriate Segoe UI font. Quote Extensible components or pre-Windows Vista = To target Windows XP and Windows 2000, use the 8 point MS Shell Dlg 2 pseudo font, which maps to Tahoma. To target earlier versions of Windows, use 8 point MS Shell Dlg pseudo font, which maps to Tahoma on Windows 2000 and Windows XP, and to MS Sans Serif on Windows 95, Windows 98, Windows Millennium Edition, and Windows NT 4.0. Using "MS Shell Dlg 2" pseudo font is to be backward compatible i guess. (Would be fatal if from now on that HKEY would lead to Segoe UI, font size would not match on old applications....) Feel free to use the classic Windows XP way, my wish is to be more modern and not support Windows XP. 2 Share this post Link to post
Anders Melander 1782 Posted May 9, 2021 Voted. I've been using the following work around in the dpr file for ages: if (CheckWin32Version(6, 0)) then // Application.DefaultFont is the font used when TForm.ParentFont=True. // It is Tahoma by default but should be Segoe UI on Vista and later (according to MS UI guide lines). // See InitDefFontData() in graphics.pas Application.DefaultFont.Assign(Screen.MessageFont); And I have ParentFont=True on all forms. 2 Share this post Link to post
KodeZwerg 54 Posted May 9, 2021 55 minutes ago, Anders Melander said: Voted. I've been using the following work around in the dpr file for ages: if (CheckWin32Version(6, 0)) then // Application.DefaultFont is the font used when TForm.ParentFont=True. // It is Tahoma by default but should be Segoe UI on Vista and later (according to MS UI guide lines). // See InitDefFontData() in graphics.pas Application.DefaultFont.Assign(Screen.MessageFont); And I have ParentFont=True on all forms. Thank you for voting, here is my workaround way to have it scaled properly: procedure ApplyFontAndScale(aForm: TForm); var OldSize : Integer; Font : TFont; begin OldSize := aForm.Font.Size; if Screen.MessageFont.Size <> OldSize then begin Font := TFont.Create; try Font.Assign(Screen.MessageFont); Font.Size := OldSize; aForm.Font := Font; finally Font.Free; end; aForm.ScaleBy(Abs(Screen.MessageFont.Size), Abs(OldSize)); end else aForm.Font := Screen.MessageFont; if aForm.BorderStyle <> bsSizeable then begin if aForm.Height > Screen.WorkAreaHeight then aForm.ScaleBy(Screen.WorkAreaHeight, aForm.Height); if aForm.Width > Screen.WorkAreaWidth then aForm.ScaleBy(Screen.WorkAreaWidth, aForm.Width); end; end; calling within OnCreate event. Share this post Link to post
pyscripter 689 Posted May 9, 2021 4 hours ago, Anders Melander said: And I have ParentFont=True on all forms This does not work in per-Monitor DPI-aware applications. Share this post Link to post
Vincent Parrett 750 Posted May 10, 2021 3 hours ago, pyscripter said: This does not work in per-Monitor DPI-aware applications. Correct, it completely disables dpi scaling. Also doesn't work when using VCL Themes - seems to have zero effect. The Bitmap Style designer allows you to specify fonts for the individual elements, and I tried changing those in my themes, but again, seems to have no effect. Share this post Link to post
Vincent Parrett 750 Posted May 10, 2021 With Vcl Themes, setting the font on the form in code works (assuming parentfont is set on all the controls). That said, I'm not sure I like Sego UI any better than Tahoma - I think Tahoma has better character spacing which makes it more readable.. especially with smaller font sizes. Share this post Link to post
Lars Fosdal 1791 Posted May 10, 2021 Then there is this: https://www.microsoft.com/en-us/microsoft-365/blog/2021/04/28/beyond-calibri-finding-microsofts-next-default-font/ Share this post Link to post
Stano 143 Posted May 10, 2021 https://www.xda-developers.com/microsoft-has-new-windows-10-build-refreshed-segoe-ui-font/ 1 Share this post Link to post
KodeZwerg 54 Posted May 10, 2021 4 hours ago, Stano said: https://www.xda-developers.com/microsoft-has-new-windows-10-build-refreshed-segoe-ui-font/ Hopefully that should give the doubters enough courage to vote 👍 Share this post Link to post