mapbox / mapbox/pixelmatch

Handle Chrome font rendering weirdness with "pixelShift" comparison

Open
#107 0 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
7k
Forks
327
PR merge metrics
No merged PRs in 30d

Description

Hi @mourner ,

I can only imagine what your life is like right now in the midst of invasion! This is certainly not urgent, but I just wanted to document here...

I wanted to pose a question and propose a possible solution to the issue where Chrome and other browsers are often inconsistent in their anti-aliased font rendering like below output from latest `pixelmatch`:
image

A human can see "New Client" is shifted a few pixels up and over between the two screenshots, and might consider it within the threshold of "close enough - PASS". Anti-aliasing parameters don't seem to get it to filter out the false positive. So I forked your repo and made this pull request: https://github.com/mapbox/pixelmatch/pull/106

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed solution in pull request #106 and the screenshot example in this issue, then inspect how pixelmatch handles anti-aliased font differences. Reproduce the Chrome comparison described here and use the pull request's expected behavior to determine when the change is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.