3 ms·
>> SVGs are straight up vector images. Anti-aliasing methods employed by your browser or operating system have no effect and your icons will be noticeably sharp
by lukevp 6y ago
>> SVGs are straight up vector images. Anti-aliasing methods employed by your browser or operating system have no effect and your icons will be noticeably sharper.
> I… what!? I’m going to say it straight, this guy doesn’t understand what he’s talking about.
Perhaps I am misunderstanding too, but I think what GP is saying is that icon fonts render through the font engine and are subject to sub pixel rendering (such as Microsoft ClearType) where an SVG is not. Sub pixel realignment is meant to make text more readable and not to make images more accurate, so I can imagine an SVG would render with less artifacting. What do you think?
- chrismorgan 6y agoAt the very least, the author is conflating subpixel rendering and antialiasing in a way that shows a lack of understanding. Subpixel rendering may have been part of the topic of the “degraded visual quality”, but that’s easily disabled if desired. (Whether you should disable it or not is another question.) And it still sounds like he’s talking about antialiasing rather than subpixel rendering. Actually, this is now making me think of macOS’s glyph dilation. I suppose icon fonts will be degraded on most macOS devices (unless the user has turned off the misnamed “font smoothing” setting). Then in this section you’re citing, well, SVG is certainly subject to antialiasing; no sharpness arguments will be won here. Subpixel rendering probably won’t apply (and I say only probably—the browser is at liberty to do subpixel rendering on everything if it wants to, and people have toyed with doing subpixel rendering of more vector graphics than just fonts—in fact, in theory you have less control of this rendering than you do of text, as there’s no CSS property for it, unlike with text), but subpixel rendering is all about making things sharper anyway, so again SVG “loses”, if anything. Remember also that icon fonts are more or less constrained to monochromacy, and that’s where subpixel rendering excels, at increasing the effective resolution in one axis.