How to create new shapes for Text Mapper?
First, start with an empty SVG file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" height="200px" width="200px"> </svg>
I like to draw stuff using the *calligraphy* tool (`c`). I usually *simplify* the nodes a lot (`Ctrl+L`), *unify* the shapes (`Ctrl++`), edit the nodes by hand (`n`) until you’re happy with the fewest number of nodes you can manage.
Now move the entire shape such that it is centered on the *top left corner*. This is (0,0) as far as SVG is concerned. Save it.
/pics/8512911746_4f1c405dba_o.png
Look at the SVG file and notice something like this:
<path style="fill:#000000;fill-opacity:1;stroke:none" d="m 7.647323,-20.341905 c -5.784973,-11.791839 -36.204242,-5.139394 -43.951039,7.112364 8.922877,-5.977096 34.793258,-11.641806 37.046343,-5.498373 -17.505656,0.485788 -29.019956,5.940662 -33.027811,23.8472764 C -21.859546,-12.603312 -7.5022983,-14.191144 2.47485,-12.984161 -8.2112223,6.06712 -19.987316,13.477858 -15.788864,50.225619 c 3.988368,3.362713 8.6116517,-5.097214 4.510279,-7.531518 -0.559084,-6.64895 -0.875559,-13.360661 -0.08632,-20.004922 C -9.6892813,9.718021 1.072969,-6.510207 8.835372,-12.256094 26.823805,-7.758432 35.550312,0.1756144 34.450001,15.351883 44.387089,3.7916614 29.882349,-11.701263 14.406587,-15.219388 28.287217,-15.939127 40.549839,-6.589098 45.412784,1.4541824 47.026796,-8.361333 28.866764,-19.205208 16.79733,-20.277164 c 10.765708,-6.95198 25.316253,-3.074379 29.792108,3.226712 -4.893545,-14.115874 -36.158133,-10.60357 -38.942114,-3.291453 z" id="path3007" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccccccccc" />
You can already extract this path and use it! Usually it takes several attempts to get the placement right. Once I’m happy, I turn all these floating point numbers into integers in order to save space. Personally, I use Emacs to do it (EmacsWiki:RoundFloatingPoints).
This is what I want:
m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13 -8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7 9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20 c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z
Example input:
0202 jungle jungle attributes fill="white" stroke="#b3b3ff" stroke-width="3" jungle path m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13 -8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7 9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20 c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z
Output:
https://alexschroeder.ch/text-mapper?map=0101+jungle
jungle+attributes+fill= Jungle Hex
Example input:
0101 jungle jungle attributes fill="#9acd32" stroke="black" stroke-width="3" jungle path attributes fill="#228b22" jungle path m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13 -8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7 9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20 c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z text font-size="20pt" dy="15px"
Output:
https://alexschroeder.ch/text-mapper?map=0101+jungle
jungle+attributes+fill= Green Jungle Hex
#RPG #Maps #SVG #Text Mapper
(Please contact me if you want to remove your comment.)
⁂
Not enough trees for a jungle (-: At a watering hole and you have a decent oasis …
– Harald 2013-02-27 11:17 UTC
---
There you go!
[![Oasis](https://alexschroeder.ch/text-mapper?map=#+map+definition 0101+desert 0102+desert 0103+desert 0104+desert 0201+desert 0202+desert 0203+desert 0204+desert 0301+desert 0302+desert 0303+jungle 0304+desert 0401+desert 0402+desert 0403+desert 0404+desert 0501+desert 0502+desert 0503+desert 0504+desert
https://alexschroeder.ch/text-mapper?map=#+map+definition
#+attributes jungle+attributes+fill="#9acd32"+stroke="black"+stroke-width="3" jungle+path+attributes+fill="#228b22"
desert+attributes+fill="#eedd82"+stroke="black"+stroke-width="3"
jungle+path+m+8,-20+c+-6,-12+-36,-5+-44,7+9,-6+35,-12+37,-5+-18,0+-29,6+-33,24+C+-22,-13+-8,-14+2,-13+-8,6+-20,13+-16,50+c+4,3+9,-5+5,-8+-1,-7+-1,-13+0,-20+C+-10,10+1,-7+9,-12+27,-8+36,0+34,15+44,4+30,-12+14,-15+28,-16+41,-7+45,1+47,-8+29,-19+17,-20+c+11,-7+25,-3+30,3+-5,-14+-36,-11+-39,-3+z
text+font-size="20pt"+dy="15px" "Oasis")](https://campaignwiki.org/text-mapper?map=#+map+definition%0D%0A0101+desert%0D%0A0102+desert%0D%0A0103+desert%0D%0A0104+desert%0D%0A0201+desert%0D%0A0202+desert%0D%0A0203+desert%0D%0A0204+desert%0D%0A0301+desert%0D%0A0302+desert%0D%0A0303+jungle%0D%0A0304+desert%0D%0A0401+desert%0D%0A0402+desert%0D%0A0403+desert%0D%0A0404+desert%0D%0A0501+desert%0D%0A0502+desert%0D%0A0503+desert%0D%0A0504+desert%0D%0A%0D%0A#+attributes%0D%0Ajungle+attributes+fill=%22#9acd32%22+stroke=%22black%22+stroke-width=%223%22%0D%0Ajungle+path+attributes+fill=%22#228b22%22%0D%0A%0D%0Adesert+attributes+fill=%22#eedd82%22+stroke=%22black%22+stroke-width=%223%22%0D%0A%0D%0Ajungle+path+m+8,-20+c+-6,-12+-36,-5+-44,7+9,-6+35,-12+37,-5+-18,0+-29,6+-33,24+C+-22,-13+-8,-14+2,-13+-8,6+-20,13+-16,50+c+4,3+9,-5+5,-8+-1,-7+-1,-13+0,-20+C+-10,10+1,-7+9,-12+27,-8+36,0+34,15+44,4+30,-12+14,-15+28,-16+41,-7+45,1+47,-8+29,-19+17,-20+c+11,-7+25,-3+30,3+-5,-14+-36,-11+-39,-3+z%0D%0A%0D%0Atext+font-size=%2220pt%22+dy=%2215px%22)
I think I like how easy it turns out to be.
– Alex Schroeder 2013-02-27 11:29 UTC
---
I’m still pondering how to do labels.
/pics/8511938807_5a793d726a.jpg
– Alex Schroeder 2013-02-27 12:01 UTC
---
Very nice and readable!
– Harald 2013-02-27 12:37 UTC
---
Thank you for the feedback. Added. 🙂
[![Harald's Repose](https://alexschroeder.ch/text-mapper?map=#+map+definition 0202+desert 0203+desert 0302+desert 0303+jungle+"Harald's+Repose" 0304+desert 0402+desert 0403+desert
https://alexschroeder.ch/text-mapper?map=#+map+definition
#+attributes jungle+attributes+fill="#9acd32"+stroke="black"+stroke-width="3" jungle+path+attributes+fill="#228b22"
desert+attributes+fill="#eedd82"+stroke="black"+stroke-width="3"
jungle+path+m+8,-20+c+-6,-12+-36,-5+-44,7+9,-6+35,-12+37,-5+-18,0+-29,6+-33,24+C+-22,-13+-8,-14+2,-13+-8,6+-20,13+-16,50+c+4,3+9,-5+5,-8+-1,-7+-1,-13+0,-20+C+-10,10+1,-7+9,-12+27,-8+36,0+34,15+44,4+30,-12+14,-15+28,-16+41,-7+45,1+47,-8+29,-19+17,-20+c+11,-7+25,-3+30,3+-5,-14+-36,-11+-39,-3+z
text+font-size="20pt"+dy="15px" label+font-size="20pt"+dy="5px" glow+stroke="white"+stroke-width="5" "Harald's Repose")](https://campaignwiki.org/text-mapper?map=#+map+definition%0D%0A0202+desert%0D%0A0203+desert%0D%0A0302+desert%0D%0A0303+jungle+%22Harald's+Repose%22%0D%0A0304+desert%0D%0A0402+desert%0D%0A0403+desert%0D%0A%0D%0A#+attributes%0D%0Ajungle+attributes+fill=%22#9acd32%22+stroke=%22black%22+stroke-width=%223%22%0D%0Ajungle+path+attributes+fill=%22#228b22%22%0D%0A%0D%0Adesert+attributes+fill=%22#eedd82%22+stroke=%22black%22+stroke-width=%223%22%0D%0A%0D%0Ajungle+path+m+8,-20+c+-6,-12+-36,-5+-44,7+9,-6+35,-12+37,-5+-18,0+-29,6+-33,24+C+-22,-13+-8,-14+2,-13+-8,6+-20,13+-16,50+c+4,3+9,-5+5,-8+-1,-7+-1,-13+0,-20+C+-10,10+1,-7+9,-12+27,-8+36,0+34,15+44,4+30,-12+14,-15+28,-16+41,-7+45,1+47,-8+29,-19+17,-20+c+11,-7+25,-3+30,3+-5,-14+-36,-11+-39,-3+z%0D%0A%0D%0Atext+font-size=%2220pt%22+dy=%2215px%22%0D%0Alabel+font-size=%2220pt%22+dy=%225px%22%0D%0Aglow+stroke=%22white%22+stroke-width=%225%22)
– Alex Schroeder 2013-02-27 14:10 UTC