gravitystorm/openstreetmap-carto — pull request #694 by pnorman (2014-07-03 00:35:14+00:00)
Title: Replace road shields with SVGs

Fixes #693
Fixes #680 (Or good enough for me to stop fiddling with sub-pixel positioning)
Fixes #203
Fixes #202 (mostly)
Fixes #146 (mostly)

Cross-reference #294 mapnik/mapnik#2020

Starts organization for #508

Replacing PNG shields with SVG ones is a first step in improving rendering of shields. It also allows for much easier customization. Unfortunately we have to specify the shield colours in the SVGs, as two colours are used - the shield colour and white. Even if there weren't two used, mapnik can't recolour a SVG in a ShieldSymbolizer.

To determine shield widths for a given number of characters the ref values in the planet were sorted by character and then road length was counted for each combination of characters. This found the most common ref values, which were then selected from for testing.

![Motorway](https://cloud.githubusercontent.com/assets/1190866/3464253/552b05b2-0249-11e4-8783-ae2505d4f408.png)

![Trunk](https://cloud.githubusercontent.com/assets/1190866/3464262/69705b12-0249-11e4-8534-15ef1ef4a24c.png)

![Primary](https://cloud.githubusercontent.com/assets/1190866/3464265/7f95c1f2-0249-11e4-8dfa-c2ff1a329d92.png)

![Secondary](https://cloud.githubusercontent.com/assets/1190866/3464270/b40d5d50-0249-11e4-9272-890a2a0d1872.png)

![Tertiary](https://cloud.githubusercontent.com/assets/1190866/3464280/e2e8b6b0-0249-11e4-9e93-6bd7ba452019.png)