mapbox / mapbox/mapbox-gl-js

When a character from custom font is not found.

Open
#12,975 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**mapbox-gl-js/v2.1.1**:

### Question

I have set glyphs to my custom font url but there scenarios which are breaking the font when some character is not found. A character `〜` is not found and then mapbox tries to request from a different range from 0-255 -> some other range but that range does not exist in my font as i only have 0-255 range. How can i add a fallback that either it finds the `〜` and displays or it shows a `?` instead of the characters which are not found.

Due to this my map style is breaking.

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

Reproduce the behavior in mapbox-gl-js/v2.1.1 with a custom glyphs URL and the missing character `〜`. Start by tracing how missing glyphs trigger requests for other ranges, then define and verify the intended fallback behavior so the map style remains usable when a character is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.