mapbox / mapbox/mapbox-gl-js

Text halos do not overlay other text in the layer

Open
#4,709 10 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature :green_apple:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Hi, I'm not sure this is a bug because I'm probably using mapbox in an unusual way, but I think this would hold good for any overlapping text.

I was using text symbols with a custom font to display color-able map points. This works great but not when there are a lot of points close together. By putting a text-halo on the style I get an outline but from what I understand of the code all the halos are drawn then the text drawn on top. This means they don't overlap and give a distinct outline. Is there a better way of doing this? Would a text-stroke differentiated from text-halo that is drawn at the same time as the text be a good way to go?

![image](https://cloud.githubusercontent.com/assets/23341752/25994084/5dfa8602-3704-11e7-910e-0d9f809908e8.png)

Amazing work guys.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the overlap with custom-font text symbols and a text-halo, then read the issue's comment discussion for the intended rendering behavior. Done means the handling of halos for closely overlapping text is resolved or the proposed text-stroke approach has a clear design decision and verification case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
computer-graphics, frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.