TextLayout gets its AA hint from the constructor of the TextLayout
not from the Graphics2D etc.
So it was created inappropriately, it won't work as you expect.

-phil.

On 3/2/2011 11:10 AM, Michael Heuer wrote:
Sorry,

PText uses java.awt.TextLayout.draw to render text, see
should read

PText uses java.awt.font.TextLayout.draw to render text, see

On Wed, 2 Mar 2011, Michael Heuer wrote:

Hello Phil,

Thanks for your reply.

On Windows XP I see that jlabel-*, jtextcomponent-*, pswing-*, and
phtmlview-* all render the same, in that they ignore the LCD-specific
rendering hints (compare e.g. jlabel-lcd-hbgr and java2d-lcd-hbgr, which
look very different on my LCD monitor, since HBGR is not appropriate for
it).


PText uses java.awt.TextLayout.draw to render text, see

PText.java, line 522
http://code.google.com/p/piccolo2d/source/browse/piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PText.java#522


Why this should look different than Graphics2D.drawString, as in

AbstractJava2DTextRenderingBenchmark, line 68
http://dishevelled.svn.sourceforge.net/viewvc/dishevelled/trunk/text-rendering-benchmark/src/main/java/org/dishevelled/text/java2d/AbstractJava2DTextRenderingBenchmark.java?revision=996&view=markup

    michael


On Wed, 2 Mar 2011, Phil Race wrote:

Michael,

I don't know anything about what the P* stuff is, and can't speak for OS X,
but the results all look correct in the screen shots for Sun/Oracle's
Swing / Java2D on Windows. So I'd say your problems are in the P* stuff.
Remember "gasp" may not be AA-ed - it AA's only for the sizes at which
the font 'gasp' table says to do so.

-phil.

On 3/2/2011 10:18 AM, Michael Heuer wrote:
Hello,

We have an outstanding issue

Text rendering in PText and JLabel via PSwing appear not to respect
antialiasing rendering hints

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


where code that goes down slightly different text rendering paths looks
competely different with regards to antialiasing.  There is a runnable jar
attached to that issue that demonstrates the problem.

We're looking for some help analyzing where the issue lies, in our
library, in Swing text components, in Swing look&   feel, or in the Java2D
renderer(s).

Thank you,

     michael




Reply via email to