Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI: Font size #37

Open
kleinj opened this issue Jan 20, 2018 · 3 comments
Open

GUI: Font size #37

kleinj opened this issue Jan 20, 2018 · 3 comments

Comments

@kleinj
Copy link
Member

kleinj commented Jan 20, 2018

On high-DPI displays on Windows and Linux under Java 8, the default font sizes are tiny. This seems to be fixed when running Java 9, as then the Java UI components are actually high-DPI aware.

For those users that want to / have to stay at Java 8, it would be nice to have a more convenient way to get to usuable font sizes.

As far as I can tell, the situation currently is:

  • Using the Increase/Decrease font size actions in the Options menu, one can increase the font size of the menus etc by +1/-1 points
  • The fonts in the model and property editor can be changed from the font selector in the settings dialog.
  • There are quite a few fonts that are not actually adjusted / adjustable.

I would propose the following:

  • Introduce a global font scale factor, which can be adjusted via the Increase/Decrease actions (perhaps in +/-10% steps?)
  • Add some sub-menu there to allow resetting to 100% and to some convient value for high DPI displays (200%, 300%?)
  • During rendering, adjust all font sizes by this factor. So, if the model editor font from the settings dialog has 20pt font size, that would be scaled as well.
  • Identify all the locations where currently fixed font sizes are used (probably sufficient to scan the call sites for new Font) and make them take the factor into account.

Some related items:

  • Increasing the font size via the menu actions leads to white bars appearing on the left for some of the boxes in the simulator view
  • The current hot-key for "Increase" (Cmd+SHIFT+=) does not work on German keyboards and OS X. Can we use + instead of SHIFT+= in the code?
  • I've seen long error messages (such as the overflow error during symbolic model building) leading to an error dialog box that was wider than the screen. Perhaps we can use some other widget for the text, there?
@ahelwer
Copy link

ahelwer commented Oct 5, 2019

Can confirm upgrading the version of Java fixed this issue for me.

@davexparker
Copy link
Member

Thanks @ahelwer. Can you confirm which version you switched to in order to fix this?

@ahelwer
Copy link

ahelwer commented Oct 11, 2019

Okay weirdly this actually seems to be an issue with specific distributions of the JDK on Windows.

AdoptOpenJDK 1.8.0_222-b10: YES issue
JDK from Oracle 8u221: NO issue
AdoptOpenJDK 9.0.4+11: NO issue
JDK from Oracle versions 9-13: NO issue

So the JDK from Oracle works, the 8.0 one from AdoptOpenJDK does not. The problematic AdoptOpenJDK distribution is bundled with the VS Code Java Pack Installer, so might be more popular among developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants