{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1333","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1333/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1333/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1333/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/1333","id":70502590,"number":1333,"title":"text-max-size is applied to text-size, not just collision box","user":{"login":"friedbunny","id":1198851,"avatar_url":"https://avatars.githubusercontent.com/u/1198851?v=3","gravatar_id":"","url":"https://api.github.com/users/friedbunny","html_url":"https://github.com/friedbunny","followers_url":"https://api.github.com/users/friedbunny/followers","following_url":"https://api.github.com/users/friedbunny/following{/other_user}","gists_url":"https://api.github.com/users/friedbunny/gists{/gist_id}","starred_url":"https://api.github.com/users/friedbunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/friedbunny/subscriptions","organizations_url":"https://api.github.com/users/friedbunny/orgs","repos_url":"https://api.github.com/users/friedbunny/repos","events_url":"https://api.github.com/users/friedbunny/events{/privacy}","received_events_url":"https://api.github.com/users/friedbunny/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-23T20:14:45Z","updated_at":"2015-04-24T22:36:54Z","closed_at":"2015-04-24T22:36:54Z","body":"Per @peterqliu in chat, -native mistakenly applies the `text-max-size` styling property to the entire text and not just the collision box. Effectively, `text-size` can never be larger than `text-max-size`, even if it should be.\r\n\r\nYou can see this in [Emerald's city labels](https://github.com/mapbox/mapbox-gl-styles/blob/mb-pages/styles/emerald-v7.json#L1889-L1938). Set `text-max-size: 35` and city labels scale as expected.\r\n\r\nGL-JS appears to implement this properly ([example](https://www.mapbox.com/bites/00116/?style=peterqliu.9e140828&access_token=pk.eyJ1IjoicGV0ZXJxbGl1IiwiYSI6ImpvZmV0UEEifQ._D4bRmVcGfJvo1wjuOpA1g#14.24/37.7774/-122.4165), [code](https://github.com/mapbox/mapbox-gl-js/blob/2fbcd24c8e2972b918605203d11f2ad0b2e43233/js/data/symbol_bucket.js#L130-L172)), to spec.\r\n\r\n[Here is `SymbolBucket::addFeature` on -native.](https://github.com/mapbox/mapbox-gl-native/blob/ec94e03a8ef91442a7aa7509d3925c1626b05300/src/mbgl/renderer/symbol_bucket.cpp#L225-L353)\r\n\r\nThe style spec says:\r\n\r\n>**text-max-size**\r\n>*Optional number.  Units in pixels. Defaults to 16. Requires text-field.*\r\n>The maximum size text will be laid out, to calculate collisions with.\r\n\r\nIt seems like this property should be renamed to something like `text-max-collision-size` if it's not meant to constrain `text-size`.\r\n"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/96085564","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/1333#issuecomment-96085564","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1333","id":96085564,"user":{"login":"ansis","id":1421652,"avatar_url":"https://avatars.githubusercontent.com/u/1421652?v=3","gravatar_id":"","url":"https://api.github.com/users/ansis","html_url":"https://github.com/ansis","followers_url":"https://api.github.com/users/ansis/followers","following_url":"https://api.github.com/users/ansis/following{/other_user}","gists_url":"https://api.github.com/users/ansis/gists{/gist_id}","starred_url":"https://api.github.com/users/ansis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansis/subscriptions","organizations_url":"https://api.github.com/users/ansis/orgs","repos_url":"https://api.github.com/users/ansis/repos","events_url":"https://api.github.com/users/ansis/events{/privacy}","received_events_url":"https://api.github.com/users/ansis/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T22:36:54Z","updated_at":"2015-04-24T22:36:54Z","body":"Fixed in https://github.com/mapbox/mapbox-gl-native/commit/17010bfd73f2c8e94318fece0b216ec4f91b6f91\r\n\r\n-js cleaned up in https://github.com/mapbox/mapbox-gl-js/commit/98af02492183975f1f17e089a7a4118ac1ec6ddf"}}