artemp/mapnik — Issue #530: Implement a true type glyph renderer
Author: artemp
Created: 2011-10-11 16:24:17+00:00
State: open
Labels: Symbolizers

I'd like to implement a new GlyphSymbolizer for mapnik2.

This symbolizer renders a TrueType glyph on the label_position of every feature that matches. The size, color and orientation of the glyph can be defined with the new expressions in mapnik2. This should (I hope) allow these parameters to be derived from the feature being processed.

There's some overlap with TextSymbolizer, the main differences are:

* Will only do POINT placement of (probably) just one character. Placement logic is much less sophisticated.
* Will allow arbitrary rotation along the glyph's center using an expression

The main use-case I need this for is to represent arrows (from the ITZ Zapf Dingbats fontset) in a map to visualize wind direction and speed. Other use-cases could be:

* Render "you are here" kind of arrows.
* Visualize other kind of fields.
* Replace almost any use of PointSymbolizer + png icon with a scalable true-type glyph. Unfortunately the glyph is mono-chromatic.

I've also posted the patch on a review-request at http://codereview.appspot.com/632041/show.

Please comment if I'm on the right track regarding the API and, most importantly, if mapnik wants this at all. :)

Alberto