Turn off RTL text patch on Chromium >=96 #8741
Merged
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.
Way back in #3923 and #6018 I had a fix for right-to-left line labels in Chromium-based browsers. Long story short, iD is one of the few places on the web which uses SVG textPath elements. A text shaping bug is making complex text (such as Indic languages , #5342) or RTL text broken for a long time - bug reported in 2014. We were able to use a JS library, sort of a hack really, to show corrected letters for Arabic and other RTL languages.
This week, the bug was fixed in Chrome Canary. In this PR I suggest that we detect the browser version and skip the right-to-left label fix in Chromium >= 96.0
Should the code and alif-toolkit dependency just be removed? Chrome, Brave, etc. are currently on Chromium 94. Once the fix is more mainstream (mid-November), we could start a grace period of 6?-18? months and then remove it.