I've followed a tutorial on creating a text with border here:
http://java.sun.com/developer/onlineTraining/Media/2DText/style.html, using java.awt.Graphics2D.
It works, but only for thin outlines. If i make the outline thicker, the sharp points in the text (in letters like A, M or W) get overly "stretched". Please see the attached picture, it's hard to describe this effect.
As a workaround, I tried to use transformations and the fill() command to "draw a rectangle" with the text in a for-cycle in black and then fill() the text in white in the middle of it. This approach works great, but is really very slow and I would need to resize the text dynamically in my program
This is the code I'm using with the original method I found in the tutorial:
This is a method in my Text class, so there are variables like color, borderRatio which are available. It seems to me that this is a bug in text outlining which happens with very sharp points in the text. Is there any way around it, some settings that can resolve this issue? Or any workaround (except the one I mentioned)?
Many thanks!