[Tilesathome] Check font rendering

Stephan Knauss osm at stephans-server.de
Sat Sep 5 13:31:00 BST 2009


Knut Arne Bjørndal wrote:
> The other would be to use SVG fonts, see this trac ticket for some
> thoughts on the subject: http://trac.openstreetmap.org/ticket/1228

Sounds like a good idea.

I did a test with batik and unifont. Looks fine, maybe a bit pixelated. 
Not sure, maybe unifont is a bitmap font.
java -jar batik-ttf2svg.jar unifont-5.1.20080907.ttf -l 3584 -h 3711 -id 
MyThaiSVG -o myThaiSVG.svg -testcard

I then replaced the text of the testcard with this:
; font-size:36;fill:black">
<text x="20" y="60"> 
&#xe00;&#xe01;&#xe02;&#xe03;&#xe04;&#xe05;&#xe06;&#xe07;&#xe08;&#xe09;&#xe0A;&#xe0B;&#xe0C;&#xe0D;&#xe0E;&#xe0F;</text> 

<text x="20" 
y="120">&#xe10;&#xe11;&#xe12;&#xe13;&#xe14;&#xe15;&#xe16;&#xe17;&#xe18;&#xe19;&#xe1A;&#xe1B;&#xe1C;&#xe1D;&#xe1E;&#xe1F;</text> 

<text x="20" 
y="180">&#xe20;&#xe21;&#xe22;&#xe23;&#xe24;&#xe25;&#xe26;&#xe27;&#xe28;&#xe29;&#xe2A;&#xe2B;&#xe2C;&#xe2D;&#xe2E;&#xe2F;</text> 

<text x="20" 
y="240">&#xe30;&#xe31;&#xe32;&#xe33;&#xe34;&#xe35;&#xe36;&#xe37;&#xe38;&#xe39;&#xe3A;&#xe3B;&#xe3C;&#xe3D;&#xe3E;&#xe3F;</text> 

<text x="20" 
y="300">&#xe40;&#xe41;&#xe42;&#xe43;&#xe44;&#xe45;&#xe46;&#xe47;&#xe48;&#xe49;&#xe4A;&#xe4B;&#xe4C;&#xe4D;&#xe4E;&#xe4F;</text> 

<text x="20" 
y="360">&#xe50;&#xe51;&#xe52;&#xe53;&#xe54;&#xe55;&#xe56;&#xe57;&#xe58;&#xe59;&#xe5A;&#xe5B;&#xe5C;&#xe5D;&#xe5E;&#xe5F;</text> 

<text x="20" 
y="420">&#xe60;&#xe61;&#xe62;&#xe63;&#xe64;&#xe65;&#xe66;&#xe67;&#xe68;&#xe69;&#xe6A;&#xe6B;&#xe6C;&#xe6D;&#xe6E;&#xe6F;</text> 

<text x="20" 
y="480">&#xe70;&#xe71;&#xe72;&#xe73;&#xe74;&#xe75;&#xe76;&#xe77;&#xe78;&#xe79;&#xe7A;&#xe7B;&#xe7C;&#xe7D;&#xe7E;&#xe7F;</text> 


and rasterized:
java -jar batik-rasterizer.jar -h 800 -w 600 myThaiSVG.svg

The result is attached.

Stephan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myThaiSVG.png
Type: image/png
Size: 9209 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20090905/1caf3604/attachment.png>


More information about the Tilesathome mailing list