[OpenJDK 2D-Dev] seeking help with text rendering
philip.race at oracle.com
Wed Mar 2 11:32:34 PST 2011
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
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
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.
> PText uses java.awt.TextLayout.draw to render text, see
> PText.java, line 522
> Why this should look different than Graphics2D.drawString, as in
> AbstractJava2DTextRenderingBenchmark, line 68
> On Wed, 2 Mar 2011, Phil Race wrote:
>> 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.
>> On 3/2/2011 10:18 AM, Michael Heuer wrote:
>>> We have an outstanding issue
>>> Text rendering in PText and JLabel via PSwing appear not to respect
>>> antialiasing rendering hints
>>> 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
>>> Thank you,
More information about the 2d-dev