mapbox / carto

fast CSS-like map stylesheets
https://cartocss.readthedocs.io/
Apache License 2.0
652 stars 129 forks source link

Fix documentation of text-line-spacing #452

Closed sommerluk closed 7 years ago

sommerluk commented 7 years ago

At https://github.com/mapbox/carto/blob/master/docs/latest.md#text-line-spacing-unsigned it is declared that text-line-spacing is an unsigned value. So negative values are declared is illegal (and I suppose it means also that only integer values are allowed, right?).

However line-spacing at Mapnik at https://github.com/mapnik/mapnik/wiki/TextSymbolizer is declared as double.

I’ve tested negative floating point values like “-5.9” in the CartoCSS-Mapnik-combination, and indeed it decreases the baseline-to-baseline distance of the lines.

I do not know how CartoCSS works internally, but I suppose that it forwards simply the value of “text-line-spacing” to the Mapnik counterpart “line-spacing”. So I guess the documentation of CartoCSS should be fixed to allow also negative floating point values for text-line-spacing.

nebulon42 commented 7 years ago

Thanks for noticing! I'm pretty sure there is no specific logic for this, so it is like you say: The value is directly given to Mapnik. All the details come from mapnik-reference, for example see here: https://github.com/mapnik/mapnik-reference/blob/gh-pages/3.0.6/reference.json#L2125

Could you please report this to mapnik-reference?

sommerluk commented 7 years ago

Could you please report this to mapnik-reference?

https://github.com/mapnik/mapnik-reference/issues/124

nebulon42 commented 7 years ago

Re-opening until resolved upstream.

nebulon42 commented 7 years ago

PR: https://github.com/mapnik/mapnik-reference/pull/130