-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CJK local glyph generation overrides custom text-font #14470
Comments
/cc @fabian-guerra |
Hi, @honjo2. Thank you for using Mapbox. I am sorry to hear you are having some issues. Could you please provide us with a code snippet or test app we could use to track down the issue? Also, starting
|
My web site using Mapbox GL JShttps://mapion.github.io/mapion-vector/#15/35.62277/139.75021 Style URLUsing mapbox-ios-sdk-4.9.0 (no problem)Using mapbox-ios-sdk-4.10.0 (There is a problem)ProblemWhy, only KANJI will be PingFang. |
Hi, @honjo2. Thank you for your reply. In my previous message asked you to try a workaround using Is it possible you could share the style url and the account name where is uploaded? If you are not comfortable sharing the info here, you can send an email to customer support here https://support.mapbox.com/hc/en-us/requests/new?ticket_form_id=360000291231 and reference this ticket. |
in Swift, please |
Hi, @honjo2. This link has an example on how to create an attributed expression in Swift: https://docs.mapbox.com/ios/api/maps/4.10.0/Classes/MGLAttributedExpression.html If you meant how to use it with the text then:
Could you please share with Mapbox support your account name, and style url so we can track down the issue: In the ticket please reference this link. |
#13988 switched to local font rendering for all Han codepoints, including kanji in Japanese, and defaulted to a Simplified Chinese font. When local font rendering is enabled, the Previously, local font rendering would only be enabled when the #7862 tracks using local font rendering for all codepoints in all languages. mapbox/mapbox-gl-js#3999 and mapbox/mapbox-gl-js#6197 discuss the need to account for language, not just script, in text processing. |
Thanks, @1ec5. @fabian-guerra and I also did some testing:
A few points:
|
Font substitution of Han characters causes more than aesthetic issues: due to Han unification, a number of characters have distinct glyph forms depending on the language (and to a lesser extent the region):
For the purposes of modern map display, hard-coding a Chinese font like PingFang primarily affects Japanese. (Han characters no longer appear in modern place names in Korean or Vietnamese.) There may also be a handful of edge cases in Chinese where a national variant of a character isn’t used where it should be. There are two ways to disambiguate the characters, and both of them would require significant effort on the server side:
Note that, depending on the system locale, operating systems often default to Simplified Chinese fonts in the absence of any language data. /cc @mapbox/language |
From my understanding, our first step is to set a default font for all character sets. It will fix two issues at least:
And next step, as @1ec5 mentioned above, might let sever join this game to improve this. |
|
Updated to mapbox-ios-sdk-4.10.0.
Then text-font has been disabled.
In this way PingFang is applied.
#13988
The text was updated successfully, but these errors were encountered: