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

Added support for high DPI canvasses #9

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
8 participants
@13twelve

13twelve commented Dec 29, 2014

In Chrome/Firefox on a retina Mac Book Pro the icons look fuzzy; added a fix that compares window.devicePixelRatio with context.backingStorePixelRatio to scale the canvas as necessary.

For Safari on high dpi screens nothing happens as it automatically solves the high DPI canvas problem.

Added support for high DPI canvasses to stop icons looking fuzzy in C…
…hrome and Firefox on high DPI screens (Safari auto handles high DPI canvas).
@stursby

This comment has been minimized.

stursby commented on 92d4824 Mar 9, 2015

👍

@Stichoza

This comment has been minimized.

Stichoza commented Mar 11, 2015

👍

3 similar comments
@FelipeMarcos

This comment has been minimized.

FelipeMarcos commented Aug 19, 2015

👍

@SergioCrisostomo

This comment has been minimized.

SergioCrisostomo commented Oct 7, 2015

+1

@jeffehobbs

This comment has been minimized.

jeffehobbs commented Oct 18, 2015

👍

@ironwallaby

This comment has been minimized.

Member

ironwallaby commented Nov 11, 2015

Hi all... maybe I'm missing something, but how would built-in support for this work? Why not just make your Canvas bigger (in pixels) and downscale it to the desired size in CSS?

That's how we do it in Forecast.io!

@ironwallaby

This comment has been minimized.

Member

ironwallaby commented Nov 11, 2015

I should perhaps also note that this is a problem that would be fixed by moving to vector Skycons, which is addressed in #11. (It's probably the true right way to handle this!)

@13twelve

This comment has been minimized.

13twelve commented Nov 11, 2015

@ironwallaby because each implementation of Skycons would require everyone to do this manually and this update essentially does exactly what you suggest, automatically.

Although I agree #11 would be a better solution :-)

@ironwallaby

This comment has been minimized.

Member

ironwallaby commented Nov 11, 2015

@13twelve I guess this is a stylistic difference: I see it as very scary to mess about with pre-existing HTML and CSS content in JavaScript. To accept this change, I'd probably make the library generate the Canvases directly so it's known ahead of time that they're dynamically generated.

But yeah, why I don't I try to pour that effort into #11 instead :) Then we get a lot of other stuff for free!

@werose

This comment has been minimized.

werose commented Sep 19, 2016

good

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