[OpenJDK 2D-Dev] 2 small xrender fixes

Clemens Eisserer linuxhippy at gmail.com
Thu Jul 1 10:57:23 UTC 2010


Hi Phil,

The whitespace one, I'm not aware that T2K will do this.
> I find that it sets it width and height to zero for whitespace.
> I instrumented the rasteriser and ran  with code like this.
>

Wow, actually that took me quite a while to figure out what was going wrong.

T2K does set width=-1 for whitespace, but only if subpixel antialiasing is
enabled.
Because width is unsigned in C, I get the 65535.

    public void paint(Graphics g) {
    Graphics2D g2d = (Graphics2D) g;
    g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
    char[] chars = {' '};
    Font f = new Font("Serif", Font.PLAIN, 14);
    g.setFont(f);
    g.drawChars(chars, 0, 1, 30, 30);
    }


Can you reproduce this?

By the way, I would like to re-do the Jules thing a bit, so please don't
integrate it for now.

Thanks, Clemens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20100701/e5c8d70a/attachment.html>


More information about the 2d-dev mailing list