Skip to content

Upgrade maplibre-gl dependency, fixing CJK labels#6377

Closed
mapmeld wants to merge 2 commits intoopenstreetmap:masterfrom
mapmeld:maplibre-up
Closed

Upgrade maplibre-gl dependency, fixing CJK labels#6377
mapmeld wants to merge 2 commits intoopenstreetmap:masterfrom
mapmeld:maplibre-up

Conversation

@mapmeld
Copy link
Copy Markdown
Contributor

@mapmeld mapmeld commented Sep 3, 2025

Chinese map labels with the new vector tile / MapLibre GL layers haven't been rendering properly in the Chrome browser.
When the user sets their UI language to Traditional Chinese, these two labels should have these characters rendered as and :

image

In mapbox/tiny-sdf#58 and maplibre/maplibre-gl-js#6223 we added support for MapLibre to pass the document language to Tiny-SDF, and Tiny-SDF sets the language in the canvas ctx.lang to render CJK characters. So I think all that's left is upgrading maplibre-gl here. If we need to update yarn.lock too please let me know.

Note: in the MapLibre GL layers, switching the UI language changes which name tag we prefer. So we're rendering CJK characters in the user's language and NOT trying to render Hong Kong in Traditional Chinese, Beijing in Simplified Chinese, Tokyo in Japanese, etc.

@tomhughes
Copy link
Copy Markdown
Member

I wonder why dependabot hasn't already suggested this? In any case you need to fix the lock file...

@mapmeld
Copy link
Copy Markdown
Contributor Author

mapmeld commented Sep 3, 2025

oh! It looks like yarn.lock was mostly on 5.7.0 already and we just didn't have an upgrade in package.json

I had this PR queued up for when maplibre-gl was released and didn't notice it is fixed on the OSM main site already.

@tomhughes
Copy link
Copy Markdown
Member

Ah yes dependabot already bumped it in #6357.

@mapmeld mapmeld closed this Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants