fix(label-content-name-mismatch): ignore ligature fonts#1829
Merged
Conversation
AutoSponge
reviewed
Sep 30, 2019
AutoSponge
reviewed
Sep 30, 2019
AutoSponge
previously requested changes
Sep 30, 2019
AutoSponge
left a comment
Contributor
There was a problem hiding this comment.
Let's try simplifying the double-for-loop that is diffing the bitmaps. See comments or msg me.
AutoSponge
reviewed
Sep 30, 2019
AutoSponge
reviewed
Sep 30, 2019
AutoSponge
reviewed
Oct 1, 2019
| // it has to be an icon ligature (e.g. Material Icon) | ||
| if (!compareData.some(pixel => pixel)) { | ||
| font.numLigatures++; | ||
| return true; |
Contributor
There was a problem hiding this comment.
Good point, I like this.
AutoSponge
reviewed
Oct 1, 2019
|
|
||
| if ( | ||
| pixelDifference >= differenceThreshold && | ||
| sizeDifference >= differenceThreshold |
Contributor
There was a problem hiding this comment.
right now it's fine but later we might find we need to split pixel and size diff thresholds.
AutoSponge
previously approved these changes
Oct 1, 2019
This reverts commit 8c8fdee.
AutoSponge
approved these changes
Oct 1, 2019
WilcoFiers
approved these changes
Oct 14, 2019
| document.createElement('canvas').getContext('2d') | ||
| ); | ||
| } | ||
| const context = axe._cache.get('context'); |
Contributor
There was a problem hiding this comment.
Dislike this name "context" we have something else called context. Can you rename this to canvasContext or whatever? (Please open an issue)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part 2 for #1635 to fix using ligature icon fonts.
Note: I couldn't get IE11 to work, I tried loading different font types in different ways and it would always fail, so I had to not check them in IE.
Reviewer checks
Required fields, to be filled out by PR reviewer(s)