From 93efb99079f307df0f52affa73d2ae12252bf1aa Mon Sep 17 00:00:00 2001 From: herm Date: Mon, 1 Apr 2013 17:48:48 -0700 Subject: [PATCH] upright=XXX_only --- TextSymbolizer.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TextSymbolizer.md b/TextSymbolizer.md index bc50d07..ad9c560 100644 --- a/TextSymbolizer.md +++ b/TextSymbolizer.md @@ -34,7 +34,7 @@ |orientation||Rotate text|degree|0| |placement-type||Placement finder algorithm. Currently supported: "dummy" (do nothing), "simple" (automatically create new positions using a simple configuration; see below) and "list" (mapnik >=2.1, see below)|string|"dummy"|2.0/2.1 |placements||List of possible placements. Only valid if placement-type="simple" is used.|string|"X"|2.0 -|upright|left,right,auto|Select which way direction is used to place characters upright.|-|auto|harfbuzz +|upright|left,right,auto,left_only,right_only|Select which way direction is used to place characters upright. The XXX_only variant place text only if more than 50% of all character are upright. Together with placement-type="list" this can be used to implement alternate texts. See below for an example. |-|auto|harfbuzz |clip|true, false|If true then the geometry is clipped to the view before doing placements. Improves performance but can cause bad placements when the results are used for tiling|bool|true|2.0.0| |rotate-displacement|Rotates the displacement around the placement origin by the angle given by "orientation"|bool|false|harfbuzz| @@ -150,6 +150,16 @@ becomes This change was made to be forward compatible with changes to text formatting being introduced in later versions. +## Alternate texts for upside down rendering +If some of your text depends on the line direction you need to supply different texts for each direction. This can be done like this: +```xml + + "left only <--" + "right only -->" + +``` + ## New features in HarfBuzz branch * upright="auto/left/right" (See table above) * dx is also used for line placements