SVG workarounds
ViewBox Fix
WarLight currently has a hard time understanding SVG files that have setting for an SVG's width and height from its view box. This can cause maps to appear incorrectly sized when uploaded to WarLight, or to not appear at all if they are so much larger than the screen that all of the territories are off-screen.
To check if this is causing an issue or to fix it, follow these steps:
- Open the SVG file in Inkscape
- Open the XML Editor (4th button from the top right)
- Click on the top-most node (it should start with svg:svg)
- Inspect the "width", "height" and "viewBox" attributes. ViewBox should have 4 numbers, which represent (in order): x, y, width, height
- The viewBox should be set to 0 and 0 for x and y, and to the same values as width and height. For example, these settings are correct:
- width = 900
- height = 400
- viewBox = 0 0 900 400
- If the viewBox isn't rooted at 0,0 or if its width and height don't match the others, simply change the viewBox by selecting it, typing in the correct numbers, and clicking set. After doing this, your map will likely shift all of its territories to different locations. Now you should select all of the territories and move/resize them to fit them back within the box. After doing this, the map should work correctly in WarLight.
Transform Fix
Unfortunately there are a few kinds of transformations that SVG supports that WarLight does not. These can cause objects to appear at a different location within WarLight than they should.
Fortunately, these are easy to fix. In Inkscape, open the XML Editor (on the top toolbar, it's the 4th button from the right).
Select the offending object. The XML Editor will show you the attributes on it. If you see an attribute named transform with a value that starts with matrix, delete it. This will cause the object to move in Inkscape - now just drag it back to its correct position and your map should work normally.
This bug will be fixed in the next WarLight release, 1.08.