Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default font size of JavaFX under Linux is larger as on Windows

I noticed that the default font is way larger in JavaFX under Linux (Ubuntu XY) as it is under Windows. Since screen space is sometimes quite limited i would like to have it ideally the same size as it is under Windows. Is there a simple way to enforce the same default size / the same DPI value?

like image 515
tobain Avatar asked Feb 05 '15 17:02

tobain


1 Answers

In short, font rendering will depend of the OS. So you will have more/less pixels for the same word depending of the OS where java is running. One good practice is to use: USE_COMPUTED_SIZE as much as possible to avoid problems and let your app just fit by it self depending on the size of the fonts.

Check this guide to know how java works with fonts: http://docs.oracle.com/javase/7/docs/technotes/guides/intl/fontconfig.html

This is not 100% related to your question but just check these comparisons (Windows,Linux,Mac): http://fxexperience.com/2013/01/modena-new-theme-for-javafx-8/

like image 86
LuCG Avatar answered Sep 17 '22 03:09

LuCG