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

Use metrics.width for spaces in writeTextToCanvas #9784

Merged
merged 1 commit into from
Sep 1, 2021
Merged

Conversation

ebogo1
Copy link
Contributor

@ebogo1 ebogo1 commented Sep 1, 2021

Fixes a mistake from #9765 where I hardcoded space characters to return a width of 0 in the new measureText function. This fix matches the implementation of the third party measureText that used to be in main and fixes the spacing bug seen in the CMZL reference properties sandcastle -

PR branch:
image

1.84:
image

main:
image

@ebogo1 ebogo1 requested a review from lilleyse September 1, 2021 20:05
@cesium-concierge
Copy link

Thanks for the pull request @ebogo1!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@lilleyse lilleyse merged commit 0ddef56 into main Sep 1, 2021
@lilleyse lilleyse deleted the text-metrics-width branch September 1, 2021 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants