Hi Clemens. It's interesting to note that this doesn't happen on OpenJDK, and on closed java the subpixel hint is not necessary to reproduce this. Simply using VALUE_ANTIALIAS_ON and the SRC composite is enough.
Regards, Denis. ----- "Clemens Eisserer" <linuxhi...@gmail.com> wrote: > Hi, > > While playing arround with the SRC composition rule I found what > seems > to be a bug. > When rendering text with an AlphaComposite(SRC, EA) I get garbage > when > enabling subpixel antialising: > > g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC, > 0.01f)); > g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, > RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR); > > g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); > > g2d.setColor(Color.black); > g2d.drawString("This text is painted with black color", 50, > 50); > > If I comment out the KEY_ANTIALIASING hint, which shouldn't have any > effect on text rendering, extra alpha is ignored but the text is > rendered correctly. > > Should I file a but? > > Thanks, Clemens