I don't think we can do what you suggest about the warning, since there are cases where CSS could be initialized prior to calling into the application (e.g., the default preloader, deploy dialogs), but I think it might make sense to add a property to control the scale. Can you file a JIRA request for adding such a property?

I think we can argue separately whether it should be the default at some point, but I am not in favor of that. This would be too big of a breaking change.

-- Kevin


Jeff Martin wrote:
The thing is, point size is a fixed size - 1pt==1/72 in, regardless of the DPI. 
It is simply incorrect and confusing, arbitrarily deciding that a point is 
1/96in.

How about implementing the fix based on a global static variable somewhere? And perhaps 
printing a warning to the console when the first CSS is applied if that global hasn't 
been set saying, "CSS point-size fix not activated - this will be set by default in 
a future release".

jeff


On Mar 5, 2014, at 4:03 PM, Felipe Heidrich <felipe.heidr...@oracle.com> wrote:

The problem is that point size used by Node and point size used by CSS are not 
the same.
One uses a 72 DPI and the other 96. Thus the final pixel sizes are different.

I don’t see how to change one or the other without breaking a ton of people.

Maybe adding a global font DPI so that Node can be made to match CSS ?

Suggestions ?

Felipe

On Mar 5, 2014, at 12:39 PM, Pedro Duque Vieira <pedro.duquevie...@gmail.com> 
wrote:

Hi Tom, Jeff, Felipe...

Having bugs stay in to maintain backwards compatibility sounds very weird
to me IMHO.

If we go down that road aren't we creating a library that will some day
have too many glitches and as such less appeal to programmers looking for
UI libraries?

Thanks,


Hi
On Mar 4, 2014, at 4:42 PM, Jeff Martin <j...@reportmill.com> wrote:
Thanks Tom! I assume the thread was this one:

    Font.font() says it is point size but it looks like it are pixels

http://mail.openjdk.java.net/pipermail/openjfx-dev/2014-January/012398.html
I guess the final word is that CSS assumes 1pt==1/92in,
Yes
and Nodes convert that to the real world on render?

On the printer yes, on the display it assumes 72 (pt=px).

And that this is basically a bug, but it can't be fixed due to legacy
considerations?
Yes
Felipe
--
Pedro Duque Vieira

Reply via email to