mapbox / mapbox/mapbox-gl-js

Mixed CJK/Latin labels are upside-down at 45°

Open
#3,661 0 comments 0 reactions 0 assignees View on GitHub
bug :lady_beetle:
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):

45°
225°

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

![upside-down](https://cloud.githubusercontent.com/assets/1231218/20419807/c80e6b52-ad0d-11e6-80d4-f29585f2c0e0.png)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.