Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vietnamese names are mis-rendered #6939

Closed
interDist opened this issue Jul 10, 2018 · 7 comments
Closed

Vietnamese names are mis-rendered #6939

interDist opened this issue Jul 10, 2018 · 7 comments

Comments

@interDist
Copy link

interDist commented Jul 10, 2018

The rendering of the full Vietnamese names of places and streets (containing all Vietnamese diacritics) is faulty. Usually only a couple of vowels are displayed.

mapbox-gl-js version: v0.45.0

browser: any

Demonstration

image

Expected Behavior

Any Vietnamese name is rendered correctly. For example, the two biggest cities should be rendered HÀ NỘI and THÀNH PHỐ HỒ CHÍ MINH.

Actual Behavior

Most Vietnamese names are rendered inadequately. For example, for the two biggest cities the map shows “Ộ” and “Ố Ồ”... This seems to be unrelated to the actual font used.

@jfirebaugh
Copy link
Contributor

Like #6940, this may be an issue with the style itself, but I'm not sure. CC @ChrisLoer.

@ChrisLoer
Copy link
Contributor

Yeah, it could be an issue with the font (although I notice you said you tried multiple fonts), or it could also be an issue with the data in your tiles. For instance I think the mapbox-streets data source uses "normalization form C" (aka precomposed characters). If your strings aren't normalized or are using a decomposed normalization, that will increase the likelihood of errors -- our text rendering engine only handles simple per-character glyph offsets, and if the font you're using depends on any more advanced layout features for doing character composition, we'll ignore them. We track that issue at mapbox/mapbox-gl-native#7774, but I suspect in your case it should be tractable for you to make a fix on the style/data side.

Here's an example of Vietnamese text rendering using the streets-v10 style against the mapbox-streets-v7 data source:

screenshot 2018-07-10 09 44 16

@interDist
Copy link
Author

Actually, @ChrisLoer, this issue manifests itself on all maps (and styles) demonstrated on openmaptiles.org...

@ChrisLoer
Copy link
Contributor

Yes, this looks like an issue with openmaptiles.org -- they use Mapbox gl-js to render, but they're not using Mapbox-provided data. If you want to file an issue with them, you can point to a specific tile, e.g.:

curl 'https://maps.tilehosting.com/data/v3/11/1625/900.pbf?key=alS7XjesrAd6uvek9nRE' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' -H 'Origin: https://openmaptiles.org' --compressed

This tile contains "Hanoi". If you look at their style, they display {name:latin}↵{name:nonlatin} for city labels. If you look inside the PBF, you will see that Hanoi has name:nonlatin �ộ��. I have no idea what's going on there, but it looks like a pretty clear data issue -- maybe a bug in how they import data from OpenStreetMap?

@ChrisLoer
Copy link
Contributor

P.S. If you do file an issue at https://github.com/openmaptiles/openmaptiles/issues, cc me, I'll be interested in following along! We definitely want to do what we can to make sure we're working well with non-mapbox data sources.

@nijuworks
Copy link

Are there any quick fixes for this?

@ChrisLoer
Copy link
Contributor

Are there any quick fixes for this?

Well, you could always use a Mapbox-provided style with a similar look-and-feel (like https://www.mapbox.com/maps/light-dark/). 😉

If you still want to use data from openmaptiles.org (which is NOT affiliated with Mapbox, although we do like them!), you could modify the style not to use the name:nonlatin field (that's the one that's messed up in some of their data). Unfortunately we can't provide general support on how to do that here (the issues in this repository are only for tracking problems in the Mapbox GL JS rendering engine itself).

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

No branches or pull requests

4 participants