Skip to content

Don't draw SDF image inside text #10989

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

Merged
merged 3 commits into from
Sep 10, 2021
Merged

Don't draw SDF image inside text #10989

merged 3 commits into from
Sep 10, 2021

Conversation

zmiao
Copy link
Contributor

@zmiao zmiao commented Sep 3, 2021

Launch Checklist

SDF image is not supported in text-field since we will try to load sdf image info from glyph atlas instead of sprite atlas.

  • briefly describe the changes in this PR
  • include before/after visuals or gifs if this PR includes visual changes
Before After
expected expected
  • write tests for all new functionality
  • document any changes to public APIs
  • tagged @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Don't draw SDF image inside text-field since it is not supported. Update the style spec accordingly</changelog>

Sorry, something went wrong.

@zmiao zmiao added the bug 🐞 label Sep 7, 2021
@SnailBones SnailBones added this to the v2.4.2 milestone Sep 9, 2021
Copy link
Contributor

@rreusser rreusser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! 👍 I can't imagine it's possible or desirable to use warnOnce to print a single console warning. It seems correct to simply skip SDF images, but it may cause confusion if it fails silently.

@zmiao
Copy link
Contributor Author

zmiao commented Sep 10, 2021

I can't imagine it's possible or desirable to use warnOnce to print a single console warning. It seems correct to simply skip SDF images, but it may cause confusion if it fails silently.

@rreusser great idea! I fully agree to add warnOnce, updated the code in the recent commit.

@zmiao zmiao merged commit 401ea18 into main Sep 10, 2021
@zmiao zmiao deleted the zmiao-ignore-sdf-in-text branch September 10, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants