mapbox / mapbox/mapbox-gl-js

Adjusting offset for vertical-supporting CJK with symbol-placement: line

Open
#9,134 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### Question
CJK fonts can be displayed in vertical but others like number are still displays in horizontal. It's okay but the space between number and the text right next to the number is narrow(depending on fonts, it may look they are stick together). So, I changed the value of [5](https://github.com/mapbox/mapbox-gl-js/issues/5090#issuecomment-320117718) to 8.
(value 5 is what @ChrisLoer experimentally selected: detail's in [here](https://github.com/mapbox/mapbox-gl-js/issues/5090#issuecomment-320117718))
Seems like the value might be depending on the font, so I'm not sure the offset can be fixed as 5.

### Screenshot
when the value is 5: unbalanced space beside the number
![image](https://user-images.githubusercontent.com/7428017/71223979-870a2e00-2318-11ea-970c-ea1532e2d3f7.png)

when the value is 8:
![image](https://user-images.githubusercontent.com/7428017/71223896-72c63100-2318-11ea-852a-832fd46ef10a.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked Mapbox GL JS issue #5090 discussion to understand the experimental offset of 5, then locate the symbol-placement: line handling for vertical-supporting CJK text. Compare the spacing shown with offsets 5 and 8 across relevant fonts; done means selecting and documenting an offset that avoids the reported cramped spacing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.