More aggressively convert punctuation into fullwidth
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Following up from https://github.com/mapbox/mapbox-gl-js/issues/3505#issuecomment-257971452 and https://github.com/mapbox/mapbox-gl-js/pull/3438#issuecomment-259611065, we should replace certain non-CJK punctuation with their fullwidth equivalents more aggressively to avoid rotating them.
For example, `壹貳參(com)` correctly becomes:
```
壹
貳
參
ᴒ͡
ᴑ
ᴟ
͝
```
but `com(壹貳參)` becomes:
```
ᴒ
ᴑ
ᴟ
壹͡
貳
參
︶
```
whereas it should be:
```
ᴒ
ᴑ
ᴟ
︵
壹
貳
參
︶
```
To get this right, we need to split `verticalize_punctuation.lookup` into three lookup tables (`leftBinding`, `leftAndRightBinding`, and `rightBinding`) and consider only the side(s) to which the character is naturally bound. So `(` would be part of `rightBinding` because the character to the right is the only one that determines its ideographic-ness, whereas `@` would be part of `leftAndRightBinding` because either adjacent character can make it non-ideographic.
/cc @lucaswoj @nickidlugash
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with verticalize_punctuation.lookup and the surrounding verticalization logic. Compare the issue's examples for punctuation beside CJK and non-CJK characters, then verify that the separated binding rules produce the expected fullwidth punctuation and avoid incorrect rotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100