CSS Font size in points doesn't match Node.Font.Size

Felipe Heidrich felipe.heidrich at oracle.com
Wed Mar 5 08:09:40 PST 2014


Hi

On Mar 4, 2014, at 4:42 PM, Jeff Martin <jeff at 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

> 
> On Mar 4, 2014, at 6:10 PM, Tom Schindl <tom.schindl at bestsolution.at> wrote:
> 
>> There was a thread some time ago on this List with explainations of this behavior!
>> 
>> Tom
>> 
>> Von meinem iPhone gesendet
>> 
>>> Am 05.03.2014 um 01:03 schrieb Jeff Martin <jeff at reportmill.com>:
>>> 
>>> I can't quite wrap my head around why when I specify an -fx-font-size of 9pt in CSS, it turns into a 12 pt font in my rendered node. I suppose CSS is upscaling for my 96 dpi device, but it makes other measurements that depend on that setting potentially wrong.
>>> 
>>> Any suggestions on how I should be thinking about this (other than that this is a bug :-)?
>>> 
>>> jeff
> 



More information about the openjfx-dev mailing list