Closed dzmipt closed 1 year 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
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
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.
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.