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 rendering of denormalized strings with diacritics #11269

Merged
merged 2 commits into from
Nov 17, 2021
Merged

Conversation

mourner
Copy link
Member

@mourner mourner commented Nov 11, 2021

Closes #7195. Modern browsers (everything except IE and Chrome in Android WebView) have a String normalize method which combines characters where possible so that ones with diacritics would be a single code point rather than two. This in turn makes it request the right glyphs for proper rendering of denormalized strings with diacritics:

Before:
image

After:
image

Launch Checklist

  • briefly describe the changes in this PR
  • include before/after visuals or gifs if this PR includes visual changes
  • write tests for all new functionality (probably needs a render test?)
  • manually test the debug page
  • 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>Fix rendering of denormalized strings with diacritics</changelog>

Copy link
Contributor

@ryanhamley ryanhamley left a comment

Choose a reason for hiding this comment

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

This is great. Can we add a render test for this?

@mourner mourner requested a review from ryanhamley November 16, 2021 14:44
@asheemmamoowala asheemmamoowala removed their request for review November 16, 2021 19:23
@mourner mourner merged commit a4d522c into main Nov 17, 2021
@mourner mourner deleted the combine-diacritics branch November 17, 2021 15:55
@mourner mourner self-assigned this Nov 17, 2021
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.

Diacritic marks on certain glyph letters incorrectly placed
2 participants