-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
In labels in vertical writing mode, replace punctuation with fullwidth equivalents #3505
Comments
Per #3438 (comment), this is also necessary because a non-CJK glyph may in many cases extend upwards past the cap height, which would cause it to collide with the previous character in vertical text. |
Which of these should our criteria be?
|
Most CJK punctuation marks have a built-in space, so they bind to one side or another: for example, We might have to endure some trial and error with |
To clarify my comment about the solidus character, this punctuation mark should actually not get rotated – only the characters in the list above should get rotated. So this ticket will not solve the solidus issue (although parenthesis, which are on the list, have the same overshoot issue). |
Wouldn't we want to rotate the solidus once #3506 is implemented? |
Actually, there's a whole complement of fullwidth forms we can use for cases where we want to avoid rotating a Western character. For example, we'd replace any solidus adjacent to CJK with |
see my previous comment regarding this. |
And yes, we do not want to rotate the solidus if it is surrounded by CJK. |
Rather than mark this a "release blocker", I'm going to roll this into #3438 |
My understanding is that the ordinary ASCII character is preferred for horizontal text while the fullwidth form is preferred for vertical text. The same is true for the quote marks in Simplified Chinese (e.g., |
Fullwidth punctuation is surprisingly quite common on linear features in Mapbox Streets data, especially on highway names. In OpenStreetMap, a mere 133 ways use fullwidth punctuation in These queries don’t account for ASCII punctuation that often occurs in conjunction with Chinese text. |
Initial work done in mapbox/mapbox-gl-test-suite@b6281b1 and 4d5f5e6 |
Done in #3438 |
Next steps: #3587. |
Per #3438 (comment), but various Chinese and Japanese dashes and brackets are rotated 90° or 180° when laid out vertically. Apart from dashes and parentheses, punctuation might be uncommon in road names (the most commonly line-placed names). However, if it ever occurs, the result could be confusing. For example, an em dash (—), left unrotated, could be confused with a radical (丨) or numeral (〡).
Below are the affected punctuation marks and their vertical forms. Some of them, like the em dash, are used both in Chinese and in English, so the replacement should only occur adjacent to a vertical (CJK) character lest the English side of a bilingual label get mangled.
/cc @lucaswoj @nickidlugash @xrwang @friedbunny
The text was updated successfully, but these errors were encountered: