Re:How to avoid layout shifts caused by web fonts
by ljm on Sunday January 30, 2022 @08:47AM
(#30137140)
If you're building a web app (say, via electron) as opposed to a site or document, using the system font stack will make that app fit into the desktop environment much better than Arial, Times New Roman and Courier New will.
[ Parent
| on HN ]
Re:How to avoid layout shifts caused by web fonts
by necovek on Sunday January 30, 2022 @09:06AM
(#30137294)
But that's not what was being compared.
How would electron apps render a "sans-serif" font?
Re:How to avoid layout shifts caused by web fonts
by ljm on Sunday January 30, 2022 @09:28AM
(#30137469)
What is being compared? Because to me it read like a question of choosing 'sans-serif' over 'ui-system-font-sans' or whatever in your CSS. Nothing more than that.
Re:How to avoid layout shifts caused by web fonts
by necovek on Sunday January 30, 2022 @11:34AM
(#30138565)
"System font stack" — which I took to mean the longish list of commonly known default fonts for a bunch of OSes brought up earlier in the thread — with a CSS value of "sans-serif".
There was no mention of direct use of Arial, Times New Roman or Courier that I could see, so I don't see why bring it up.
Re:How to avoid layout shifts caused by web fonts
by thrdbndndn on Sunday January 30, 2022 @09:42AM
(#30137574)
He/she is trying to say what the default of "sans-serif" would be if not 'ui-system-font-sans'.
And it indeed is the same font on Android and iOS, at least. Windows is kinda tricky though.