<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.5">
<TITLE>Intelligent fitting street names in OSMarender</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>Barry/tiles@home crowd,<BR>
<BR>
Inspired by your lines2curves, I have hacked together a proof-of-concept script to fix up names to fit in the ways they are on.<BR>
<BR>
Basically for each text path, it tries to abbreviate the text so that it will fit into the way, or if it can't it hides the text.<BR>
<BR>
As it works in basically the same way as lines2curves, and needs much of the same info, I created a single unified script.<BR>
<BR>
See <A HREF="http://wiki.openstreetmap.org/index.php/Osmarender/TextFitting">http://wiki.openstreetmap.org/index.php/Osmarender/TextFitting</A><BR>
<BR>
Issues:<BR>
<BR>
* needs code to read osmarender styles - currently hard coded to default style<BR>
* needs calibration - I assume each character is equal to the fontsize in width<BR>
* needs non-anglo centric abbreviations, and probably separate conf file for abbreviations<BR>
* can't deal with XML-escaped text. May not be UTF-8 safe either.<BR>
* ugly perl.<BR>
<BR>
Rob<BR>
<BR>
p.s. there's a bug in your regex when run on non-uploaded OSM (hint way ids can be negative).<BR>
<BR>
<BR>
</FONT>
</P>

<br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for viruses by </FONT><A href="http://www.mailcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>MailControl</FONT></A><FONT style="BACKGROUND-COLOR: #ffffff">, a service from </FONT><A href="http://www.blackspider.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>BlackSpider Technologies</FONT></A><FONT style="BACKGROUND-COLOR: #ffffff">.</FONT></P>
</body>
</HTML>