Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

text-fill-opacity ?, text-halo-opacity? #50

Closed
Matsglobetrotter opened this issue May 22, 2011 · 4 comments
Closed

text-fill-opacity ?, text-halo-opacity? #50

Matsglobetrotter opened this issue May 22, 2011 · 4 comments

Comments

@Matsglobetrotter
Copy link

I would like the label of sub county to appear to the same level opacity as I have done the county borders. Thus it is text that I would like to have but it should not feature as prominent as other text. Having the opacity styles that I mention above would be a great addition for that purpose.

ajashton pushed a commit that referenced this issue May 22, 2011
@ajashton
Copy link
Member

Currently the text opacity feature in Mapnik seems to apply the same value to both halo and fill, which is may or may not not be what you want. I've added support for it to Carto anyway, and will investigate whether this is the desired behavior upstream.

For now, you can specify separate halo and fill opacity using the rgba() color format in the text-fill and text-halo-fill properties. For example:

#world {
    text-name: "[NAME]",
    text-face-name: "DejaVu Sans Book";
    text-fill: rgba(128,0,32,0.8);
    text-halo-radius:2;
    text-halo-fill: rgba(255,255,255,0.4);
}

@Matsglobetrotter
Copy link
Author

Thanks for the tip on the workaround. I have already tried it and it does the trick. Look forward to see it being discussed upstream. The other solution would ensure a more consistent style convention.

@tmcw
Copy link
Contributor

tmcw commented May 25, 2011

Great - remaining tasks here are upstream.

@tmcw tmcw closed this as completed May 25, 2011
@ajashton
Copy link
Member

Upstream ticket opened here: http://trac.mapnik.org/ticket/765

ajashton pushed a commit that referenced this issue Aug 4, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants