Thank you for the document. The font I'm using is a TTF so maybe this
explains some of the differences in the size of the rendering.
But I don't know how that would explain the odd color effects I'm seeing.
The small images are hard to evaluate without zooming in, so here is a
graphic with both images blown up for easier inspection:
(this is a screen capture of a blowup, so there is no alpha channel in this
Again, the lower image should have nothing but shades of gray.
On 9/8/05 8:16 PM, "Bira Neto" wrote:
> I would guess it has to do of the fonts not using native rasterizers and
> the TTF hint reading(as read in the article). About your 1.4 sample
> image... it's pretty hard to see blue and green in the image. It looks
> good either.
> Michael Slade wrote:
>> I had an application running under JDK 1.3 that created antialiased text in
>> a buffer of TYPE_INT_ARGB that was then stored in a png file with an alpha
>> channel - worked great. Here is a fragment of an image that illustrates the
>> (notice white text with black drop shadow, grey antialiase pixels and alpha
>> but under JDK 1.4.2, the font got wider and taller (by about 1 pixel) and
>> some of the antialiased pixels are now brown or blue instead of gray. Here
>> is a fragment of the image that demonstrates the problem:
>> Here is a code fragment that prints the shadow or the foreground
>> ** This method adds a line of left-justified text to the current
>> ** graphic.
>> public static void addLeftJustifiedText(String s, Graphics2D g2d, float
>> xPos, float yPos)
>> // get the font render context and calculate the position
>> FontRenderContext fntCntxt = g2d.getFontRenderContext();
>> Rectangle2D bounds = g2d.getFont().getStringBounds(s, fntCntxt);
>> g2d.drawString(s, xPos, yPos);
>> I'm scratching my head trying to figure it out. I looked at the archive for
>> this list and didn't see anything. I set every hint I could find. I'm
>> guessing something basic and obvious changed that I'm missing in the
>> Any suggestions?
>> Thank you,
>> Michael Slade
>> To unsubscribe, send email to firstname.lastname@example.org and include in the body
>> of the message "signoff JAVA2D-INTEREST". For general help, send email to
>> email@example.com and include in the body of the message "help".
To unsubscribe, send email to firstname.lastname@example.org and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
email@example.com and include in the body of the message "help".
could you post simplified testcase to reproduce this problem?
have you tried to reproduce it with jdk5.0 and latest mustang builds?
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.