Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix icon text fit #8741

Merged
merged 8 commits into from
Sep 24, 2019
Merged

Fix icon text fit #8741

merged 8 commits into from
Sep 24, 2019

Commits on Sep 24, 2019

  1. fix icon text fit

    We're adding a 1 pixel border around all icons when adding them to the image atlas texture to avoid having neighboring icons bleed into the current image when using linear texture interpolation. When stretching icons to fit the text's dimensions with `icon-text-fit`, however, we didn't account for this correctly: We didn't add the border in this case, resulting in stretched icons that didn't quite cover the whole text. When the difference between the icon's original size and the stretched size was small, this wasn't really noticeable, especially in cases where we were using nearest neighbor texture interpolation instead of linear interpolation. When accounting for the 1 pixel border, have to to take into account that there's no longer a 1:1 mapping between vertex units and pixel units, and expand the vertices adequately.
    kkaefer committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    dcd271b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4da717e View commit details
    Browse the repository at this point in the history
  3. move icon-text-fit to addFeature, mirroring native

    also add a lot more unit and render tests
    kkaefer committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    bdd4514 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    775ae53 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9e73e4d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    efecde5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6608465 View commit details
    Browse the repository at this point in the history
  8. update render test cases

    kkaefer committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    95c918b View commit details
    Browse the repository at this point in the history