Author Topic: How to fix oversized font problem with 1.29?  (Read 1052 times)

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 714
How to fix oversized font problem with 1.29?
« on: February 21, 2021, 22:29:20 »
After upgrading from 1.28.xx to 1.29.07.00, text in many UI controls no longer fit in their reserved space (example as attachment) and couldn't figure out any setting to affect this; any ideas to try? Running on Win 8.1 with 1920x1080. The same happens with Win32 build from trunk. Looks similar to https://forum.openmpt.org/index.php?topic=6467, HighResUI is 0.

Edit: changing size of "Message boxes"-font from 11 -> 9 from Control Panel\Appearance and Personalisation\Display fixed the issue - interesting that such font affects OpenMPT's pattern editor row fonts among others. But since this has system-wide effects, a OpenMPT-specific solution would be nice.
« Last Edit: February 21, 2021, 23:05:35 by Relabsoluness »

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,316
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: How to fix oversized font problem with 1.29?
« Reply #1 on: February 22, 2021, 20:37:34 »
Hi Ahti, long time no see. :)
OpenMPT was previously using a deprecated API call for determining the system font that is used by CMainFrame::GetGUIFont(). I'm not sure why that call would have returned a smaller font, maybe it was to support legacy applications better. With the new call, the font used in various places (such as the order list and pattern editor) is now consistent with all the other dialog fonts. I wasn't aware that this font could still be configured separately from the general GUI scaling factor, so I'll see what can be done to better scale some UI elements. I suspect it will be simple for the main toolbar, but for the patterns it's difficult: The assumption here is (and always has been) that if you use a larger system font (including using a higher scaling factor for the UI in general), then you would also use a larger pattern font. This sort of UI scaling never played well together with the bitmap-based pattern view.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 714
Re: How to fix oversized font problem with 1.29?
« Reply #2 on: February 22, 2021, 22:17:22 »
Hi Johannes, maybe it's not too bad of a disturbance to pop in to forums once every few years :) Though this time after little tracking there's already a bunch of ideas and question written down, so might bring those up at some point.
I tried reverting related MainFrm.cpp changes from commit 11571 and fonts look good after that, so that would do for now, thanks for the hint. Apparently this doesn't affect too many given that couldn't find e.g. a bug report about this, and while I might have done some OS font tweaks way back that I don't anymore remember, generally I don't see anything particularly strange in the OS appearance. And comparing 1.29.07.00 and trunk with the MainFrm-change, the effects are limited: e.g. unlike in the linked post, here menu texts are identical between the builds.

« Last Edit: February 22, 2021, 22:21:00 by Relabsoluness »

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,316
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: How to fix oversized font problem with 1.29?
« Reply #3 on: February 28, 2021, 22:21:34 »
Can you maybe check if the changes in r14230 improve the font spacing in the main toolbar for you? I'd be interested in how they look now with the bigger font size.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 714
Re: How to fix oversized font problem with 1.29?
« Reply #4 on: February 28, 2021, 22:37:23 »
Looks like this with rev 14230:

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,316
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: How to fix oversized font problem with 1.29?
« Reply #5 on: March 01, 2021, 21:53:04 »
That's definitely a start. :) I'll finetune it a bit more soon.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.