Hi Jim,

interesting read. I guess I learned more about the topic than I can help. Also found this resource interesting:

http://kynosarges.de/GuiDpiScaling.html

Some thoughts. Obviously it is less desirable to require every application to do their own scaling. I can't imagine that this would work on a larger basis. As to the question of integer vs float coordinates, there is a lot of snapToPixel stuff going on. And one of the reasons is to get crisp pixel-aligned lines. Snapping to logical coordinates could then snap to non-integer physical coordinates (if the scaling factor is 125% or somesuch). Which may be ok if hidpi makes up for it...

As to em-based styling, I was under the impression that there was a constant factor for 1em. Reading section "RESIZING FOR DIFFERENT SCREEN DPI" in modena.css I am not so sure anymore. The resource above also is unsure (FWIW):

"JavaFX em handling is inconsistent, sometimes referring to the automatically acquired system font but at other times yielding a hard-coded default size."

Finally, it would be nice to get information about the actual screen DPI. In my tests Screen.getDpi always returns 96, regardless of what it actually is...

Werner

Reply via email to