[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-30 Thread piccolo2d


Comment #13 on issue 191 by cmal...@pixelzoom.com: Disabling  
FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing  
components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Yes, I am able to work around ellipses in a component by explicitly  
increasing its preferred width.


--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-28 Thread piccolo2d

Updates:
Labels: -Milestone-1.3.1 Milestone-2.0

Comment #12 on issue 191 by atdi...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

(No comment was entered for this change.)

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-28 Thread piccolo2d


Comment #11 on issue 191 by atdi...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Are you able to workaround ellipses by explicitly setting preferred bounds  
on the component (giving it larger width)?


--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-28 Thread piccolo2d


Comment #10 on issue 191 by cmal...@pixelzoom.com: Disabling  
FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing  
components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Speaking for PhET...

+1 for the proposal to move this ticket to 2.0.  Also OK to default  
to "fm_on", as long as we have some way to globally change to "fm_off" in  
client code.


Also of note is that we have recently experienced the Mac OS ellipsis  
problem with Arabic characters at font size > 14, with both "fm_on"  
and "fm_off" scenarios.


--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-27 Thread piccolo2d


Comment #9 on issue 191 by atdi...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Attaching Mac OS X (Snow L.) -- {Java6} x {"fm_on", "fm_off"}

Attachments:
MacOsX.Java6.FracMetricsOn.png  13.5 KB
MacOsX.Java6.FracMetricsOff.png  12.6 KB

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-27 Thread piccolo2d


Comment #8 on issue 191 by atdi...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Attaching Ubuntu outcomes -- {Java4, Java6 (openjdk)} x {"fm_on", "fm_off"}

Attachments:
Ubuntu.OpenJdk6.FracMetricsOff.png  12.1 KB
Ubuntu.Java6.FracMetricsOn.png  15.0 KB
Ubuntu.Java4.FracMetricsOn.png  12.9 KB
Ubuntu.Java4.FracMetricsOff.WhileZooming.png  8.3 KB
Ubuntu.Java4.FracMetricsOff.png  12.5 KB

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-27 Thread piccolo2d


Comment #7 on issue 191 by atdi...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Attaching Mac OS X (Snow Leopard) outcomes -- {Java6} x {"fm_on", "fm_off"}

Attachments:
MacOsX.Java6.FracMetricsOn.tiff  15.9 KB
MacOsX.Java6.FracMetricsOff.tiff  15.2 KB

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-27 Thread piccolo2d


Comment #6 on issue 191 by atdi...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Attaching Windows 7 outcomes -- {Java4, Java6} x {"fm_on", "fm_off"}

Attachments:
Win7.Java6.FracMetricsOn.PNG  58.9 KB
Win7.Java6.FracMetricsOff.PNG  43.8 KB
Win7.Java4.FracMetricsOn.PNG  14.5 KB
Win7.Java4.FracMetricsOff.PNG  12.3 KB

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-27 Thread piccolo2d


Comment #5 on issue 191 by atdi...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Here's a summary of this issue to date:

While the default for all platforms seems to be FRACTIONAL_METRICS_ON  
("fm_on"), Piccolo2D explicitly sets FRACTIONAL_METRICS_OFF ("fm_off") for  
painting of PSwing nodes. As I understand it, this decision has been a part  
of the PSwing class for a long while now and the primary motivation for  
doing this is to avoid rendering of ellipses on Mac OS X platforms (by  
using "fm_off", we prevent Mac OS from rendering ellipses for some text  
renderings that, due to fractional metrics calculations can't fully render  
within their bounds.)


After running several tests, however, it seems that painting w/ "fm_off"  
causes more unpleasant behavior across systems than using the default  
of "fm_on". On all systems, using "fm_off" causes noticeable jittering  
while zooming. On Ubuntu/Java4, ellipses are actually rendered in this mode  
and not in "fm_on". And on Windows 7, using Java4, ellipses are rendered  
regardless of the setting.


I tested on a subset of {Win7, Snow Leopard, Ubuntu10} x {Java4, Java6} x  
{FRACTIONAL_METRICS_ON, FRACTIONALMETRICS_OFF} and the outcome images will  
come soon attached with tell-tale filenames:



| "fm_off"| "fm_on"

Windows7
Java4: jittering; ellipsed   no  
jitter; ellipsed
Java6:  
jittering  slight jittering

Ubuntu10
   Java4:  jittering; ellipsed
slight jittering
   Java6 (openjdk):  jittering; slight artifacts no jitter;  
noticeable artifacts

Mac/Snow
   Java6:
jittering slight jittering; ellipsed


It appears impossible to avoid ellipse-rendering using RenderingHints.  
Also, using the default rendering hint "fm_on" yields much better behavior  
(little or no jittering) otherwise.


It seems clients can avoid ellipses by explicitly setting preferred sizes  
on their components, so there is a workaround.


With this data, I believe the *correct* route is to use the default "fm_on"  
rendering hints (which is default on all systems I tested on), which also  
resolves this issue.


I don't believe we can do this, however, in 1.3.* releases as clients may  
already rely on this behavior. 1.3.* clients can workaround this issue by  
overriding paint() behavior (not ideal, I know.)


Looking for P2D developers to comment. My vote is to move this ticket to  
2.0 with the plan of removing our use "fm_off" in 2.0.


--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-02 Thread piccolo2d


Comment #4 on issue 191 by heue...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Consider also OpenJDK builds on Mac OSX

http://code.google.com/p/openjdk-osx-build/

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2011-03-02 Thread piccolo2d


Comment #3 on issue 191 by heue...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

Per

http://developer.apple.com/library/mac/documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html

There are some system properties on OSX that might affect how text is  
rendered and how this rendering hint is applied:


apple.awt.graphics.EnableQ2DX

Determines whether hardware acceleration is used to speed up rendering  
of simple primitives like images, lines, rects, and simple characters. In  
addition to using this flag, you need to enable Quartz 2D acceleration in  
the Quartz Debug application, included with the Xcode Developer Tools for  
Mac OS X.


This is strictly a developer option. Java applications intended for use  
on Mac OS X should not rely on the presence of Quartz 2D acceleration.


The default value is false.

apple.awt.graphics.UseQuartz

Determines whether Apple’s Quartz renderer is used instead of Sun’s 2D  
renderer.


The default value is true for J2SE 5.0 and false for Java SE 6.


Thus the OS check might not be sufficient.

See also Issue 117 which documents my frustration with Piccolo2D text  
rendering in general.


--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2010-12-21 Thread piccolo2d

Updates:
Labels: Milestone-1.3.1

Comment #2 on issue 191 by heue...@gmail.com: Disabling FRACTIONAL_METRICS  
on Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

(No comment was entered for this change.)

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 191 in piccolo2d: Disabling FRACTIONAL_METRICS on Windows yields incorrect bounds for text PSwing components

2010-09-08 Thread piccolo2d


Comment #1 on issue 191 by allain.lalonde: Disabling FRACTIONAL_METRICS on  
Windows yields incorrect bounds for text PSwing components

http://code.google.com/p/piccolo2d/issues/detail?id=191

The solution you gave seems to be the way to go about it.

Best case scenario is to have the fractional metrics enabled across the  
board and this gets us far closer to that. Even though it's obviously going  
against the very nature of cross platform Java code, working is working.


Only gotcha there I think is that it would disable it for all mac  
platforms. Are we sure that there are no mac machines for which fractional  
metrics doesn't introduce an ellipsis?


--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en