Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
Inconsistent blurry canvas text over different devices

Using a JS canvas with a pixel-aligned font, text is rendered using a Math.floor([width] / 2) but ends up blurry. Result is inconsistent with different devices. Both devices are using native resolution but appear different.

ctx.font = "16px 'Press Start 2P'";
ctx.fillStyle = 'black';
ctx.fillRect(0, 0, 400, 300);
ctx.fillStyle = 'white';
ctx.fillText('Blurry', Math.floor(400 / 2), 100);
ctx.fillText('Clear', 200.5, 200);

Example: https://jsfiddle.net/tsqdvfk9/

These two images show the above fiddle, but on the two different devices referenced above:

1st device

2nd device

Device 1 is a Windows 10 using 2 Acer H226HQL monitors

Device 2 is a Acer N18Q8 Chromebook

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!