Repository navigation
feat(MapView): add experimental styleGlyphURL - #4398
Merged
Merged
Conversation
Apply it with mapbox-gl's Map#setGlyphsUrl on every style load.
mfazekas
force-pushed
the
feat/style-glyph-url
branch
from
October 25, 2026 21:26
3baec55 to
8ba36a3
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added an experimental
styleGlyphURLprop toMapView. It overrides the style's glyph URL so labels can use fonts from another glyph server without editing the style.It maps to iOS
mapboxMap.styleGlyphURL(@_spi(Experimental), 11.8) and AndroidMapboxStyleManager.setStyleGlyphURL(@MapboxExperimental, 11.8), so it works on the current default 11.23.1. The value is re-applied on every style load, the same waylocalizeLabelsis. Removing the prop restores the style's own glyphs from the next style load. The JSDoc marks the prop@experimental.I didn't add an example: a glyph server with fonts matching the Mapbox styles' font stacks isn't something the example app can ship, and a broken URL that hides all labels isn't a useful demo.
On web it maps to mapbox-gl's
Map#setGlyphsUrl(3.11+), applied on every style load.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)Screenshot OR Video
I tested on the iOS simulator (iPhone 17 Pro, iOS 26.5) and an Android emulator (Pixel 6), using a temporary screen that isn't in this PR. It had a Street/Dark style toggle and
styleGlyphURLtoggling betweenhttps://glyphs.invalid/{fontstack}/{range}.pbfand unset. Both platforms behaved the same: