-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix icon text fit #8741
Commits on Sep 24, 2019
-
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.
Configuration menu - View commit details
-
Copy full SHA for dcd271b - Browse repository at this point
Copy the full SHA dcd271bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4da717e - Browse repository at this point
Copy the full SHA 4da717eView commit details -
move icon-text-fit to addFeature, mirroring native
also add a lot more unit and render tests
Configuration menu - View commit details
-
Copy full SHA for bdd4514 - Browse repository at this point
Copy the full SHA bdd4514View commit details -
Configuration menu - View commit details
-
Copy full SHA for 775ae53 - Browse repository at this point
Copy the full SHA 775ae53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e73e4d - Browse repository at this point
Copy the full SHA 9e73e4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for efecde5 - Browse repository at this point
Copy the full SHA efecde5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6608465 - Browse repository at this point
Copy the full SHA 6608465View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95c918b - Browse repository at this point
Copy the full SHA 95c918bView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.