mapbox / mapbox/mapbox-gl-js

Single-character tate-chu-yoko (unrotated letters and numbers in vertical text)

Open
#3,588 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Following up from #3506 and https://github.com/mapbox/mapbox-gl-js/pull/3438#issuecomment-259611065, when a label is vertically oriented with a vertical writing mode, any one- or two-digit numbers (and one- or two-letter words) would ideally be left upright, their digits placed side-by-side. The same should happen for one- or two-letter runs of Latin text. This effect is called tate-chu-yoko in Japanese:

Currently, we replace a punctuation character with its fullwidth analogue if both adjacent characters are compatible with vertical writing. This heuristic is conservative enough that we could implement single-character tate-chu-yoko simply by mapping all the ASCII numbers and letters to their fullwidth analogues in lookup (or leftAndRightBinding once #3587 is implemented), or by adding 0xfee0 to the character code of any ASCII number or letter.

/cc @lucaswoj @nickidlugash @friedbunny

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

Start by tracing the vertical-writing punctuation replacement in lookup; if #3587 has landed, compare the related leftAndRightBinding path. Verify the handling of one- and two-character ASCII number and Latin-letter runs in vertical labels, and confirm the existing vertical-writing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, internationalization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.