Join the Webstudio community

Updated 4 weeks ago

Unable to change font

Hi,

I'm trying to change font on an element but I not able to. I tried adding font-family attribute but it's still not taking it. Here's the project link: https://p-814807b0-da86-4345-802e-337bce0e4c4b.apps.webstudio.is/?authToken=820a2b6b-6c19-464c-8219-359b9308183d&mode=preview
T
O
18 comments
Unable to change font
working for me but generalyl please don't use font icons, use svg, font icons will drain your performance to inacceptable levels, they need to download the entire font before they can render a single icon
Attachment
image.png
It's a weird issue. So I tried multiple ways and it turns out that when you search the font and click on it, it does not change. You need to click on the cloud icon on the right and then select the font.
And yes. Thanks for the tips. I understand it decreases the website load time a little but it's much easier to implement than exporting and importing icons.
not little, it can kill your performance by 50% on lighthouse
reason is that if icon is inthe viewport and it gets rendered with a delay, lighthouse will know the site wasn't ready to render
take my advice, its free)
tested via autocomplete, indeed there must be a bug
You're right, I understand but I did some tests and it turns out the font file is only taking 62ms to load the font which could be 8-10ms per icon. So I just choose efficiency over performance because my clients always change their minds about few icons and the cycle of finding new ones, extracting SVGs and importing them hurts my efficiency.
Thanks for the advice though I'll look more into it and probably find a more efficient and performant process
@The Panwadi Ji trust me if I say this is wrong. Its not taking 62ms, its taking 62ms in your test. Latency and bandwiddth is unpredictable and your rendering depends on a call to a remote server.
And its not per icon. Font file fetches all icons, its one big thing, especially if you didn't optimize it for the icons you use and cut out icons you don't use.
extracting SVGs and importing them hurts my efficiency

There are tons of great libraries that provide an SVG in one click
In other words you are introducing a big, blocking remote resource that will slow down your site by half if network is weak.
test it on https://pagespeed.web.dev/ on a mobile view/tab there
Thanks for guiding me through this.
I wish it was easier though)
Add a reply
Sign up and join the conversation on Discord