You can clone with
HTTPS or Subversion.
hi, I came to the Chinese, when I made using mapnik mark along the text, using a Chinese version, because of their different ways, the effect seems not very good, detailed look at maps, I hope a similar effect to the google map ! I modified the placement_finder.cpp the corresponding code, which can be achieved a similar effect but there are still some bug, details, please refer to the attached picture and the code, my English is not good, hope you can understand what I mean!
[springmeyer] can you attach a diff file of the placement_finder.cpp?
$ svn diff src/placement_finder.cpp
Also, zip or tar are easier to handle than rar for attaching the other items.
[wiml] I attached a diff of placement_finder.cpp from bug.rar against the version in SVN (also converted it to utf8 from gb18030, but trac's diff formatter still garbles it). The other contents of the rar files are images demonstrating the problem and fix, and a mapstyle.xml file.
I'm not sure I 100% understand the bug and fix. If I understand correctly, the problem is that mapnik doesn't take advantage of the fact that Chinese can be written vertically. When arranging Latin text on a line, mapnik (effectively) lays out the text horizontally and then rotates/bends the text's baseline to match the line. If the line is close to vertical, then Mapnik could get better results by laying out the text vertically and rotating the (vertical) baseline to match the line.
The patch from mmtxcp rotates the individual characters and adjusts their spacing to achieve this effect.
IIRC, Chinese (and Japanese) have some characters which are written differently depending on whether you're writing horizontally or vertically. It would be nice if Mapnik were smart enough to correctly choose the horizontal or vertical glyph forms. Maybe that should be in a separate trac ticket though?
[wiml] I went looking for hand-drawn Chinese maps to see what typographic conventions people follow when not constrained by software. The first (oldest, from 1825) [http://wason.library.cornell.edu/Tianjin/maps.html map of Tianjin in this archive at Cornell] has some interesting features:
A more modern example is [http://mappery.com/map-of/Chengdu-City-Map this map of Chengdu]:
this question has solved ?