[OpenJDK 2D-Dev] seeking help with text rendering
Phil Race
philip.race at oracle.com
Wed Mar 2 19:32:34 UTC 2011
Michael,
On 3/2/2011 11:05 AM, 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
I don't know what you are looking at but I am looking at
text-rendering-winxp.png
at the URL you referenced and JLabel does NOT ignore the LCD hints,
and this XP PNG doesn't have a Jtextcomponent that I can see.
> (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).
I'm not sure what you meant . If you say they are different doesn't
that mean something is in fact listening to them?
But where is the "java2d-lcd-hbgr" sample ? Oh, is in the OS X one.
As I said I don't know about that. Mac doing whatever it wants I
suppose. If I had to guess they simply didn't hook up Swing to
properly honour the hints or you aren't setting the hint in a way
that OS X believe is applicable. So all a Mac oddity.
I'm just looking at XP. Show me only on Windows (or Linux)
where we do the right thing.
-phil.
>
> 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
>>>
>>
More information about the 2d-dev
mailing list