Ticket #38 (assigned defect)

Opened 18 months ago

Last modified 7 weeks ago

Vertical Displacement of line text

Reported by: osm@… Owned by: dave
Priority: critical (top) Milestone:
Component: Core Library Version:
Severity: Normal Keywords:
Cc: gravitystorm Patch Needs Improvement: no
Needs Docmentation: no Has Patch?: no
Design Decision Needed: no

Description

It would be nice to be able to write text along a line with a "vertical" displacement, so that a streetname could be rendered alongside the street. Similar to that for the dy attribute to point textsymbolizer.

<TextSymbolizer name="lcn_ref" face_name="DejaVu Sans Book" size="14" fill="blue" halo_radius="2" placement="line" dy="80"/>

The displacement would probably refer to the distance between the line and text path at right angles to the line, rather than a vertical displacement on the final render. The latter wouldn't work for north-south streets!

Consideration would need to be given to corners in lines, e.g. the displacement given would indicate the gap between the two paths, and would have to be maintained around the corners.

Attachments

2734.png (28.5 kB) - added by gravitystorm 12 months ago.
Image showing poor text placement
fix_1.png (67.0 kB) - added by dave 12 months ago.
New displacement handling style

Change History

Changed 12 months ago by gravitystorm

Image showing poor text placement

Changed 12 months ago by gravitystorm

  • type changed from enhancement to defect

This was made possible by [493] about five months back, but the text positioning is often sub-optimal, with characters overlapping one another and other positioning artefacts.

For example, see the attached file with three examples of the number 16 written with a dy = '5' on the TextSymbolizer. The first is correct on a straight line, the second exibits excessive spacing between characters, and the third shows characters badly overlapping. <TextSymbolizer name="lcn_ref" face_name="DejaVu Sans Book" size="14" fill="blue" halo_radius="1" placement="line" dy="5" minimum_distance="50"/>

Changed 12 months ago by gravitystorm

  • keywords gravitystorm added

Changed 12 months ago by dave

New displacement handling style

Changed 12 months ago by dave

  • owner changed from artem to dave
  • status changed from new to assigned

I've changed how displacement is done in the r597, now the same angle of displacement is applied to the whole string, instead of on a per character basis. Example: http://trac.mapnik.org/attachment/ticket/38/fix_1.png

Test and give some feedback :)

Changed 4 months ago by anonymous

aluminum modern log banister DECK outdoor price installing metal stair rails Interior stair handrail exterior http://www.cheap-wrought-iron.cn baluster Glass wood stainless wrought CONTEMPORARY designs stairways aluminum modern log banister DECK outdoor price posts vinyl curved rails posts vinyl curved rails

Changed 4 months ago by springmeyer

  • priority set to critical (top)

Andy, Have you had a chance to test and comment? Is Dave's r597 working for you?

Changed 4 months ago by springmeyer

  • cc gravitystorm added
  • keywords gravitystorm removed

Changed 7 weeks ago by springmeyer

  • has_patch unset
  • patch_need_improvement unset
  • need_documentation unset
  • design_decision_needed unset

noting here that Ticket #71 requests a related feature - line offsetting (in addition to text offsets)

Note: See TracTickets for help on using tickets.