Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Make label halo configurable #1144

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments
Closed

Make label halo configurable #1144

openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments

Comments

@openstreetmap-trac
Copy link

Reporter: ColinMarquardt
[Submitted to the original trac issue database at 2.28pm, Wednesday, 3rd September 2008]

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------
@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 8.34am, Thursday, 4th September 2008]

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)

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 11.25am, Thursday, 4th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 11.26am, Thursday, 4th September 2008]

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

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 2.35pm, Thursday, 4th September 2008]

Replying to [comment:2 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.

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 8.25pm, Monday, 8th September 2008]

Replying to [comment:3 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.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 9.45pm, Monday, 8th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 7.24am, Tuesday, 9th September 2008]

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

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 12.07pm, Thursday, 25th September 2008]

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant