Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Break lines on com­mon­ly un­spaced punc­tu­a­tion - #2598

Merged
1ec5 merged 1 commit into
masterfrom
1ec5-taumata­whakatangi­hanga­koauau­o­tamatea­turi­pukaka­piki­maunga­horo­nuku­pokai­when­ua­ki­tana­tahu-2595
Oct 13, 2015

Hidden character warning

The head ref may contain hidden characters: "1ec5-taumata\u00adwhakatangi\u00adhanga\u00adkoauau\u00ado\u00adtamatea\u00adturi\u00adpukaka\u00adpiki\u00admaunga\u00adhoro\u00adnuku\u00adpokai\u00adwhen\u00adua\u00adki\u00adtana\u00adtahu-2595"
Merged

1ec5 merged 1 commit into
masterfrom
1ec5-taumata­whakatangi­hanga­koauau­o­tamatea­turi­pukaka­piki­maunga­horo­nuku­pokai­when­ua­ki­tana­tahu-2595

Conversation

@1ec5

@1ec5 1ec5 commented Oct 12, 2015

Copy link
Copy Markdown
Contributor

This PR breaks lines in labels on commonly unspaced punctuation, par­ti­cu­lar­ly hy­phens (important in French-speaking regions) and soft hy­phens (important in Welsh, Thai, and Māori-speaking regions).

Before:
montreal-before

After:
montreal-after

Stress test:

taumata­whakatangi­hanga­koauau­o­tamatea­turi­pukaka­piki­maunga­horo­nuku­pokai­when­ua­ki­tana­tahu

Fixes #2595.

/cc @ansis @nickidlugash @mikemorris @peterqliu

@1ec5 1ec5 self-assigned this Oct 12, 2015
@friedbunny

Copy link
Copy Markdown
Contributor

Love everything about this.

@nickidlugash

Copy link
Copy Markdown
Contributor

Awesome 👍

@mikemorris

Copy link
Copy Markdown
Contributor

This is great @1ec5 👍

@peterqliu

Copy link
Copy Markdown
Contributor

👏

Par­ti­cu­lar­ly hy­phens and soft hy­phens.

Fixes #2595.
@1ec5
1ec5 force-pushed the 1ec5-taumata­whakatangi­hanga­koauau­o­tamatea­turi­pukaka­piki­maunga­horo­nuku­pokai­when­ua­ki­tana­tahu-2595 branch from 488a220 to 5979994 Compare October 13, 2015 16:54
@1ec5
1ec5 merged commit 5979994 into master Oct 13, 2015
@1ec5 1ec5 removed the in progress label Oct 13, 2015
@1ec5
1ec5 deleted the 1ec5-taumata­whakatangi­hanga­koauau­o­tamatea­turi­pukaka­piki­maunga­horo­nuku­pokai­when­ua­ki­tana­tahu-2595 branch October 13, 2015 17:12
@ajashton

Copy link
Copy Markdown
Contributor

Flagging a minor issue with this - different languages have different conventions for wrapping on a hyphen. This came up previously in the Mapnik project. I'm not sure what's needed to support multiple wrapping styles - seems like it would have to be an option & implemented in the gl-style-spec?

@mikemorris

Copy link
Copy Markdown
Contributor

@ajashton Eventually line-breaking should be handled by Harfbuzz.

@1ec5

1ec5 commented Oct 13, 2015

Copy link
Copy Markdown
Contributor Author

Yes, this PR is but a stopgap for a very common case. Languages have different conventions for wrapping on spaces, too, but we currently ignore those conventions for simplicity’s sake. Employing Harbuzz would address a number of other text wrapping issues like #1223 that we aren’t prepared to think about quite yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants