Mixed CJK/Latin labels are upside-down at 45°
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 0.28.0
A label containing both CJK and Latin text has upside-down Latin text from 0° to 45° and from 180° to 225° (clockwise from up):

You can see this problem in one of our test cases:

At these angles, the Latin text should probably be rotated 180°, so that, in the screenshots above, the “d” in “Road” would abut the 路 in 菩提路. This would be an unusual configuration in CJK printed matter that would sort of break up the reading order. However, it’s pretty rare for CJK publications to show mixed CJK and Latin text running down a 45-degree path, and I figure the user would be reading either the CJK side or the Latin side.
@nickidlugash @xrwang, do you agree?
/cc @lucaswoj
Contributor guide
Research direction
Start by reproducing the behavior in the test case referenced by the issue and compare label orientation between 0°–45° and 180°–225°. The work is done when mixed CJK/Latin labels no longer render the Latin text upside-down in those ranges and the relevant test or visual check confirms the corrected orientation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100