You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
test-suite text-rotation-alignment tests are failing #6410
Three text-rotation-alignment tests in the test-suite are rendering differently than gl-js. This is fallout of #6253 but appears to be related to the placement algorithm or symbol-spacing rather than text-rotation-alignment itself.
It looks like the root of this problem may be the use of float rather than double for symbol layout properties such as text-line-height. The default value for text-line-height is 1.2, which cannot be represented precisely by a float. This cascades into significant errors in subsequent computations compared to gl-js, which is using doubles exclusively.
is there any reason for these not to be the same? Should it be 0.25 or 0.5?
I think they should be the same.
I think 0.5 seems good. I think maybe it should be sharing a constant value with the minScale used in quads.js/cpp. But maybe they can be different and the CollisionTile version can be changed to 0 and eliminated completely?
The only thing I think this affects is whether labels are visible when you quickly zoom out and underscale a tile.
I don't think this should have any effect on placement in a tile's intended zoom range.
Activity
jfirebaugh commentedon Sep 22, 2016
It looks like the root of this problem may be the use of
floatrather thandoublefor symbol layout properties such astext-line-height. The default value fortext-line-heightis1.2, which cannot be represented precisely by afloat. This cascades into significant errors in subsequent computations compared to gl-js, which is using doubles exclusively.jfirebaugh commentedon Sep 22, 2016
Another issue is that native
Shapingusesint32_tcoordinates, while JS uses unrounded doubles.jfirebaugh commentedon Sep 22, 2016
gl-native
CollisionTile::minScale = 0.5f. gl-jsCollisionTile.prototype.minScale = 0.25@ansis is there any reason for these not to be the same? Should it be 0.25 or 0.5?
jfirebaugh commentedon Sep 22, 2016
Another float vs integer discrepancy, this one going in the opposite direction: gl-js round trips collision box coordinates through Int16, while native keeps them floating point.
ansis commentedon Sep 22, 2016
I think they should be the same.
I think 0.5 seems good. I think maybe it should be sharing a constant value with the minScale used in quads.js/cpp. But maybe they can be different and the CollisionTile version can be changed to 0 and eliminated completely?
The only thing I think this affects is whether labels are visible when you quickly zoom out and underscale a tile.
I don't think this should have any effect on placement in a tile's intended zoom range.
jfirebaugh commentedon Sep 23, 2016
Fixed by tweaking the test case. Using #3841 to track the above issues.