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

canvas.context.measureText returns '0' #1738

Closed
rsimonton opened this issue Oct 19, 2018 · 3 comments
Closed

canvas.context.measureText returns '0' #1738

rsimonton opened this issue Oct 19, 2018 · 3 comments

Comments

@rsimonton
Copy link

Description

Creating a dynamic canvas element and attempting to use its 2d context to measure text always renders a width of '0'.

Steps to Reproduce

https://jsfiddle.net/jdmtu2xL/

Actual result:

Width of test string "Testing...1..2...3...." is: 0 :(

Expected result:

Width of test string "Testing...1..2...3...." is: 114.392578125 :)

Reproduces how often:

Consistently

Brave version (brave://version info)

Brave: 0.55.18 Chromium: 70.0.3538.67 (Official Build) (64-bit)
Revision: 9ab0cfab84ded083718d3a4ff830726efd38869f-refs/branch-heads/3538@{#1002}
OS: Mac OS X

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields? no
  • Is the issue reproducible on the latest version of Chrome? no

Thanks for Brave!

@srirambv
Copy link
Contributor

The Canvas Fingerprinting is blocked. Hence you see Width of test string "Testing...1..2...3...." is: 0 :(. Try setting Fingerprint protection to Allow All fingerprinting in Shields(lion icon in URL bar) and you will see the desired result. This is expected with blocking fingerprint mechanism

@srirambv srirambv added this to the Dupe / Invalid / Not actionable milestone Oct 19, 2018
@subzey
Copy link

subzey commented Jun 21, 2019

Can't the measurement result just be of lower precision, not always 0?

As for me, zeroing 44 out of the 53 bits of the Double mantissa would do. That would significantly complicate the fignerprinting while keeping all this stuff in the working condition.

Demo

Also, currently the feature can identify user as scripts now knows for sure that Brave is used 😁

@bsclifton
Copy link
Member

cc: @diracdeltas @riastradh-brave about the above comment RE: fingerprinting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants