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

Make gl-native handling of newlines conform to gl-js behavior #7253

Closed
ChrisLoer opened this issue Dec 1, 2016 · 5 comments
Closed

Make gl-native handling of newlines conform to gl-js behavior #7253

ChrisLoer opened this issue Dec 1, 2016 · 5 comments
Assignees
Labels
GL JS parity For feature parity with Mapbox GL JS text rendering

Comments

@ChrisLoer
Copy link
Contributor

When I ported my recent gl-native line breaking changes to gl-js, I found that gl-js has tests for labels with newlines in them (https://github.com/mapbox/mapbox-gl-js/blob/master/test/js/symbol/shaping.test.js). The gl-js tests expect each newline to cause a new line to be created, while gl-native will just treat them like whitespace (so two newlines in the middle of your label will be collapsed down to just one breaking point instead of inserting a blank line).

I'm not sure when we would expect labels to have newlines in them, but we should probably standardize on one behavior or the other.

cc @ansis @1ec5

@ChrisLoer ChrisLoer added GL JS parity For feature parity with Mapbox GL JS text rendering labels Dec 1, 2016
@ChrisLoer ChrisLoer self-assigned this Dec 1, 2016
@1ec5
Copy link
Contributor

1ec5 commented Dec 1, 2016

The GL JS behavior sounds more correct.

@ChrisLoer
Copy link
Contributor Author

Ah, I just had to look through the file history to see it was recently added as an enhancement: mapbox/mapbox-gl-js#955

@ChrisLoer
Copy link
Contributor Author

I'll address this with a port of mapbox/mapbox-gl-js#3743 to gl-native. I have the code ready, but waiting for the first PR to go in before making a new PR to keep the test changes from conflicting.

@1ec5
Copy link
Contributor

1ec5 commented Dec 29, 2016

This is happening in #7446.

@ChrisLoer
Copy link
Contributor Author

Closed with #7446.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GL JS parity For feature parity with Mapbox GL JS text rendering
Projects
None yet
Development

No branches or pull requests

2 participants