Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextLayer filled/stroked options and getFillColor/getLineColor accessors #3750

Closed
5 tasks
cneumann opened this issue Oct 4, 2019 · 1 comment
Closed
5 tasks
Labels

Comments

@cneumann
Copy link
Contributor

cneumann commented Oct 4, 2019

Target Use case

With certain map styles (or if an application supports switching map style) it can be difficult (or impossible) to select a text color that provides good contrast against all areas of the map. A simple workaround can be to render (for example) with a dark font color and a thin light color outline.

Proposed feature

Similar to PolygonLayer supporting filled/stroked props and corresponding color accessor functions, add those same props to TextLayer. For SDF fonts this can be implemented by using a different shader - see e.g. https://stackoverflow.com/questions/26155614/outlining-a-font-with-a-shader-and-using-distance-field
It would be fine if support is dependent on fontSettings.sdf=true.

To Do List

  • Add label and assign to milestone
  • Coding
  • Doc update
  • What’s new update
  • Test
@Pessimistress
Copy link
Collaborator

This is now available in 8.5.0-alpha.1: https://github.com/visgl/deck.gl/blob/master/docs/api-reference/layers/text-layer.md#outlinewidth-number-optional

fontSettings: {sdf: true} is required to use this feature.

Closing this issue to consolidate with #4579. If you have any feedback regarding this feature before the 8.5 release, feel free to discuss it in the master feature request thread.

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

No branches or pull requests

2 participants