News for hackers. Stuff that matters.
Re:WebAssembly Studio by Alexendoo on Thursday December 31, 2020 @05:26PM (#25597893)
Everything is rendered directly to a canvas, at the very least it lacks subpixel rendering
Re:WebAssembly Studio by ijiafiusdiuf87 on Friday January 01, 2021 @12:08AM (#25601034)
One can use the Freetype library to render beautifully sharp text directly to a canvas with gamma-correct subpixel alpha coverage. Why this Rust website uses such blurry fonts, I don't know, it reminds me of playing an OpenGL/DirectX video game where the text is rendered using cached texture-filtered quads: maybe good enough for game UI, but not for intensive reading.
Re:WebAssembly Studio by colejohnson66 on Thursday December 31, 2020 @10:13PM (#25600483)
For those wondering why: subpixel rendering requires knowing the subpixel layout of the display. It’s something your OS knows, but your web browser doesn’t tell the website.
Re:WebAssembly Studio by brianush1 on Friday January 01, 2021 @02:32PM (#25605992)
Also for those wondering how you can get subpixel AA on your canvases anyway: if you use a classic 2d rendering context (not WebGL), you can use canvas.getContext("2d", {alpha: false}) to create a canvas with a fully opaque background, which will also cause fillText to render with subpixel AA on most browsers.