maplibre / maputnik

An open source visual editor for the 'MapLibre Style Specification'
https://www.maplibre.org/maputnik
MIT License
2.08k stars 397 forks source link

add toggle `localIdeographFontFamily` options of MapLibre GL JS for CJK fonts #892

Closed Kanahiro closed 6 months ago

Kanahiro commented 6 months ago

https://maplibre.org/maplibre-gl-js/docs/examples/local-ideographs/

HarelM commented 6 months ago

Is there a default we can use that will "just work" like we do for RTL languages (We always load the RTL plugin)? I prefer something that the user won't need to configure if possible...

Kanahiro commented 6 months ago

Thank you for comment. How about setting localIdeographFontFamily to false as a default? This makes Map to load any glyphs of CJK fonts which defined in style, from server.

HarelM commented 6 months ago

Feel free to open a PR with the relevant change, probably around here: https://github.com/maplibre/maputnik/blob/ff15b77b7f07e009457198b232e99344f1bc9ce2/src/components/MapMaplibreGl.tsx#L130 I don't have the means to test this, so if you could make sure it works before opening the PR it would be great.