Open Bug 1538718 Opened 6 years ago Updated 2 years ago

Account for Display Scaling when rendering

Categories

(Core :: Graphics, defect, P3)

defect

Tracking

()

People

(Reporter: tjr, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fingerprinting])

This is a super vague bug in terms of description.

In Windows, in the Display settings, you can "Change the size of text apps, and other items." When you do so, it changes how text is rendered, as exposed to getClientRects and presumably canvas.

On a dead-simple test of a few words of text, on two different Windows 10 machines I see the height attribute change (and the bottom attribute in the same way).

  • 100%
    • height: 18
  • 125%
    • height: 18.3999..
  • 150%
    • height: 18.66667...
  • 175%
    • height: 18.6999969...

You can also set a custom scale factor

  • 113%
    ** height: 18.5500003...

In addition, the right and width attributes are window-size specific, so they also change. I tested using responsive design mode, setting both computers to the same resolution (essentially letterboxing them!) of 375 x 812 and the right/width attributes were the same between them, despite different screen resolutions and window positions.

So the culprit seems to be this height difference.

Obviously there's some floating point stuff going on here with the crazy decimals. I'm not sure at this point if it can all be reduced to that given, the wide gap between .00 and .7... But perhaps.

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.