[mapserver-users] label character spacing and curves
Stephen Woodbridge
woodbri at swoodbridge.com
Thu Jul 30 10:56:55 PDT 2009
Jennifer Shanks wrote:
> Hello,
>
> I'm having trouble with labels that follow a curve. When the curves
> are tight, the letters are too close together and appear in a
> jumble. I'm using a true type font arial. I'd like to space the
> characters but don't see an option for that. What have others done
> to solve this problem? Are there suggestions for other true type
> fonts that have a wider spacing? Any other ideas?
Hi Jennifer,
Unfortunately, I'm unaware of any current way to work around this
problem, but Thomas would be the expert on this.
There are couple of issues in dealing with this problem in the code but
they have not been implemented mostly because they would have an impact
on performance and require time/effort of a developer.
Hi Thomas,
I'm not sure if you have thought about this at all, but here are a few
ideas:
1) check that the bbox of the character being placed against the prior
character and increase the space between the character if they collide.
2) on segments that double back on themselves, like bowties, you might
need to perform the above check on all prior characters, taking more
time, to avoid these type of collisions.
These checks might be dynamically enabled/disabled doing a quick scan of
the part of the line segment that is being labeled and checking the
angle between segments and maybe the length of the segments to see if
there may be a need to do additional checking.
More information about the MapServer-users
mailing list