I'm currently using this way: Drawing text with outline in java To write a text with outline, and this to create underline, background color etc: http://www.java2s.com/Code/Java/2D-Graphics-GUI/TextAttributeUnderlineandstrikethrough.htm
But it doesn't show text attributes if there is outline, when i check AttributedString#getIterator().getAttributes()
it looks right:
{java.awt.font.TextAttribute(strikethrough)=true, java.awt.font.TextAttribute(foreground)=java.awt.Color[r=255,g=255,b=255], java.awt.font.TextAttribute(font)=java.awt.Font[family=Impact,name=Impact,style=bolditalic,size=80], java.awt.font.TextAttribute(underline)=0}
So the attributes are added.
Also I'm using
createGlyphVector(<getFontRenderContext>, AttributedString#getIterator)
Writes the text with outline correctly, but doesn't show the attributes.