Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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

Closed

Description

@jfirebaugh

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.

text-rotation-alignment/{auto,map}-symbol-placement-line

These two tests are expected to produce the same output.

Expected (with/without collison debug):

image image

Actual (with/without collison debug):

image image

text-rotation-alignment/viewport-symbol-placement-line

Expected (with/without collison debug):

image image

Actual (with/without collison debug):

image image

Activity

  1. added
    Core
    on Sep 21, 2016
  2. jfirebaugh commented on Sep 22, 2016

    @jfirebaugh
    ContributorAuthor

    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.

  3. jfirebaugh commented on Sep 22, 2016

    @jfirebaugh
    ContributorAuthor

    Another issue is that native Shaping uses int32_t coordinates, while JS uses unrounded doubles.

  4. jfirebaugh commented on Sep 22, 2016

    @jfirebaugh
    ContributorAuthor

    gl-native CollisionTile::minScale = 0.5f. gl-js CollisionTile.prototype.minScale = 0.25

    @ansis is there any reason for these not to be the same? Should it be 0.25 or 0.5?

  5. jfirebaugh commented on Sep 22, 2016

    @jfirebaugh
    ContributorAuthor

    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.

  6. ansis commented on Sep 22, 2016

    @ansis
    Contributor

    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.

  7. jfirebaugh commented on Sep 23, 2016

    @jfirebaugh
    ContributorAuthor

    Fixed by tweaking the test case. Using #3841 to track the above issues.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Coretests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions