News for hackers. Stuff that matters.
Re:Programming fonts by s9w on Monday August 03, 2015 @01:49PM (#9998228)
Well screenshots are just screenshots and are dpi-indepandant. But the compare mode has a 2X zoom button for this. Not enough? I could use bigger font sizes, but that's not without trouble
Re:Programming fonts by sabarjp on Monday August 03, 2015 @01:55PM (#9998288)
The problem is that non-retina images get doubled in size on a retina display, so it looks blurry. I suggest providing 2x sized images. You can use media queries to show different sized images or rely on down-sampling. There's a few different strategies.
Re:Programming fonts by s9w on Monday August 03, 2015 @01:58PM (#9998321)
oh wait, ALL images get 2x upscaled? That sounds crazy. There are double-sized samples in the compare mode. But if they're still upscaled by macOS, what can I do?
Re:Programming fonts by tuxracer on Monday August 03, 2015 @02:32PM (#9998634)
Mac and Windows will 2x all images for users with HiDpi displays. You can use CSS to display the images as background-image then media queries are available to serve differently sized images for HiDPI. Alternatively, most images look completely fine scaled down, they just get blurry scaled up. If you use an image that is 2x bigger than defined in the img tag it will play nice on HiDPI.
Re:Programming fonts by protomyth on Monday August 03, 2015 @02:22PM (#9998518)
I cannot vouch for this one, but Apple has a suggestion https://developer.apple.com/library/safari/documentation/Net...
Re:Programming fonts by mariusc23 on Monday August 03, 2015 @08:44PM (#10000938)
Use the srcset attribute to provide @2x sizes.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Im...

Example: <img src="img.jpg" srcset="[email protected] 2x" alt="">