Re: [JAVA2D] AttributedString and Outline (the return of the glyph invaders!)

2006-11-16 Thread Michele Puccini
Thanks Phil, I did a little mistake: is not a problem of the outline, which is indeed correct. Well, a piece of code is worth a thousand words. The attached sample shows the animated difference between TextLayout.draw() and g2d.draw(TextLayout.getOutline). Please give it a try and see what

Re: [JAVA2D] AttributedString and Outline (the return of the glyph invaders!)

2006-11-16 Thread Jan Bösenberg (INCORS GmbH)
Michele, I have not tested your showcase but I think I know what you mean. Probably the only way to achieve what you want is to implement your own outline rendering by draw the string five times. Four times using the foreground color with x, y offsets (1, -1), (1, 1), (-1, 1), (-1, -1), and

Re: [JAVA2D] AttributedString and Outline (the return of the glyph invaders!)

2006-11-16 Thread Phil Race
First, its not a bug in TextLayout drawString behaves identically. You can prove this as follows, instead of your AttributedString use Font fo = new Font(Serif, Font.PLAIN, 12); fo = fo.deriveFont(AffineTransform.getScaleInstance(2 + scale, 3));