dzmipt / kdbStudio

Studio for kdb+ / Rapid execution environment for q
Apache License 2.0
5 stars 7 forks source link

Configuration of font in output grid #81

Closed dzmipt closed 1 year ago

dzmipt commented 3 years ago

While there is no UI, it is possible to set configuration for editor font from config file.

It is not possible to set fonts in output grid.

It's nice to not only have the configuration, but also have UI to set fonts.

Yanpas commented 3 years ago

This issue is noticable on hidpi monitors. Grid font isn't scaled by default, so something like tableFontSize *=((double)getDisplay().getDPI() / 96.0) would be nice

dzmipt commented 3 years ago

I wonder if scaling happens for other elements - fonts in the editor, fonts in menu, etc. ? I would suspect that nothing is scaling. Moreover there are many places where layout, gaps, insets are set in pixels. The idea is great but requires a lot of refactoring.

I think at the moment the best solution would be ability to set font (including size) for output grid and editor.

In addition, I read the following thread: https://stackoverflow.com/questions/15659044/how-to-set-the-dpi-of-java-swing-apps-on-windows-linux

However I still confused.

And one more thing what is getDisplay().getDPI() ? Isn't it from SWT? And I think I found issue with this method: https://stackoverflow.com/questions/6544510/how-to-get-the-screen-dpi-in-java

dernasherbrezon commented 2 years ago

99% of issues with the grid's font can be fixed by removing this line: https://github.com/dzmipt/kdbStudio/blob/master/src/studio/core/Studio.java#L70

This will leave system default font, which can be changed, scaled &etc through standard Windows settings.