Opened 11 years ago

Closed 11 years ago

#1144 closed enhancement (fixed)

Make label halo configurable

Reported by: Colin Marquardt Owned by: Chris Browet
Priority: minor Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

I just added the font stuff to MapnikPlus?.mas in SVN (very nice feature BTW, thanks!), and it appears that a font is always scaled so that it fits within the drawn limits of a road. This is a small problem for tracks and footways (which can also have names), as the name becomes visible only at very high zoom.

Some ASCII art examples follow.

Fine and working (road is usually drawn wide enough so that the text fits in):

--------------------
    My Roadname
--------------------

The desired effect for a footway or track (text should be bigger than the line width in order to be useful):

-----My Footwayname------

Change History (8)

comment:1 Changed 11 years ago by Chris Browet

Status: newassigned

I know, I know...

I was too lazy to do fine tuning of sizes to fit in roads so I did it automatically. Obviously, I didn't think about 1 pix roads.

I'll remove the "automatic" code and leave it to you to do the tuning ;-) (Will certainly speedup rendering, too)

comment:2 Changed 11 years ago by Chris Browet

BTW, do you think you could port your changes to Mapnick.mas, too. I've made some changes, more as a showcase than anything else.

You are definitely the official Merkaartor styler ;-)

Thanks.

comment:3 Changed 11 years ago by Chris Browet

Resolution: fixed
Status: assignedclosed

(In [10477]) FIX : Allow font bigger than road width (fixes #1144)

comment:4 in reply to:  2 Changed 11 years ago by Colin Marquardt

Replying to koying:

BTW, do you think you could port your changes to Mapnick.mas, too. I've made some changes, more as a showcase than anything else.

You are definitely the official Merkaartor styler ;-)

Sure, no problem, will do.

comment:5 in reply to:  3 Changed 11 years ago by Colin Marquardt

Replying to koying:

(In [10477]) FIX : Allow font bigger than road width (fixes #1144)

Thanks, that works nicely. One more thing: sometimes, the font has a halo (e.g. for town names), but other times, it has not. I don't seem to be able to control that halo from a style file, or am I missing something? It would be nice to show a halo for e.g. tracks because of the dark background it has.

comment:6 Changed 11 years ago by Chris Browet

Resolution: fixed
Status: closedreopened
Summary: Allow font bigger than road widthMake label halo configurable

The halo is hardcoded when the style is applied to a trackpoint, as the fact that the label follow the path is hardcoded to roads. I did it to be sure that the label would be visible whatever background it was drawn upon (à la osmarender).

I'll see what I can do without making the style editor too cumbersome.

comment:7 Changed 11 years ago by Colin Marquardt

A simple "Apply halo" checkbox would be enough, it doesn't need a configurable halo radius or some such I think.

comment:8 Changed 11 years ago by Chris Browet

Resolution: fixed
Status: reopenedclosed

(In [10898]) ADD : add support for MTK-based GPSes ADD : add "Halo" label option to the style editor (closes #1144)

Note: See TracTickets for help on using tickets.