I spent many hours on Thursday configuring and installing OpenStreetMap tile rendering, via Mapnik and mod_tile and at the very last step ran into a glaring issue: Japan, China, Korea, Thailand fonts (often referred to as CJK) were just  symbols instead of the appropriate characters.
Out of the box, the OpenStreetMap style,
osm.xml, doesn't have fallback font support. What this means is that when the default font, DejaVu Sans, is missing the specified character then Mapnik doesn't know where else to try to get the character. Mapnik has support for this, but for some reason the default OSM style or package doesn't include it.
Thanks to the late-night help of Dane Springmeyer (and looking past the very bad April Fools joke of telling me Mapnik now has Ruby bindings and KML rendering support), I managed to get it working.
Steps to Reproduce
The solution is quite straight-forward, and I have added my notes to the OSM wiki on Mapnik.
- Download the GNU Unifont Glyphs.
- Unpack and put the
ttffile in your
/usr/local/lib/mapnik/fonts(or appropriate path) directory with the other Mapnik fonts.
- Modify your
face_name="DejaVu Sans Book"with
fontset_name="DejaVu Sans Book".
- Underneat the declaration, add the font set styling for fallback:
- Repeat for Bold and Oblique.
- Delete your tile cache and re-render.
You can view my modified osm.xml here.
It is really impressive how well Mapnik and OpenStreetMap work together, and the simplicity of styling. The next step is to figure out how to add English names to all the local language renderings, so that someone can look at ×ªÖµÖ¼×œÖ¾×Ö¸×‘Ö´×™×‘-×™Ö¸×¤×•Ö¹ and also recognize it as Tel-Aviv.